Arduino-XBee broadcast problem while other nodes in range are transmitting

I have set up a wireless sensor network with 20 XBee series 2 modules mounted on Arduino Uno in a room (one coordinator and 19 routers). Each and every node is in range of each others. In my experiment, when a node transmits a packet with some required information, all the receiving nodes have to first check RSS value and if it is above predefined threshold, it has to re-broadcast it. To avoid re-broadcasting the packets with under RSS threshold, I have set BH (broadcast radius) to 1. I have programmed using Arduino-xbee library. All the nodes are reading incoming packet and if it is above threshold, they will re-broadcast using XBeeAddress64 addr64=XBeeAddress64(0x00000000, 0x0000ffff); ZBTxRequest zbTX=ZBTxRequest(addr64,LocationPacket,sizeof(LocationPacket)); xbee.send(zbTX);

The problem is -some of xbee modules couldn’t re-broadcast the packets although the packet is above RSS threshold. I wonder (1) Can it be the problem of XBee serial buffer? It can’t process arduino zbTX request since it’s receiving RF data from other nodes which gets the medium first to re-broadcast? (2) Are there any timeout in XBee Serial buffer? (3) Or what should be the reason of not re-broadcasting the packet? Please kindly help me with this issue since this is very import part for my experiment. Regards, Nyein

What are you trying to accomplish with this scheme, what is its purpose? Sounds like a great way to bring the network to its knees. Have you read the cautions in the product manual regarding broadcast transmissions? This sounds like it would produce a chain-reaction of them.

Product Manual: XBee / XBee-PRO ZB RF Modules http://ftp1.digi.com/support/documentation/90000976_M.pdf

I'm trying to implement DV-HOP localization algorithm. Yes, I have read the product manual regarding broadcast transmissions. But i still couldn't find out the cause of the problem. Before xbee processing the transmit request of arduino, it may receive packets from other neighbors and perhaps, they may also be above threshold. Then, arduino may send next transmit request to again. That's why I am considering XBee serial receive buffer overlow problem or not. Regards, Nyein

Just out of curiosity, when you say

some of xbee modules couldn’t re-broadcast the packets although the packet is above RSS threshold.

How are you determining that, what is the indication that that has occurred?

There is no guarantee that a broadcast packet will be sent and received successfully, each node receiving a broadcast transmission retransmits it three times. Further, from p 53 in the product manual:

Each node that transmits the broadcast will also create an entry in a local broadcast transmission table. This entry is used to keep track of each received broadcast packet to ensure the packets are not endlessly transmitted. Each entry persists for 8 seconds. The broadcast transmission table holds 8 entries.

For each broadcast transmission, the ZigBee stack must reserve buffer space for a copy of the data packet. This copy is used to retransmit the packet as needed. Large broadcast packets will require more buffer space. This information on buffer space is provided for general knowledge; the user does not and cannot change any buffer spacing. Buffer spacing is handled automatically by the XBee module.

Since broadcast transmissions are retransmitted by each device in the network, broadcast messages should be used sparingly.

Your experiment, operating at the application level, essentially duplicates what the XBee ZB modules already do "under the covers" to accomplish mesh networking (although whether the algorithm is the same I'm not sure); see p57 in the product manual.

I might consider moving the experiment to a lower level. One possibility might be to write custom firmware for the XBee modules (product manual p11). Another might be to use a microcontroller that has built-in 802.15.4 capability so that you have full control over all transmissions, buffers, etc.

It also might be worth contacting Digi to get their input on the feasibility of your approach.

Thanks for your kind suggestion. Regarding with your question, as I described in my question, all the nodes are inside the range of coordinator. I'm tracing all the incoming packets from coordinator node and notice some of the nodes are not transmitting broadcast packets although i set my threshold to -90dB (lowest level). Regards, Nyein