Being able to connect to PX4 via Serial is essential for development. It allows you to run individual apps in PX4 and it provides a straight forward interface for debugging. I have successfully connected to a HK Pilot 32 using a FTDI breakout adapter in Ubuntu, and here is how I did it.
A quick summary:
- Connect FTDI cable and USB cable
- Install putty, launch and configure
- Run some applications
1. Connect FTDI cable
PX4 serial connection works a bit different than Ardupilot. If you connect your Pixhawk to the computer via a micro USB cable, you will only see gibberish in the console. The correct way is to use the serial port on Pixhawk and connect to the computer via a FTDI cable. A FTDI cable is something like this:
The breakout adapter is the same as the cable, except you need to bring your own micro USB cable to connect it to the computer. The tricky part is to get the pin out match correctly.For the serial connection you only need three wires, the RX, TX and GND.