Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

MQTT Client stops publishing

$
0
0

 Hello. I started with the MQTT client feature of SSP1.3.2. With a hint of Karol how to set the task priorities the client started working - sometimes.

I use a password protected Mosquitto as broker and did the following steps:

  • nx_ip_interface_status_check
  • nxd_mqtt_client_login_set
  • nxd_mqtt_client_connect
  • nxd_mqtt_client_publish in a loop with tx_thread_sleep of 1s

Sometimes the client starts publishing but suddenly stops after e.g. 60 times.

Next time it even doesn’t start publishing at all. Can this be a problem with the client ID if there is no disconnect from the broker?

 

There was another post which mentioned to set g_mqtt_client0.nxd_mqtt_client_packet_identifier = 1 because otherwise a broker may close the connection. I inserted this statement before the publish call. Didn’t help.

Is there any example or test project how to build a client in a proper way.
I think I did it like described in documentation.

 

Thanks for any hint.
Hermann


Viewing all articles
Browse latest Browse all 5781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>