MQTT publisher sample for both tls and non-tls using SIMCOM7080 modem #43733
Replies: 4 comments 1 reply
-
Try calling wait()/mqtt_input() in a loop (https://github.com/DineshDK03/zephyr-mqtt-sim7080/blob/main/mqtt_publisher_modem/src/main.c#L221) until As for TLS, that offloaded implementation does not to support TLS on their side. |
Beta Was this translation helpful? Give feedback.
-
Looks as if an incomplete/malformed CONNACK was received. You can check if it's a TCP fragmentation issue by replacing if (wait(APP_CONNECT_TIMEOUT_MS)) { with while (wait(APP_CONNECT_TIMEOUT_MS) > 0) { here. If it helps, feel free to send a PR. If this doesn't help, it may be an issue with the offloaded socket implementation (which I'm not familiar with for this particular modem. |
Beta Was this translation helpful? Give feedback.
-
Hi @rlubos , I found out that when I comment out the block code:
in simcom-sim7080.c file, I am able to connect with MQTT successfully:
As far as I know, the driver does not support non-blocking sockets, leading to a lack of data segment when calling the driver layer and parsing wrong data when opening a new TCP connection and reading. That's why I comment out to force it to block and it works well. |
Beta Was this translation helpful? Give feedback.
-
Hi @rlubos , I found out that when I comment out the block code:
in simcom-sim7080.c file, I am able to connect with MQTT successfully:
As far as I know, the driver does not support non-blocking sockets, leading to a lack of data segment when calling the driver layer and parsing wrong data when opening a new TCP connection. That's why I comment out to force it to block and it works wells. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What I am trying to do
I am doing MQTT publisher sample using SIMCOM7080 modem connected to esp32-wrover devkit.
To Reproduce
Steps to reproduce the behavior: Clone the sample folders from here
west build -p -b esp32 && west flash && west espressif monitor
Expected behavior
Expecting mqtt publish response OK without any errors.
Logs and console output
Environment (please complete the following information):
Beta Was this translation helpful? Give feedback.
All reactions