adamrenner / mqtt-sn-tools-contiki

Contiki adaptation of MQTT-SN-Tools (MQTT For Sensor Networks) protocol
MIT License
6 stars 7 forks source link

The connection with the broker is loss #4

Open jluzuria2001 opened 8 years ago

jluzuria2001 commented 8 years ago

Hi all,

When I use on a Z1 mote board I'm getting problems like in the gateway:

TCP/IP connection with the broker was lost.
Client is not connected. The received Mqtts REGISTER message cannot be processed.

on the mote I got these messages:

requesting connection 
Sending CONNECT packet...
Connack received
connection acked

requesting subscription
requesting Subscribe

Sending SUBSCRIBE packet...
receive timer reset
registering topic
requesting Registering  
Sending REGISTER packet...

So the problem as you can see is that the mote got a disconnection of the gateway Has somebody observed this behavior or any hints how to resolve this? Thanks in advance.

adamrenner commented 8 years ago

It has been a while since I touched this code and I no longer have a development environment configured to test it. My testing was done primarily in the Cooja simulator, but I believe that I tested on CC2538 boards as well. I believe that an experimental version of RSMB was the only broker that supported MQTT-SN and IPv6 at the time, so I believe that I tested with this -> http://git.eclipse.org/c/mosquitto/org.eclipse.mosquitto.rsmb.git/ This version of RSMB was supposed to end up merged with mosquitto, so hopefully Mosquitto fully supports MQTT-SN by this point as well

I am guessing that you are using a separate MQTT-SN gateway and MQTT broker. I recall having som issues with this approach as well, but cannot remember the specifics. From the first diagnostic message It looks like the connection between those components is the problem.

jluzuria2001 commented 8 years ago

Thank you very much Adam, the problem is not on the application I have noted that the problem is on the limitation of RPL routing protocol on Contiki, that currently has a limitation to 8 neighbors as maximum for its neighbor tables. {https://github.com/contiki-os/contiki/blob/master/core/net/nbr-table.h} Even with 8 motes motes, 2 of them start to disappear from the network and the disappear motes does not send packets anymore.

Greetings.