lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] sys_timeout() handler never being triggered in mqtt.c


From: address@hidden
Subject: Re: [lwip-users] sys_timeout() handler never being triggered in mqtt.c
Date: Mon, 20 Jun 2022 21:20:35 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0

Am 19.06.2022 um 22:05 schrieb inceljoe via lwip-users:
Good day everybody,
I was trying to use the mqtt functionality which is included in LwIP at
LwIP/src/apps/mqtt. I am using LwIP alongside FreeRTOS on a STM32
microcontroller.

The MQTT server requires the client to send a ping packet every few
seconds, by reading the code I found out this functionality is
implemented with a sys_timeout() at line 1066 in mqtt.c . This is the
line in particular:
/sys_timeout(MQTT_CYCLIC_TIMER_INTERVAL * 1000, mqtt_cyclic_timer, client);/

But the problem is, that the /mqtt_cyclic_timer /function isn't
triggered at all, not even once. I put a breakpoint into it and it was
never hit.

The tick source given to the /sys_now()/ works fine and increases by one
every millisecond so I have no idea why the sys_timeout() function
doesn't run the handler function even once. Can anyone help me? Thanks
for your time.

Do other timeout handlers get triggered at all? Is your port's timeout
handling working correctly? For that, you either have to use
tcpip_init() to get multithreading running, or call sys_timeouts_check()
yourself when using lwIP in main-loop style.

Regards,
Simon



reply via email to

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