You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been running the device in standalone mode with the HSPI ATCMD firmware. I've found a bug that if you send it some data it will go into passthrough mode even if you sent a size on the SSEND command. The data sent in this case ends with a \r\n. Could that be the issue? If you're using strtok or something to find the end of data...
Any future plan to open source the ATCMD firmware?
I (10568) NRC: SEND: AT+SOPEN="tcp",1234
I (10598) NRC: RECV: +SOPEN:0
I (10598) NRC: RECV: OK
...
I (16278) NRC: RECV: +SEVENT:"CONNECT",1
...
I (16288) NRC: SEND: AT+SSEND=1,24 // size passed, should not go to passthrough
I (16288) NRC: RECV: OK
I (16308) NRC: SEND: DATA 24
I (16308) NRC: SEND: AT ******* THIS IS STILL INTERPRETED AS DATA??
I (16308) NRC: RECV: +SEVENT:"RECV_READY",1,41 // other side sends data
I (17408) NRC: RECV: +SEVENT:"SEND_IDLE",1,0,0,0 **** EVENT TO LEAVE PASSTHROUGH?????
The text was updated successfully, but these errors were encountered:
Update, this is due to the +SEVENT:"RECV_READY" arriving in between the SSEND and the data payload.
Example code:
if(nrc_atcmd_send_cmd("AT+SSEND=%u,%u", sock->id, len) != ATCMD_RET_OK){
socket_error("send command failed");
return -1;
}
sleep(5);
socket_log("Up from sleep"); // Send data from other side at this point. Generates RECV READY event
if(nrc_atcmd_send_data(buf, len) != 0){
socket_error("sending actual data failed");
return -1;
}
//SEND_IDLE event generated
The firmware should be able to handle this case, since we cannot handle it from our drivers. Cannot stop an event from being generated. Sending "AT\r\n" to get out of passthrough mode even after that SEND_IDLE does not break it out of whatever state it is in. The only way I could get it to continue is resetting.
Please advise.
bpg0x03
changed the title
[BUG] ATCMD socket goes to passthrough mode even when size passed
[BUG] ATCMD socket race condition with SSEND (normal) and SEVENT:RECV_READY
May 26, 2023
bpg0x03
changed the title
[BUG] ATCMD socket race condition with SSEND (normal) and SEVENT:RECV_READY
[BUG] ATCMD socket race condition with SSEND (synchronous) and SEVENT:RECV_READY
May 26, 2023
Good morning,
I've been running the device in standalone mode with the HSPI ATCMD firmware. I've found a bug that if you send it some data it will go into passthrough mode even if you sent a size on the SSEND command. The data sent in this case ends with a \r\n. Could that be the issue? If you're using strtok or something to find the end of data...
Any future plan to open source the ATCMD firmware?
The text was updated successfully, but these errors were encountered: