Open owen63 opened 5 months ago
I am following the modem_tcp_client example but need to transcribe the SIM7600/BG96 commands to the Telit equivalents.
Good to hear, maybe you can also think of updating the example in future? (PRs welcome)
am using the 'localhost listener' mode as I want to use the modem for HTTP as well as MQTT requests.
Note that both the HTTP request and the MQTT client libraries in IDF use tcp_transport
, so you could also use the other mode.
My start_connecting cmd leaves the modem in data mode rather than command mode (because I couldn't consume the OK response).
You need to use the AT command that sends raw data to the opened TCP connection.
(because I couldn't consume the OK response).
This is happening in a separate thread in that example.
I see the MQTT CONNECT received by the localhost listener and I need to send that to the dte so that it gets to the server. But I'm not sure how to do that, and the socket closes.
Here's the code that handles the data from the localhost listener. from the log it looks like it reads your data correctly
but it only initiate sending, the actual data are added asynchronously.
Also I see that remote data is handled by an event file descriptor but I don't see how that event is signaled.
whenever you get an asynchronous data from the modem, e.g. here:
(I think both modems in the example just send async notification about "data-available", and the acutual reading is done synchronously)
Answers checklist.
General issue report
I am following the modem_tcp_client example but need to transcribe the SIM7600/BG96 commands to the Telit equivalents. I am using the 'localhost listener' mode as I want to use the modem for HTTP as well as MQTT requests. My start_connecting cmd leaves the modem in data mode rather than command mode (because I couldn't consume the OK response). So I see the MQTT CONNECT received by the localhost listener and I need to send that to the dte so that it gets to the server. But I'm not sure how to do that, and the socket closes. Also I see that remote data is handled by an event file descriptor but I don't see how that event is signaled.