- Thu Oct 21, 2010 12:23 pm
Elaborating on Waltr's comments
I do star by not using a PAN coordinator nor association messages, etc.
Use the XBee API mode interface to the serial port. Your code wraps data in the well documented Digi API packets that begin with 0x7E. And gets response packets saying transmit done with success, and new packet received from what MAC address and at what signal strength.
So this is peer to peer. Like 802.11's ad-hoc mode. Any node can talk to any other node using the 64 bit IEEE MAC address that's in every XBee.
You can decide that one XBee is the hub of the star and design all others to talk only to that node. It's still peer to peer but by policy, all nodes talk to one, if you wish. You can have the central hub node send a periodic broadcast (not a beacon) to advertise "I'm here". That way, other nodes can discover it and its MAC address. And there could be several such advertising nodes. Some or all of these kind of nodes can gateway to a PC or WAN.
So with this, every XBee is a full function device. Uses 64 bit addressing, no PAN coordinator, disable association, and so on.
It's often more reliable as the chatty messages for association aren't needed, and this is important with weak signals.
Optionally, nodes can relay/retransmit.
the idea is to keep it simple. No mesh protocol like ZigBee and no PAN coordinator or short 16 bit addresses which are DHCP-like.