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 ?
Comments
@Scott: I used two at the same time for HIL simulation. Instead of using uart0 though i used the usb(they both are muxed internally, so it really doesn't matter which one you use).
Hi Bharat,
Thanks for your notes :) I just enabled my telemetry on UART2. I am going to use soldered pins in UART0 & UART2 available on the side of APM2.5 to have two telemetry links at the same time for my project. Did you use them at the same time? I am not sure on this yet. Thanks again.
As guided by Bharat, we do not need to cut the mux pad. Instead, just add in the code
#define TELEMETRY_UART2 ENABLED
into apm_config,h through arduino IDE
did any body solve this issue??
Awesome! Thanks for sharing... I will give that a try as soon as possible.
SOLVED:
Probably the only permutation of UARTs, TELEMETRY_UART2 ENABLED and AUTOMUX jumpers(solder bridge) I missed last night, and it worked!
To enable telemetry on UART2, Do Not make the solder bridge connection on AUTOMUX pads, keep it as it is when you bought it (Upper two connected, lower disconnected).
But, Do Not use the stock firmware that you upload using mission planner, insted open Arduplane in arduino1.0.3 and in AP_config.h add
#define TELEMETRY_UART2 ENABLED
and burn the code onto the board. Now, connect your Xbee to UART2 port on the board(not UART0/2) and walla! connection complete.
In hindsight, I guess the confusion was created because
-APM Google code wiki here suggests to disconnect the upper two pads and connect the lower two pads for UART2 telemetry
-Even in the Arduplane v2.68 firmware, there is a suggestion to create new Automux solder bridge
// 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
If you do not create the solder bridge, ENABLE telemetry_uart2 and use uart2 port for xbee, it works!
[It works because only after you #define TELEMETRY_UART2 ENABLED we get USB_MUX_PIN = -1, and only then we get
Serial3.begin(map_baudrate(g.serial3_baud, SERIAL3_BAUD), 128, SERIAL_BUFSIZE);
gcs3.init(&Serial3);
]