Home/Support/Support Forum/Xbee to Arduino setup is only communicating one way

Xbee to Arduino setup is only communicating one way

0 votes
Hi,

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?

Thanks for taking the time to read this.
asked Aug 4, 2016 in RF Solutions and XBee by acuteangle New to the Community (2 points)

Please log in or register to answer this question.

4 Answers

+1 vote
If modules works same way after swapping then its clearly not an issue with modules.

You can also rule out serial settings (baud rate, etc) mismatch because it would affected affected communication both ways.

Can you check if you are connecting correct pins on XBee and arduino?
answered Aug 5, 2016 by asgm Veteran of the Digi Community (1,499 points)
Yes, I'm sure that the shield is correctly placed on the Arduino since all the pins line up. The XBees are also all facing the right direction.
+1 vote
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.
answered Aug 5, 2016 by mvut Veteran of the Digi Community (12,760 points)
Well, I was using transparent mode since I am only using two devices. I was also using the sample code from the Sparkfun shield hookup tutorial (https://learn.sparkfun.com/tutorials/xbee-shield-hookup-guide?_ga=1.203284370.2012501172.1469800289). I tried communicating using API mode, but I was unable to communicate at all in that mode.
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.
0 votes
Did you ever solve this? I am working through this exact issue right now. -Thanks!
answered Feb 27, 2017 by bloney New to the Community (1 point)
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.
0 votes
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.
answered May 19 by 21zhengj New to the Community (2 points)
...