Cube Orange: MAVLINK over GPS2 port problems


first of all I am new to this so please be gentle with me :wink:

Secondly what I would like to achieve is to transfer MAVLINK data between Cube Orange and my PC over Microhard pMDDL2450 radio module.

I have managed to configure radio modules for serial transfer so with this I have no problems. I am aware that Cube serial is TTL level and Microhard is RS232 level so I am using RS232/TTL shifter in between. This connection is working as I connected a GPS module with TTL output directly (trough RS232/TTL shifter of coarse) to Microhard radio serial and I get the data on the other end (with Microhand connected to PC over USB to Serial adapter).

The problem is I can’t seem to get the data from Cube Orange GPS2 serial port (or any other serial port besides serial0 (USB)).

So first of all I would like to clarify if I made the correct connection. All I could find about port pinouts was this site: So I used this section as if understand correctly GPS2 is on serial4:

SERIAL 4/5 port - due to space constraints two ports are on one connector.

| Pin | Signal | Volt |

| 1 (red) | VCC | +5V |
| 2 (blk) | TX (#4) | +3.3V |
| 3 (blk) |RX (#4) | +3.3V |
| 4 (blk) | TX (#5) | +3.3V |
| 5 (blk) | RX (#5) | +3.3V |
| 6 (blk) | GND |GND|

With connected TX, RX and GND.

Next I connected Cube to PC over USB cable and opened Mission Planner (MP) to set the serial for MAVLINK. So I’ve set SERIAL4_BAUD 57, SERIAL4_OPTIONS 0 and SERIAL4_PROTOCOL 1. Then I also set the SRn parameters (I copied what was in SR0 to all the others as I know serial0 is working fine and I get data form it). I know how SR parameters are working regarding serial interface, but as I was experimenting with different serial ports I set them all to SR0 values. Now as far as I am concerned this should be all I need to do or am I missing something?

Next thing I did was to connect the Cube to PC over TTL to USB adapter (which I first checked with previously mentioned GPS to confirm it is working) to see if I get any data out. Opened the serial port with Hercules Setup Utility to see if I have any data flowing in. And I have no data coming over to my PC (If I connect to MAVLINK port with Hercules I get data out so it should work). Then I tried to connect to same port with MP and had no luck also.

As I didn’t get any data out I tried swapping RX/TX pins. Both physical and later with SERIAL_OPTIONS. I tried setting RX/TX PullUp. Nothing resolved the issue.

Also tried everything with GPS port (serial3) as I connected GPS to it and I know the port is working.

And this is where I am stuck. So my questions are:

  • is the pinout used correct?
  • are the settings OK or do I need to enable anything else?
  • do I maybe need to initiate MAVLINK data stream with some command (what I learned in the process setting SR parameters should do that, but I might be wrong)?
  • I am wright to assume I can connect to Cube with MP over other serial ports, besides serial0?
  • what else can I try? Any guidance would be helpful.
  • what am I missing?

Mission Planner version used: 1.3.72 build 1.3.7463.24854
Cube firmware: ArduCopter V4.0.3 (ffd08628)

Thank you all in advance.

You may check the pinout from here:

The ports are the same except serial 5 is reserved for ADSB on ADSB carrier boards.

SERIAL 4/5 ports are not on the same connector. You may have a look at the GPS2 pinout

As far as I know you don’t need to set SERIAL_OPTIONS in your purpose.
Why do you need to connect to MP through serial 4? Why not use the usb extender cable?

HI Alvin,

thank you for your response. From the link provided I see that the first portion of GPS2 port is the same. So serial 4 pinout should work for me as it is. SERIAL_OPTION was changed only to see if it makes any difference. My first thought was also that there is no need to change options. Connecting to MP through serial 4 is just for testing, to see whether it is working or not. I was just wondering if I connect one radio module to Cube and the other to PC if I can then connect to Cube in MP over the radio module. Is this possible or is connecting to MP limited to serial 0 port.

Anyway I will try switching to TELEM2 port to see if I get any luck.

OK. Got this setup working now.

TL;DR: It was a hardware problem. RS232 to TTL level shifter was to blame.

I first tried TELEM2 port and had no luck. Then I decided to look the output signal of Cube on oscilloscope and there was indeed some traffic. Checked the RS232/TTL to USB and noticed that there was a 5V on TTL port. Looking at pinout it should be 3.3V. So I changed connection from Cube to RS232/TTL to USB from TTL port to RS232 port, with MAX232 (RS232 to TTL) chip in between. First powered the MAX chip with external 3.3V and it worked. Got the data flowing to my PC. Next I tried powering MAX chip with 5V from Cube. Also worked as it should. So there was a hardware problem. Probably pull-up was to strong at TTL to USB translator.

Then I tried the same for GPS2 port and it also worked :slight_smile:

And to answer my own questions:

  • pinout used for serial 4 is correct
  • settings that needs to be set are SERIAL4_BAUD xx, SERIAL4_PROTOCOL 1 and appropriate SR parameters.
  • no need to initiate MAVLINK data stream with some command. Setting SR parameters will do the job.
  • I can connect to Cube with MP over other serial ports. If correctly set I can connect even through radio module (baud rate must be set at the same speed).

What I also learned in the process is that swap pin on TELEM2 port doesn’t work on my Cube. Also INVERT_RX. Didn’t check other ports so I have no clue whether it works there or not. And also after parameters are changed and written to Cube one has to restart the Cube in order the changes are applied.