Closed gmodcake closed 2 years ago
After some debbuging, it seems that the _handleRxDataEvent
in the RX thread fires after the _Cellular_AtcmdRequestTimeoutWithCallbackRaw
times out in _Cellular_AtcmdDataSend
. The "> " is received immediately tho.
What could be causing this ?
I found the solution, if it can help another here is what I what I was doing wrong :
I was calling Cellular_SocketSend(...) directly into the CelluluarSocketOpenCallback_t method. I simply moved the code somewhere else in a task where it xEventGroupWaitBits
for a bit that I set in the callback.
Don't put cellular commands directly into callbacks basically.
I'm using the same implementation of the comm interface as the comm_st_uart.c.
Everything works fine, I setup the modem and then open the socket. Once it's open I use Cellular_SocketSend to send a packet on the socket, but it hangs until timeout and does not send the data. The UART interface does catch the "\r\n> " sent by the modem, but the library doesn't seem to catch it. Any idea ? My modem is the BG96