Search code examples
arduinoxbee

Indirect Connection with Xbee S1 and S2


I had a miscommunication and thought I could connect S1 and S2 via radio. I now have like 6 XBee S1 and 4 XBee S2. I was trying to figure out what I could do to try to make them share the same data.

So I found out that Arduino Mega has multiple serial port, so, if I connect an S1 module to the Serial port 1 (Rx to Tx and Tx to Rx) and an S2 module to the Serial port 2 (Rx to Tx and Tx to Rx) from Mega and program it correctly, can I have the data from a S1 network to a S2 network ?

My idea was trying to make an S1 end device send wirelessly data to the S1 coordinator connected to Arduino Mega, and Arduino Mega sends the same data to a S2 Coordinator connected to itself that sends the data Wirelessly to another S2 module.

So, should this work or am I missing something? Not sure if I'm clear on what I mean, feel free to ask.


Solution

  • No reason you can't have two separate radios on a single device. Just be sure to configure them with different 802.15.4 channels to avoid interference. Your Arduino Mega can access both networks and can choose to handle data in whatever way you please.