3689498983?profile=original

Here is an ordered list of my actions to see how I can get my Xbee running on APM2.5.

Xbee is Xbee Pro 2.4ghz S1, Firmware is  XBP24 version 10EC, all defaults except baud = 57600

-Unzipped brand new APM 2.5 from plastic packaging, looks good!
-Cannot see the board version from the black protective cover
-Connected to the windows laptop via USB
-Mission planner v1.2.30 mav 1.0, APm shows up as COM24, baud 115200
-Upload firmware Arduplane v2.68 form Missionplanner
-Upload done, connecting to Missionplanner via same port(COM24, baud 115200)
-Connect done, Hud shows correct attitude

-Disconnect Mission Planner, Disconnect USB
-Board is now powered off
-Two Xbees, S1 Pro, transparent mode, baud rate 57600, communication verified on laptop(Docklight)
-Connected 1 Xbee to the telemetry port shown on the APM2.5 board(Telem. port on black Protective cover, UART0/2 on the board, TX-RX, RX-TX, 5v-5v, Grd-Grd)
-Powered the board with the adapter provided (JP1 is still not connected)
-Board powers on, leds blink(gyro calibration led dance), xbee powers on
-Connect Mission planner with groundstation Xbee COM port, baud 57600, TIME OUT, not connected.
-Verified that no data is coming on groundstation xbee using Docklight
-Board Power off
-Connected FTDI (TX-tX, RX-RX, Grd-Grd)
-Powered the board with the adapter provided (JP1 is still not connected)
-Connected Mission Planner, FTDI COM port, baud 57600, CONNECTED!
-Connect done, Hud shows correct attitude

Conclusion, correct MAVlink data comes to the UART0/2 port but is somehow NOT WORKING with Xbee.
---------------------------------------------------------------------------------------------------

-Removed Black Protective cover of APM2.5
-Soldered pins in UART0 & UART2 available on the side of APM2.5 (v2.5.1, now that i can see it)
-Connected Xbee on UART0
-Powered the board with the adapter
-Connect Mission planner with groundstation Xbee COM port, baud 57600, CONNECTED!
-Connect done, Hud shows correct attitude

Conclusion, correct MAVlink data comes to the UART0 port and WORKS with Xbee.
-------------------------------------------------------------------------------

In search of UART2 for telemetry
-Board Power off, Xbee disconnected
-Cut the two wires connecting the upper pads of AUTOMUX, soldered both the lower two ones.
-Short tested to verify the solder connection.
-Connected Xbee on UART0/2 port on APM (TX-RX, RX-TX, 5v-5v, Grd-Grd)
-Powered using the provided Adapter
-Board On, leds dancing, Xbee powered
-Connect Mission planner with groundstation Xbee COM port, baud 57600, TIME OUT, not connected.
-Verified that no data is coming on groundstation xbee using Docklight
-Board Power off
-Connected FTDI (TX-TX, RX-RX, Grd-Grd)
-Powered the board with the adapter provided (JP1 is still not connected),Board On, leds dancing
-Connected Mission Planner, FTDI COM port, baud 57600, TIME OUT, not connected.
-Verified that no data is coming to UART0/2 using Docklight

Conclusion, no data comes to the UART0/2 port with AUTOMUX upper ports disconnected and lower ports connected(stock Arduplanev2.68 firmware).
--------------------------------------------------------------------------------------------------------------------------------------------

-Connected Xbee on UART2
-Verified No data coming on UART2 port as well.

-Connected Xbee on UART0
-Connect Mission planner with groundstation Xbee COM port, baud 57600, CONNECTED!
-Connect done, Hud shows correct attitude

-Connected USB on USB port, Xbee on UART0
-Powered using USB
-Does NOT CONNECT with Xbee on UART0
-CONNECTS with USB after 30 seconds, but the 'Connecting MAVlink' window does not disappear, disappears only after i disconnect the Xbee

Conclusion, With stock Arduplane v2.68 firmware, with AUTOMUX upper ports disconnected and lower ports connected, No data comes to UART0/2
port, No data comes to UART2 port, correct MAVlink data comes to UART0 port, Xbee connects on UART0 port, but, with USB connected, Missionplanner
only connects with USB, no UART0.
---------------------------------

Meddling with the Arduplane v2.68 firmware

-Downloaded the 'modified' Arduino 1.0.3 software and Arduplane v2.68 from APM google code page
-Created a sketchbook with Arduplane Libraries folder and Arduplane folder
-Set the sketchbook folder as default in Arduino firmware
-Open the sketch, Arduplane.INO
-Select Tools, Board, Atmega2560
-Compile, compiles ok.
-Paste this in APM_Config.h

// use this to enable telemetry on UART2. This is used
// when you have setup the solder bridge on an APM2 to enable UART2
#define TELEMETRY_UART2 ENABLED

-Save, Compile and Upload through USB
-Successfully Uploaded.

Now,
-Disconnect and Reconnect the USB
-Board on(Red LED Alive), no calibration Dancing LEDs!
-Connect Missionplanner using USB COM port
-Starts connecting, Getting parameters, STOPS in the middle of getting parameters!, hangs and then connection FAILED! (Multiple attempts, same results!)
-Random'ish data comes on port UART0 and UART2 at very low data rate. The only LED on is the Red ALive LED.

Conclusion, with firmware modified to TELEMETRY_UART2 ENABLED, with AUTOMUX upper ports disconnected and lower ports connected, Mission Planner stops connecting
on USB port, random data on UART0 and UART2 port. Additionally, abnormal LED behaviour. (So revert back to standard firmware)
-----------------------------------------------------------------------------------------------------------------------------

