lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] MQTT TCP disconnects after a while


From: Manu Abraham
Subject: [lwip-users] MQTT TCP disconnects after a while
Date: Sun, 6 Sep 2020 22:40:27 +0530

Greetings,

Running mqtt from lwip-2.1.2 on a STM32H7 along with altcp and mbedtls.
It does run appreciably okay.

Sometimes mqtt does run continuously quite well for 3 - 4 days. But
sometimes mqtt just hangs up with publish error - 14 and eventually
error -11.

#1. error -14
mqtt_tcp_err_cb: TCP error callback: error -14, arg: 30044460
MQTT client "test" connection cb: status 256

and later on

#2. error -11
Assertion "mqtt_publish: TCP disconnected" failed at line 1110 in
..\..\..\..\..\..\Middlewares\Third_Party\LwIP\src\apps\mqtt\mqtt.c
 (198) publish_data: Publish err: -11


I guess TCP RST and TCP disconnect, from include/lwip/err.h ?

I have been trying to understand why that does happen.
Any thoughts or suggestions, on how to debug this further ?


Thanks,

Manu



The log snip, with a working publish and the next publish which causes
the error.



 (389) netapp_thread: BUFB_Data
 (170) publish_data: Sizeof DMAbuf: 120
 (171) publish_data:
31138  8247  7402  8158  8234  8289  5838  8050  8270  8171  8140 24102
31129  8218  7385  8152  8247  8284  5757  8017  8261  8168  8190 24102
31135  8196  7586  8119  8236  8292  5745  8085  8174  8179  8153 24102
31135  8227  7678  8091  8258  8292  5656  7994  8174  8190  8191 24103
31130  8216  7602  8128  8255  8247  5621  8026  8186  8208  8151 24103

mqtt_publish: Publish with payload length 120 to topic "LWH7/test"
mqtt_output_send: tcp_sndbuf: 5811 bytes, ringbuf_linear_available:
72, get 184, put 6mqtt_output_send: tcp_sndbuf: 5811 bytes,
ringbuf_linear_available: 72, get 184, put 64
4
mqtt_output_send: tcp_sndbuf: 5617 bytes, ringbuf_linear_available:
120, get 136, put 64
mqtt_parse_incoming: Remaining length after fixed header: 2
mqtt_parse_incoming: msg_idx: 4, cpy_len: 2, remaining 0
mqtt_message_received: PUBREC, sending PUBREL with pkt_id: 110
mqtt_output_send: tcp_sndbuf: 5811 bytes, ringbuf_linear_available: 4,
get 64, put 68
mqtt_tcp_err_cb: TCP error callback: error -14, arg: 30044460
MQTT client "test" connection cb: status 256
 (384) netapp_thread: BUFA_Data
 (170) publish_data: Sizeof DMAbuf: 120
 (171) publish_data:
31124  8244  7609  8194  8292  8224  5592  8094  8225  8232  8167 24099
31142  8251  7644  8204  8252  8250  5723  8063  8220  8204  8168 24098
31130  8237  7541  8237  8226  8263  5741  7856  8247  8162  8179 24099
31132  8233  7434  8160  8245  8282  5728  8046  8223  8164  8179 24099
31145  8200  7559  8154  8255  8281  5780  8005  8205  8183  8151 24099

Assertion "mqtt_publish: TCP disconnected" failed at line 1110 in
..\..\..\..\..\..\Middlewares\Third_Party\LwIP\src\apps\mqtt\mqtt.c
 (198) publish_data: Publish err: -11
 (389) netapp_thread: BUFB_Data
 (170) publish_data: Sizeof DMAbuf: 120
 (171) publish_data:
31134  8215  7637  8134  8249  8288  5698  8033  8170  8191  8159 24102
31141  8247  7526  8109  8254  8318  5732  8102  8173  8189  8129 24103
31126  8237  7724  8157  8268  8236  5683  8011  8180  8212  8164 24103
31134  8256  7636  8176  8248  8228  5459  8059  8204  8230  8164 24102
31129  8231  7741  8209  8241  8275  5722  8067  8222  8187  8121 24102

Assertion "mqtt_publish: TCP disconnected" failed at line 1110 in
..\..\..\..\..\..\Middlewares\Third_Party\LwIP\src\apps\mqtt\mqtt.c
 (198) publish_data: Publish err: -11
 (384) netapp_thread: BUFA_Data
 (170) publish_data: Sizeof DMAbuf: 120
 (171) publish_data:
31136  8252  7619  8212  8255  8240  5696  8067  8227  8173  8153 24100
31130  8241  7383  8208  8251  8259  5817  8059  8246  8165  8202 24100
31146  8201  7363  8148  8218  8277  5765  8060  8260  8167  8178 24100
31145  8235  7704  8136  8237  8286  5766  8120  8192  8193  8179 24100
31134  8219  7564  8087  8254  8335  5754  8120  8176  8181  8172 24099



reply via email to

[Prev in Thread] Current Thread [Next in Thread]