Tags: SERIAL3_BAUD, Telemetry, Xbee, baud

Permalink Reply by Michael Pursifull on June 11, 2012 at 6:17pm
Permalink Reply by TJ on June 11, 2012 at 6:27pm Mike, can you please elaborate? I think what your pointing out is that at 100% duty cycle Tx will never cease to allow the module to stop and listen. How can I slow the telemetry stream to get below 100% duty cycle of the xbee?
Permalink Reply by TJ on June 11, 2012 at 9:05pm Can anyone explain in detail parameters SR3_* or point to resources? I have searched deeply without success identifying them. Someone suggest they are refresh rate values for different telemetry data elements? I have tried various values 0,1,3,5,10 for several parameters. It seems to effect mission planner display speeds but to what extent and portions i'm not sure. Defaults are 0.
Permalink Reply by TJ on June 12, 2012 at 1:57pm More research and testing done now, I tried to get tech support on the phone, rep had no clue what I was talking about and asked me to inquire through e-mail so I have. Below I'm copying the email contents as to further explain the problem and steps taken to resolve. So I'm asking you the community to please help if you can.
Hi, I need some guidance getting the UART2 port working for telemetry stream on the APM2.
I'm sure you get this all the time.... "I have read the documentation", but I seriously have multiple times, and I suppose there is a chance I'm still missing the key piece of information to make it work.
The issue: I get data stream from Serial0 / SR0/ UART0 (which ever you prefer to refer to it as) , but I do not get any data on Serial3 SR3 UART2.
What I have done trying to get it to work:
First I excluded any possibility of issue with my wireless serial link with the xbees. X-CTU gives perfect range test 100% packet success in loopback.
I have cut the micro traces on the back of the board for UART0/2 automux and solder bridged the two pads as shown at the link below.
http://code.google.com/p/arducopter/wiki/APM2Wireless
I downloaded and opened in relax-patch arduino arducopter 2.5.5 and added to APM_Config.h (xbee XSC 900mhz @ 9600 bps)
#define SERIAL3_BAUD 9600
compiled and uploaded to APM2 without error.
When testing UART2/Serial 3 still no data output.
More research shows that in arducopter 2.34 support for UART2 was added based on the following post by a member of the development team:
http://diydrones.com/forum/topics/arduplane-2-34-released?commentId...
He suggest adding: TELEMETRY_UART2 ENABLED.
I dug up 2.34 notes pertaining to this at:
http://code.google.com/p/ardupilot-mega/source/detail?r=b44f92d3fe1...
Unfortunately I did not find these defines in 2.5.5 (regression?)
I tried to add the definition to 2.5.5 in APM_Config.h it compiles and uploads fine still no UART2 output.
Last but not least, I uploaded MultiSerialMega sketch and tested.
UART0/PORT0 = GOOD
UART2/PORT3 = FAIL (no output)
I just got my APM2 replaced due to a hardware problem (failed diode). Now yet another issue with the APM2.
Please don't point me towards using UART0 as its clearly defined in the documentation UART2 is usable. I would like the speed benefits of the USB/UART0 connection and a user configurable stream from UART2 for my xbee connection as defined with parameters from:
http://code.google.com/p/ardupilot-mega/wiki/MAVParam
Please advise.
Sincerely, Michael Jenkins (TJ)
Permalink Reply by TJ on June 12, 2012 at 5:44pm More desperate testing. It would appear that UART2 on the APM2 is not connected to Serial3 as all the documentation I have found says. I uploaded a simple arduino program that prints the text "Port X" to SerialX.println and well, it would seem that Serial2 is connected to the UART2 header pins on the APM2.
Serial3 is somewhere in la-la-land.
maybe they are switched somewhere in the code but I haven't found it yet.
Permalink Reply by TJ on June 14, 2012 at 5:20pm Two days, no telephone tech support, no reply to email. Called during their stated business hours, but telephone system says they are closed. Not much community input either :( All I would really like to know is if any of you have telemetry attached to APM2 UART2 connection with a user defined baud rate, user defined telemetry elements, and their refresh rates. Honestly, I don't think anyone does, the code is messed up for dedicated telemetry port.
I don't program, but I'm taking a stab at getting it working solo it seems.
Permalink Reply by Jim Kahl on July 5, 2012 at 4:25pm I'm in exactly the same place. I can't seem to find a way to enable UART2 for telemetry. I've also cut the micro traces and put the solder jumpers in place. This puts UART2 out on both the UART0/2 connector and the UART2 connector on the 'long' board edge. Please note however that the RX and TX pins are swapped on the V2.4.1 board on the board edge connector with respect to the UART0/2 connector. This also the case on the V2.4 board, but they are both the opposite of what they are on the V2.4.1 board.
I traced out the board, and you are correct -- serial 2 is UART2 and not serial 3 as reported. I found both the schematic and board layouts somewhere in the wiki, and you have to download and run EAGLE (Easily Applicable Graphical Layout Editor) in order to look at them.
I haven't yet learned how to edit or compile the code so the link that you posted in the message above is no good to me YET. But I will learn!! Let me know if you have any success. I haven't found any way using the APM Planner to enable UART2 Mavlink streams or adjust the baud rate yet - but I'm looking.
I'm running APM v2.6 Mavlink 1.0 code on an APM v2.4.1 board.
My goal is to use the OSD on UART2 on a full time basis, use USB for computer communication while at home, and use UART0 when in the field with a Bluetooth adapter to talk to my Android Tablet running Copter GCS to make in the field adjustments. The Bluetooth is only attached while making the changes and then removed. Since it's used in the field, USB and Bluetooth are never in use at the same time, so there's no conflict.

I am also interested in using UART2 on APM2 for a modem
I will be looking into this also, so please post any updates (I will too).
Can you specify explicitly: Have you tested this on ArduCopter, or ArduPlane?

TJ,
Is it possible that you are testing Arducopter and looking at notes for arduplane?
Above you said "More research shows that in arducopter 2.34 support for UART2 was added based on the following post by a member of the development team:
http://diydrones.com/forum/topics/arduplane-2-34 <--- arduplane, not arducopter)
It is possible a parameter exists in ArduPlane and not ArduCopter.
Hope this helps
Permalink Reply by Jim Kahl on July 5, 2012 at 8:22pm I'm not sure which device TJ is using, but I'm working with Arducopter. I noticed that the planner (v1.1.96) just added a setting for Baud rate on Serial port 3. It's always been in the parameters menu, and could have been changed there. I'm wondering if Serial 3 is where the data shows up on the Mega, and they're not addressing the fact that it's data shows up on Serial 2 on the APM2.0 Every reference in the parameters menu is for either Serial ports 0 or 3. From what I gather, serial 3 is actually UART2 on the Mega board - that's not the case on the APM2.0
I've only had this thing for a week, so I'm not quite up to speed yet - but it seems to me that someone is missing something very elementary. I need to get more involved in the code, but I'm not quite sure where to start yet.
I've got the entire system mocked up on the bench, including the camera gimbal, and I'm using 4 servo's to emulate the ESC's to make sure that they are responding correctly. So far so good with all of that -- it's just this Port 2 thing that's holding me up.
Permalink Reply by TJ on August 14, 2012 at 5:47pm I am now using arducopter 2.7.1 on APM2 and still don't have telemetry working
I too have seen the Serial3_BAUD parameter in the list as well as standard parameters in the mission planner. Serial3 just does not seem to physically exist on the APM2 :(
If one uses the multi serial mega sketch or write a simple test code yourself you will find that Serial2 writes to UART2 perfectly fine. The issue lies in redirecting Serial3 data to Serial2 which I was not able to accomplish.
Permalink Reply by Jim Kahl on August 14, 2012 at 6:22pm Sounds like we're both on the same path and have drawn the same conclusions. Like you, I also mistakenly took some of the Arduplane comments as belonging to Arducopter.
If Andreas is still monitoring this thread, maybe he can let us know if anything is ongoing regarding getting this working on Arducopter UART2. I've looked at the code and it looks foreign to me. I'm an old school assembly language programmer, and I guess I need to retrain myself!
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.183 members
1280 members
87 members
673 members
24 members
© 2013 Created by Chris Anderson.
Powered by
