Arduino Mesh Zigbee Network

I want a number of arduinos to talk to each other. However, I don't want a centralized controller and I want every arduino to hear everything said by the other arduinos. I'll have them parse the serial message and act accordingly.

My problem is that most zigbee examples I've run across are either point-point or else everything only talks to the controller and the controller only can talk back.


While there is probably an easier solution, you could try rolling your own using either a 433 MHz or 900 MHz tranceiver on each Arduino. Basically, once you have them hooked up and verified working, your code would be something like (bug-filled pseudocode ahead!):


  read tranceiver data
  if available then parse()

  decode data:
    get TX address
    is it meant for me? (RX address decode)
    if so:
      read DATA and checksum
      if they match:
        send ACK back to TX address, then act on data  
      otherwise do nothing (or send NACK?)

  do I have data to send?
  if so:
    send the data out
    listen for acknowledgement
    ACK received?
      if yes, then return
      if no (NACK?), wait random() time, then re-send

Alright - the above needs a lot of work done to it (and likely won't work as "coded" in the 30 seconds I took), but the basics are to set up a send/receive network with simple collision detection and resend capability; you would probably need to use interrupts on the receive end, and need to implement some simple buffering on each node to (hopefully) handle that data correctly; basically each node broadcasts the data to all the other nodes in a packet of "TX address, RX address, DATA, checksum", and each node listens for data, gets it, decodes the RX address, and if it is theirs, acknowledges it (or if checksum mismatch, does nothing or sends NACK back to TX address)...

No idea how well (or even if) this scheme would work, but in theory it should...

Hope this helps (you or someone else)...


If you set the xbees to all be in serial mode they will all receive the same msg.

I did this with 3 v1 xbees.

Thanks. I'll work on implementing your suggestions into my code.

Note I've got V2 Xbees