Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network Stability #7

Open
chrislstewart opened this issue Oct 6, 2017 · 7 comments
Open

Network Stability #7

chrislstewart opened this issue Oct 6, 2017 · 7 comments

Comments

@chrislstewart
Copy link

The subscriber client script subscribe.py will occasionally reach time out and stop logging data without fatal error. This has been observed to be preceded by the LED on the CC2531 USB dongle going through the same pattern of flashes as when the network is first being established. After interrupting subscribe.py via Ctrl+C in the terminal, it fails to reconnect to the network, throwing “Error 113: No Route To Host.” Any active canaries are able to reconnect. A reboot of the computer hosting the network is necessary to reconnect subscribe.py.

@steelsmithj
Copy link
Collaborator

Thank you very much for the detailed report on the error that was occurring. The report makes it sound like there might be a problem with traffic going through the USB dongle which then causes problems with the subscribe.py script. However, having the devices still registered on bbbb::100 webpage suggest otherwise.

After the socket error does the "last seen" column on the [bbbb::100]/sensors page keep increasing and not reset? If this is the case then that means that there is a problem with 6lbr and the dongle handling the traffic. If not then the problem could be with the mqtt broker.

Also what is your '#define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE' set to?
Located in https://github.com/PureEngineering/contiki/blob/master/examples/canary/mqtt_protobuf_demo/project-conf.h

By increasing this by powers of 2 (8, 16, 32, 64 max) it will greatly help increase the traffic through the mesh, at a cost of power consumption. As you increase the number of devices you will probably have to up the amount.

@chrislstewart
Copy link
Author

chrislstewart commented Oct 12, 2017 via email

@steelsmithj
Copy link
Collaborator

In a previous email it was stated that the VM did not contain these network errors. Is this true for the hardware and the VM together, or just the simulator?

@quantumqueen
Copy link

quantumqueen commented Oct 17, 2017 via email

@steelsmithj
Copy link
Collaborator

NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE Controls the "wake up" period in the radio duty cycle protocol. To conserve power, each node turns on and off really quickly and checks to see if there is an incoming message. Increasing the check rate will make it turn on and off more often, giving a higher on rate. This makes sure that messages travel through the mesh more reliably, but at the cost of holding the radio on more. As more nodes are added to the mesh, this value will need to increase to make up for the higher amount of data.

#define CC26XX_WEB_DEMO_DEFAULT_PUBLISH_INTERVAL (CLOCK_SECOND * 10)
Located here controls how often a message is published over mqtt. This rate will not be faster than one second without changing core contiki code.

#define SENSOR_READING_PERIOD (CLOCK_SECOND)
Located here controls how fast the sensors are polled. Having this larger than your publish interval will result in duplicate information.

@chrislstewart
Copy link
Author

chrislstewart commented Nov 6, 2017 via email

@steelsmithj
Copy link
Collaborator

steelsmithj commented Nov 6, 2017

CC26XX_WEB_DEMO_DEFAULT_PUBLISH_INTERVAL is the period in which the canary will send a packet through 6lbr to the mqtt broker. It is safe to assume that every sensor reading will be published if both are set to clock_second. Although they are two separate timers so I guess there is a small possibly that a value can be published twice before reading or read twice between publishes.

The NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE will increase the performance in the mesh, not to the 6lbr router. As you start spreading out canaries and they begin needing to hop multiple times to get to the router, having a higher check rate will increase the performance of the entire mesh.

The dongle does not perform a channel check rate, it is always receiving. So when a message is sent to it and assuming no collisions or its already reading a message, it should receive it. So the more devices that are a single hop distant to the dongle will decrease its performance.

At a base level 6lbr is designed to use the rpl-border-router example. rpl is the routing protocol which 6lbr is using. We can try using the rpl-border-router but we lose a lot of functionality (no [bbbb::101], mqtt wont work as easily, etc).

I think in order to have very many connected devices the publish intervals need to be longer. Which is counter intuitive to your testing at the moment. The end goal of this mesh network will be very fast communication between canaries (high channel check rate) and then a single message is sent through 6lbr after the canaries have communicated with each other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants