2

I have a simple three XBee (version 2) node network consisting of one coordinator and two routers. Each XBee is connected to an Arduino. From my investigation I can send a message via the serial interface from the routers to the coordinator node.

On the coordinator I simply call:

while(xbeeSerial.available()){
    char c = xbeeSerial.read();
    ...
}

to read from the serial connection.

On the routers I send messages via the serial connection like so:

xbeeSerial.print(...);

My question is: is there a way to send a serial broadcast from the coordinator node out to the routers? Is it a matter of simply calling the .print() on the coordinator, or is there something else I need to do? From what I have tried simply calling .print() on the coordinator does not broadcast to the router nodes.

dsolimano
  • 8,870
  • 3
  • 48
  • 63
John Ericksen
  • 10,995
  • 4
  • 45
  • 75

1 Answers1

2

You should set PAN ID of all Xbee adapter to same value, so they can see each other. Then for broadcasting you should set destination address low to FFFF. Now you can broadcast to all XBees.

Detailed explanation: https://sites.google.com/site/xbeetutorial/xbee-introduction/zigbee_setup

I've done something similar before, just follow guide (specially setting unique pan id), you'll do it.

Vahid Farahmand
  • 2,528
  • 2
  • 14
  • 20
  • Great. Ill review the docs and let you know if I have any trouble. – John Ericksen Jan 26 '13 at 02:17
  • It seems I have taken a step backwards. After reconfiguring the coordinator and routers I am unable to send any messages between them. Trying to figure out whats wrong. – John Ericksen Jan 26 '13 at 20:56
  • have you set proper baudrate for both? – Vahid Farahmand Jan 26 '13 at 21:30
  • Ok, I seem to be back to where I can communicate between routers, but not from the coordinator out. My Pan ID is identical across all three xbees and the Router's DH/DL = 0/0 whereas the Coordinator's DH/DL = 0/FFFF and the baud rate is set to 9600 on each. Any ideas? – John Ericksen Jan 26 '13 at 21:56
  • and when you broadcast a message using FFFF as dest low address, just one of them receives message or none? – Vahid Farahmand Jan 26 '13 at 22:01
  • None of the routers receive a message transmitted from the coordinator – John Ericksen Jan 26 '13 at 22:04
  • Ah, I figured it out. It seems I was mistaking a broadcast from the coordinator for the message from another router. It seems it's all working ok after all. Thanks for your help. – John Ericksen Jan 26 '13 at 22:10