I am working on a larger project with the Pico and I'd like to use MQTT. I experienced some problems with the LwIP MQTT function using the PICO W in no_os mode. I have written a simple script that pushes a MQTT message every minute as a kind of alive packet. This works as intended, but after some time the transmission stops. I've turned on the debug functions to get an idea, but I can't find the cause. All parameters seem to be fine and the statistics show no memory shortage or other resource related problems.
I have observed the following behaviour.
The message "tcp_output: nothing to send (00000000)" appears every second, so I have 60 of these messages in the log between the various MQTT messages. After some time the number of messages reduces to just one message between the MQTT messages. Compare line 1816 and following with line 2014.
The mqtt callback function returns the following error: "mqtt_pub_request_cb: Publish result: -3 which indicates a timeout problem due to the documentation. see line 4253.
The IP stack seems fine as I can ping the device.
Any ideas what is wrong here or any ideas how to get more information from the debug system? code and lwipopts.h are below. minicom log is attached.
System Info:
Hi all,
I am working on a larger project with the Pico and I'd like to use MQTT. I experienced some problems with the LwIP MQTT function using the PICO W in no_os mode. I have written a simple script that pushes a MQTT message every minute as a kind of alive packet. This works as intended, but after some time the transmission stops. I've turned on the debug functions to get an idea, but I can't find the cause. All parameters seem to be fine and the statistics show no memory shortage or other resource related problems.
I have observed the following behaviour.
Any ideas what is wrong here or any ideas how to get more information from the debug system? code and lwipopts.h are below. minicom log is attached.
minicom.cap.zip
regards Andi
| lwipopts.h