Major setback: Just enabling #define TELEMETRY_UART2 ENABLED in arduino seems to be stopping proper telemetry everywhere!


So, long story short, can anybody tell how to enable telemetry on UART2 on APM2.5 ?

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Hi Bharat,

    Thanks you very much for your complete and instructive troubleshooting guide! :) I can set up my Xbee system as it follows:

    -APM 2.6.1 (Fairly similar to APM 2.5)

    -Arduplane firmware V3.2.3

    (In the airframe):

    ============

    Xbee ZB Series 2 in Router AT mode, plugged in a XBee Explorer Regulated (WRL-09132).

    3702002785?profile=original

    I connected the pins between the Xbee Board and the APM 2.6.1 in UART0; as it follows: 

    GND-GND , 5V-+5V , DOUT-RX0 , DIN-TX0

    3702003050?profile=original

    I powered the APM with +5vdc through the upper rail because cannot power the APM using the USB port since telemetry also uses the UART0

    (In the CGS station):

    ===============

    I connected a XBee Pro 63mW RPSMA - Series 2B (ZigBee Mesh) model XBP24BZ7SIT-004, alias "CGS XBee", plugged into a XBee Explorer USB (model WRL-08687)

    3702003056?profile=original

    Tha CGS XBee was configured as a Coordinator AT in the ZigBee diagram, since the ZB Series 2 requires that one of the Xbees would be a Coordinator. By default ths XBee comes configured as routers AT.

    With the last X-Ctu Version 6.1.3, I configured the XBee's parameters (Baud rate = 57600, equal PAN ID for both Xbees and crossed DH and DL for unicast communication)

    Finally after pretty struggling with the APM and XBees I succeeded :D... I didn't configure UART2 just made it with UART0. Thanks to everyone!

    In order to properly configure the XBees Series 2 in peer-to-peer mode, I used this tutorial:


    http://adventuresinarduinoland.blogspot.com/2012/09/simple-xbee-zb-...

    Simple XBee ZB (Series 2) P2P Communications
    Some folks have difficulty using the XBee Series 2 modules (now called XBee ZB ) for simple point-to-point communication in transparent (AT)...
  • Bharat,

    Awesome job, thank you! I'm struggling with connecting Xbee to APM 2.5.2 (firmware is ArduRover 2.45), and your article is like a breath of fresh air :-)
    I have checked with oscilloscope that the data comes out of UART0/2 port, with 5v amplitude. But as soon as I connect Xbee to it, the signal on Tx pin of APM becomes rock solid 3.3v. Since you say that it works with side UART0 pins (I haven't tried it yet), the schematics of UART0/2 must be flawed.
    Did you find a way to connect Xbee to UART0/2 port, or should I solder side UART0 pins?
  • Scott and Bharat,

    Thank you for your fast answer! I will follow your advices and keep you updated.

    Ernesto

  • Hi Ernesto,

         You also can check the following discussion("Setting UART2 on the APM2") on the forum, then you will get more understanding on how to enable UART2 on APM.

    Set uart2 on apm2.

    Scott

  • Hi Ernesto!

    This guide used ArduPlane, not arducopter. I remember there was a slight 'missmatch' between the 'config.h' files of ArduPlane and ArduCopter. You are right, in your current state the setup will ignore  #definee TELEMETRY_UART2 ENABLED. This is because the config.h file of ArduCopter does not change USP_MUX pin based on TELEMETRY_UART2 like it does in ArduPlane.(Just see how its done in ArduPlane config.h file and replicate those changes in ArduCopter's config.h file). After you make the changes for your USB_MUX pin value (it switches between -1 and 0 or 1 depending on whether UART2 is enabled or not), see the system.pde file. It initiallizes gcs on halA and halC (halC is UART2). Just make sure the if else conditions (which use USB_MUX value) are such that you also initiallize gcs on halC.

    Hope you know what you are doing. Do verify using HILS.

    All the best!

    Bharat

  • I am trying to use the usb port and the telemetry at same time. I did what you instructed here: add in to my APM_config.h the instruction #define TELEMETRY_UART2 ENABLED, I did not cut the internal pads as suggested in http://code.google.com/p/ardupilot-mega/wiki/APM2Wireless, following the suggestions in this thread.

    Then I connected my Xbee module to the UART2 port, I try to connect with the mission planner with out  success, the I connected back the Xbee to the UART0 port and it was still working. Seems that the code is ignoring the  #definee TELEMETRY_UART2 ENABLED instruction, I am using ArduCopter V2.9.

    Any ideas?

    Best regards

    Ernesto

  • I am using 'ArduCopter V2.9.1-dev' version of arducopter.I have made changes in the arducopter code to make it working for cooperative control, so I have included APM_Xbee.h file. I am able to get data on UART2 port of APM 2.5 without XBee connected, but when Xbee is configured in API mode and used I am only able to connect it using Mavproxy but I am not able to get sensor readings in Qgroundcontrol.What shall I do?

  • I got it working two. You don't need to cut the jumpers. you just enable UART2 by adding the following line to the APM_Config.h:

     #define TELEMETRY_UART2 ENABLED

    and solder the UASRT2 pins on the sides and use them. Now, you have UART0/2  muxed internally. 

  • please I am a beginner and I have http://store.fut-electronics.com/Zig-11SHD006.html
    can i connect it to APM 2.5 using ordinary telemetry cable for the APM 
    i am using xbee http://store.fut-electronics.com/11XBp24bZ7pIT-004.html

  • Thanks, Bharat. I got the USB and UART2 working at the same time. Only difference is on the baud rate: USB/UART0 on 115200, and UART2 on 57600.

This reply was deleted.