I am trying to control a robot wirelessly using XBees. I am using two XBees of the function set Xbee pro 900HP and the product family XBP9B-DPST-001. I have one XBee connected to my laptop via a USB dongle, and the other XBee is connected to an Arduino Mega via an Arduino Wireless SD shield (which is a retired shield). I also connected my Arduino mega to my laptop using a USB cord to power it (I’m planning on using an external battery once I have it communicating correctly).
I’ve been trying to get them to communicate on X-CTU. The problem is that the connection is only one way. I can send data from the XBee attached to the Arduino and receive it in the XBee attached to my computer, but when I try to send data in the opposite direction, the XBee attached to the Arduino never receives it.
I’ve tried configuring the XBees to default values, and I’ve also tried configuring the destination addresses to match up with the serial numbers (the XBee pro 900hp doesn’t have a source address parameter). I’ve also tried turning flow control on and off. I feel like I’ve tried every possible combination of configurations, but I always get the same problem. The Arduino XBee is not receiving any data.
I know that there’s nothing wrong with the XBee itself since I’ve switched them with the same results. I’ve also tried swapping my Arduino Mega for an Arduino Uno, and I’ve tried using a different XBee shield, but I always get the same result.
Is there something extremely obvious that I’m overlooking?
Yes, most Arduino Codes for the XBee want the XBee in API mode. Are you using API mode at all? If so, make sure on the PC side that you are using transparent mode otherwise you need to assemble the proper API frame in XCTU and then send that frame for the data to be sent.
If you use API mode on the base side or PC side, you can then use the Remote Configuration function of XCTU to both Discover and modify settings on the remote module. By doing that you can verify that the two radios are talking to each other.
Once verified, you can take the PC side out of API mode and send data. If your arduino does not respond, then it is most likely something in the code.
If I remember correctly, it turns out it was an issue with the shield. I never figured out how to use the shield correctly and I ended up ditching it and soldering the XBee onto the back of the Arduino using jumper wires (power, ground, and signal). This worked fine for my purposes but it’s no help if you want the capabilities of a shield. If you can’t get the to communicate even on XCTU then I recommend resetting them both to default values.
How were you able to have the XBee attached to the Arduino transmit data? I’ve been able to have that XBee receive data, but everytime I attempt to transmit a package I get the error “Failed to send packet. Status: 0xFF” in Arduino serial monitor.