Hi all. I've set up an APM on the bench and most things are working as I want them: stabilization, manual control, two aileron servos, GPS, setup etc. However, telemetry is not working as I'd hoped. I can get telemetry to work fine over USB but it totally fails when using the Port 3 XBee telemetry link.I'm using QGroundControl and also the Arduino IDE's Serial Monitor function and in both cases, telemetry data streams from the APM to the computer. The strange thing is that data streams over the USB _despite_ the following settings in APM_Config.h:#define GCS_PROTOCOL GCS_PROTOCOL_MAVLINK#define GCS_PORT 3#define DEBUG_PORT 3Why is data coming in over the USB port when I've compiled it specifically to stream over Port 3? Furthermore, why is the USB telemetry good for QGroundControl but not the XBee telemetry?Any leads on the cause of the strangeness? Any tests I should perform before diving deeper into the code?Configuration info:APM hardware second rev (V1.2?, not the 1.0 version)APM software V2.24QGC V0.9.0 build 4 alphaDIYDrones XBee carrier on APM sideSparkfun USB <-> XBee board on the PC sideUsing 2.4 GHz modules for bench testing. They seem solid - I can program arduinos over the air with these XBees on other configurations.Thanks again,FM

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

Join diydrones

Email me when people reply –

Replies

  • Hi all. I was able to get XBee telemetry working, but I had to change XBee modules.

    I first tried hooking an FTDI cable (TTL-232R) from the PC's USB to the Serial 3 connector but that was a non-starter, probably because of the differences in signal levels. Mine uses TTL level (5V) for signals, not 3.3 as in the case of the one sold on the DIYDrones store. I hope I didn't damage my APM hooking this one up.

    Next, I put an XBee Pro XSC on the Xbee carrier in the airframe and a second XSC on another XBee carrier and connected it to the FTDI cable. Note that with XSC modules you need to set the DT (destination) to be identical on both modules in order for them to connect, which is different from how you set up S2.5 modems.

    Anyhow, this configuration seems to work fine. I can refresh and update parameters in QGroundControl, which I wasn't able to do before.

    I need to get a second 900MHz antenna (I only have one with the correct gender) before I can do any reasonable range check. I'm also going to start with very low refresh rate for downlinked data, so as not to overrun the link's bandwidth.

    Cheers,
    FM
  • Latest (git) version of ArduPlane exhibits the same results: I'm able to get telemetry over XBee but can only get commands (such as to refresh list of parameters) over USB.

    Next I'll try a more recent version of OGC and finally a different XBee link.
  • Thanks for the suggestions, Andre. I think there are some issues with my XBees and I can do a few more tests. I think I can dig out an FTDI cable to test.

    I was able to get partial telemetry over Xbee. Clearly not all the packets are getting through but I'm able to monitor the position, sensors etc. I can't send/receive commands, however.

    Next I'll try the latest git version of ArduPlane and (if that doesn't work) the latest QGC.
  • I conducted a few more tests. The xbee loopback test (using X-CTU on the PC with the Tx/Rx pins on the APM-side XBee shorted) works fine. Also, running the MultiSerialMega.pde test I get "Port 3" reporting just fine in the Arduino Serial Monitor. Clearly the XBees are mostly working.

    However, if I leave the Tx/Rx pins connected to the XBee and run the "test/xbee" mode in the CLI, I get no packets bounced back. Is this mode supposed to be functional?

    An additional discovery I made while digging in the code, is that setting GCS_PROTOCOL to anything other than GCS_PROTOCOL_MAVLINK results in a stubbed out gcs object, which explains why I get no GCS data at all with the other settings.

    Is anyone else able to get QGroundControl connected to the APM over XBee? If so, what source code version(s) are you using? Any other configuration data I should be aware of?
  • Ah. That reveals the problem as being more than just with the QGC configuration. Mission Planner was unable to connect to the APM over Xbee as well. Back to scrubbing through the XBee configuration for potential errors.

    I just now note that the XBee range test fails (no packets). Will report results (hoping I have some to report...)
  • Yes, I've double-checked the baud rate, and even tried all the other baud rates to be sure.

    #define SERIAL3_BAUD 57600

    Another strange difference between ports 0 and 3 is when I run QGC I can set the update rates of the various values using the Calibration and Parameters widget. I've set them to 1Hz, for testing, with the USB link and get them all streaming in. When I set the link to XBee, I used to get just a few of the parameters streaming in.

    As a further test I did an EEPROM reset and setup again. Now I get nothing streaming in at all over the XBee link, in addition to QGC not actually linking up with it.

    Another test: when comparing the volume of data streamed over the links, USB vs XBee, there's a major difference in the volume. The USB link blurts out packets, once per second that seem to be on the order of 150 characters long. The packets of XBee, also once per second, come in at about 5-10 characters long. Clearly not the same data is being transmitted over XBee as USB.

    Does that give you any ideas?
  • Thanks Chris. I didn't know that.

    So, why is QGC not able to link up with the APM over Port 3 when it works fine over USB?

    I'm not sure if it's related, but I did try compiling with GCS_PROTOCOL set to GCS_PROTOCOL_STANDARD, GCS_PROTOCOL_LEGACY and GCS_PROTOCOL_SPECIAL. The output results seemed to be the same. Perhaps a precompiler error?
  • As another detail, telemetry seems to be streaming over both the USB and the XBee link. Well, something is streaming - I'm not sure it's telemetry!

    FM
This reply was deleted.

Activity