Connect custom device to pixhawk


I want to connect a custom build module to my pixhawk.
The idea is that the module sends data to the pixhawk and the pixhawk uses the telemetry radio to forward the data to the groundstation.
I couldn’t really find good resources on how to start with this.
My questions are:
What ports can I use (UART, CAN or something else) ? The module uses tx, rx, Vin, and Ground
Where to start with the firmware programming? Has something similiar been done before?
Can someone point me in the right direction please?

I remember that ArduPilot has Mavlink routing implemented so it would work in the way you expect with that firmware, however I’m not sure PX4 has the same feature. Another way to use the same radio link for your own device is to use some onboard PC and run there Mavlink router software.
You can connect your device using telem1 or telem2 serial ports. Please keep in mind that in this case you should use Mavlink protocol to send data.
You can also check UART wiring example here
And here is a programming example

1 Like

Ok thanks a lot.
I will look into that and see if it works

Hi, Thies~
I’m not sure but the idea is below.

If the custom device implements the MAVLink protocol, it can send some data to a telemetry or serial port of the Pixhawk.

Among many MAVLink messages that are sent to the ground station via wireless telemetry channel, if you select a message that is not important and modify it to carry the data, you can send it.