How to quickly transfer information from XBee to another XBee?

I use several XBee Zigbee with some Arduino modules (or microcontrollers, Arduino is optional). I configured my XBees in AT / transparent mode.

I need to transmit information: when one module is moved, each other module must respond simultaneously and immediately.

Unfortunately, if I have good speed in unicast mode, there are many delays in broadcast mode. This is something famous and documented, see XBee ZigBee Addressing .

No data is lost, but it is sometimes buffered for several seconds by XBee before being sent again or delivered to the Arduino.

This does not seem to be a configuration problem, it is a way of broadcast protocol operation. Any idea on how I can speed up the process?

The only thing I had was to use the API mode so that each Arduino would store the list of XBee addresses and unicast information in the list of these addresses ... but I lose the convenience of the broadcast method and I cannot easily add a new module without updating each Arduino.

+4
source share
2 answers

Broadcasting using XBee ZB modules generally gives you much less performance than sending a separate unicast for each node you want to talk to. This is because broadcasting works differently with XBee ZB modules than with XBee 802.15.4 modules.

When you send a broadcast with XBee 802.15.4 modules, one 802.15.4 port is sent to the network, and all nodes that can hear the transmission pick it up and send information from their serial UARTs. The 802.15.4 network is a simple star network, and implicit broadcast repetition is performed by any of the nodes in the network. With the XBee ZB, this is different. XBee ZB modules work in grid topology and need to be retransmitted to other nodes that go beyond the original transmission.

When you send a broadcast with XBee ZB modules, each node that receives the broadcast will re-broadcast it 3 times, resulting in a large amount of data being transmitted between the nodes. In addition, there can only be a certain number of transmissions that β€œlive” on the network at any given time. This often surprises people when they think that the network discards their data when the XBee actually rejects the transfer request.

If you do not send data very rarely - perhaps broadcasting once a minute or more slowly - it is often best to follow this procedure:

  • Created a list of all nodes by performing network discovery or collecting packets of route records by enabling the AR function
  • Send unicast to each node you want to pass to

If you send information to the nodes of a large ZB network (i.e. more than 30 notes), you can read this article: Large Networks and Initial Routing

+7
source

I do not think that you can optimize it much more, if only some of the modules should not receive a message. In this case, instead of broadcasting, you can use multicast (possibly only with Xbee 2), which can lead to a very slight improvement in the overall speed of your network when it becomes large enough (more than 16 nodes, i.e. the base routing table )

Have you tried the comparison between unicast, multicast and broadcast? It is possible that creating dozens of unicast applications is on average faster or at least more reliable, especially if you have many flights on your particular network (for example: a 12-node network with 8 flights).

In the unicast mailing list, you can receive confirmation or confirmation to find out the total time and success of the operation, and whether to try again or not.

+1
source

Source: https://habr.com/ru/post/1403494/


All Articles