This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using MQTT example of SDK 15.2.0 with nRF52832 without pressing button

I used the example code of MQTT pub and sub with nRF52 DK which has nRF52832 in it. I have sent the data from one kit to another with the help of Raspberry pi 3 as a router. Now, I would like to change the sample code according to my needs. SDK uses MQTT by pressing buttons on the kit. However, I want the kit to connect to the MQTT after IPv6 interface is up. I just tried simple function that controls whether IPv6 interface is up and MQTT is disconnected then if yes, call mqtt connect function. Additionally, I disabled the button functions. However, the kit did not respond to the function and it could not connect to the Mqtt. I think I need to do the thing by using the scheduler, interrupt or timer but I could not find what to do. Does anybody direct me to a way to accomplish this goal? Thanks in advance. 

Parents Reply
  • Hi, 

    you please give us more information on what is meant by the kit does not respond?

    Do the mqtt_connect API result in failure, or can you check with a breakpoint if the function is very called?

    The approach seems right as well. However, there is little information available on symptoms,

    Also, if we could sniff traffic on the router, that could be good. And here, sniff need not imply BLE sniffer, but a local interface dump could do as well.

    Also note that after the IP interface is up, getting an actual IPv6 global address takes some time due to a procedure for SLAAC.

Children
Related