Cube Orange: MAVLINK over GPS2 port problems

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.