Yes, you can use the raspberry (with the companion image) RX and TX pins to communicate with the pixhawk, it’s just necessary to configure http://192.168.1.195:2770/mavproxy, and change the master line from: --master=/dev/serial/by-id/usb-3D_Robotics_PX4_FMU_v2.x_0-if00,115200 to something like: --master=/dev/ttyS0,115200.
It’s also necessary to enable the serial driver, to do that, you’ll need to connect via ssh or with the browser terminal (http://192.168.2.2:8088/) and add enable_uart=1 at the end of /boot/config.txt file.
Only additional thing I had to do was changing the baud rate of SERIAL2_BAUD to 115200 (was 57600) and activating the serial port of the RasPi with “sudo raspi-config”.
…ok, disregard that solution, found out the stream rate is negotiated between GS and AP automatically for the port actually used.
Question remains why the communication is lagging. Interestingly the update on the graphical compass and artificial horizon are quite snappy, but e.g. simply arming takes seconds and sometimes times out.
Does anybody know of a good way to log or debug this?
Hi @WaldoPepper, it sounds like the serial baud rate may be a bit too slow to handle everything that is coming through right now. The send rates for the compass and horizon are very fast and even if you miss a few, it will still be snappy. The arm commands are only sent once and if that drops, they will be missed.
What serial rate is the port set to operate at on the Pixhawk?
@WaldoPepper To debug, you can open the mavproxy console in the raspberry pi with screen -r mavproxy. Then you can watch messagename to see messages passed back and forth from gcs and autopilot as mavproxy processes them.