Hi everyone,
I am part of a UAV team here at the University of British Columbia and we are having some strange issues with the xBee pro modules working with APM 2.5.
I have attached a video of what is going on here: https://www.youtube.com/watch?v=_jB9EkAnbTg&feature=youtu.be
Basically we have been able to narrow the issue down to one repeatable problem. When the xBee is disconnected from the APM, we are able to communicate with it perfectly fine and have thrown messages back and forth between several devices (arduino's, pc's, etc) with no trouble, however when we connect the APM 2.5 TX/RX lines everything changes.
With the APM TX connected the xBee seems to shut down and stop transmitting anything, however, the moment the serial line is disconnected it starts to transmit, even without data coming into it's RX pin. Additionally, the data being transmitted is just garbage as seen at the end of the video.
Here are some tests we have done:
- We can communicate to the APM fine via USB
- We can communicate to the xBee fine via USB
- the xBee works to transmit and receive messages as tested between several computers and arduino's
- The pin connections are correct, APM tx -> xBee rx, xBee tx -> APM rx.
- Voltage input to the xBee and APM is stable and enough power is being provided (tests performed using lab power supply unit)
- We have tried powering the xBee from the APM as well as independently
- Baud rate for APM, xBee, and Putty are all set at 57600
Has anyone had any similar issues with the APM 2.5 and xBee? We would greatly appreciate any help anyone can offer.
Cheers,
James
Replies
James,
I am a part of a similar team here at Wright State University. We are also trying to use XBee, specifically XBee S2, 2.4MHz (low range, high airspeed). I have also performed all the tests you mentioned and it all fails when we connect XBee to APM2.5 Moreover, we also tried to connect to UART2 (PORTC - we are using the HAL libraries) and still no luck. In fact when I try to look at the buffer I can only see up to three bytes of data, everything else gets dropped. As I said we use the HAL libraries and issue the command hal.uartC->available(). I've been running my comm @115kbps. Currently we are looking at other options - excluding 3DR Radios.
Have you found anything else or made any progress with the XBee?
Perhaps, we can collaborate on this, since it appears we are trying to solve the same problem.
Sincerely,
Remus
Hi Remus,
We actually found a solution to the issue, it turns out that there are baud rate settings for each of the different UART outputs of the APM, however these are hidden away in the huge list of settings in Mission Planner. Once we found these settings we discovered that the settings for UART1 and UART2 were not the same as UART0. Once we changed the baud rate for UART1/2 to match the xbees everything started working fine.
James
James,
I'm glad for you. I should have mentioned that we can send out messages from APM 2.5 via XBee but we can't receive. Although our approach is more raw than yours (we don't use mission planner or any other GUI) I'd like to try out our setup in your configuration. Thus, would you be kind enough and tell me exactly what soft-/ and hardware you are using.
What series APM and XBee. What software versions are you using? Also what was the name of the setting in Mission Planner that you changed. etc.
Thanks in advance,
Remus
Hi, you have to disconnect the usb cable. You can't have the Xbee and usb connected at the same time as they share the same port.
You need to power up your APM with a battery when you have the Xbee connected, don't power it with the usb cable.
Hope this helps
Martin
Hi Martin,
We have tested with and without the USB cable connected as well as by powering the APM and xBee from both a battery and DC lab power supply with no change in the issue.
Thanks,
James