Save Uart data in pixhwak 2.1

Hi every one,
i’m study github code to save uart(serial) data in my pixhwak(2.1, CubeOrange) using serial port(GPS1), but i don’t know what’s the function to be modified.

(i use UAVCAN protocol GPS moudle,here3, and i want to get additional data from uart port)

how can i do this ??
help me.

We need more details. A lot more details.

actually, i want to save GPS raw data(Carrier phase, pesudorange etc … ).
so, i tried to make another line for serial data pin.
I confirm GPS raw data when directly connect PC <–uart–> GPS module(here3) likewise below fig,

so i want to confirm raw data by modifying the opensource code and logging SD card in pixhwak2.1.
I wonder " how can write the code that read UART data from GPS1 port ?( Is there any parameter requirement?) "

Hardware setting is following as :
connecting GPS module here3 to CANport, recived sensor data and NMEA data,
another line is connect with GPS1 port for serial data.

1 Like

What if you just split the GPS TX line and log the data on a seperate MCU/SD-card.
Or to follow your diagram, connect the GPS raw data line to a seperate MCU.

There is already a parameter to log raw UBX data
Just activate it.

1 Like

Hello @amilcarlucas,

I think the solution you proposed is the perfect solution if our friend @jklee95 install the UART cable instead of the CAN cable in Here3.

If I am not mistaken, I tried to access the UBX informations via CAN in Here3 once and it didn’t work. It seems that the embedded processor doesn’t stream these messages at normal operation.

I already tried it(set GPS raw data 1), but there is no gps raw data set. (only label is exist)
I think that reason is GPS_Type is UAVCAN type, though UBX informations via CAN in Here3 once and it didn’t work. as @BrunoBagarini said,

In Here3 configuration ,to receive GPS,IMU and compass data, GPS_Type must be set in UAVCAN. isn’t it?

Is it possible to receive gps raw data with Parameter set (GPS_Type : UAVCAN, GPS_raw_data : always) ?

thanks!

yes, it’s the problem :sob:
Is there any way to received here3 data with CAN cable, at the same time receive GPS raw data with UART cable??(To do this, i studying github-ardupilot opensource code but i don’t know what function i modify)

You need to change the cable on the Here3 and connect it via UART instead of CAN.
No software changes are required if you do this.

1 Like

@amilcarlucas the UART on Here3 will only output GPS data correct? I am not sure if compass or IMU data will be available on it.
I really don’t know if it is possible to connect UAVCAN and UART at the same time, I think this is the doubt of our friend @jklee95.

Uart has only gps data.
An i2c cable is needed for compass.

He should have picked an Holybro F9P Helical instead. It has a better RTK receiver.

1 Like

hi …

How can I read the parameters of the plane from sd card in the event of a system failure in ardupilot5+

thanks advance

I just want to make the processor take the reading of the time-of-flight parameters from the sd card when it is formatted to the EEPROM.

Just load the .bin log file into mission planner, mavexporer or plot.ardupilot.org