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