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

Connection lost when multiple publishers send data to mosquitto broker on raspberry pi 3

Hi,

I have successfully done one publisher and one subscriber example by using mosquitto broker on raspberry pi and 2 nrf52832s. What I want to do is that I want to send data with different topics from 2 nRF52832s. When I tried to get data from only one publisher it is ok, but when I connect the second publisher the first one's connection gets lost. I could not notice what is the problem. May you please direct me to possible errors?

Best regards,

Halil

Parents Reply Children
  • Thank you for answering. However, I have realized that I made a dummy mistake. I forgot changing the client id of each node. For this reason, the base station closes the older connection. For those who have the same error, please be careful to that each node must have different client id, as the name implies it is id. 

    Thank you Hakon.

    Best regards,

    Halil

  • Hi Halil,

    I read that you can successfully keep a connection with both devices, publisher and subscriber. I'm trying the same but I can't. I mean, I can't keep a multiple client connection (one device at time, publisher or subscriber, works good).

    I can use the command "echo "connect XX:XX:XX:XX:XX:XX 1 ...." for both nrf52832 (works), but after that I can't proceed to establish a MQTT communication with publisher and subscriber to the Raspberry PI 3. LED 1 is ON in both device and buttons doesn't work for any device.

    I tried with SDK v15.3.0 and SDK v15.2.0; Same issue.

    Can you give me a hand, a guide maybe, please?

    Best regards,

    Cisco

Related