AP_Periph: Serial passthrough issue

I am developing a custom CAN-based GPS module using a u-blox F10 and AP_Periph (v1.9.18). I am trying to enable the Serial Passthrough feature so I can connect the GPS to u-center via a secondary UART port, but I’m running into some issues.

Hardware Setup:

  • Serial1 (USART1): Connected to a UART-to-USB adapter (to PC).

  • Serial2 (USART2): Connected to the u-blox F10 GPS module.

  • Firmware: AP_Periph v1.9.18.

    • CAN Node information:

      image

Goal: I want to use the DroneCAN page in Mission Planner to configure a serial passthrough. The objective is to route the Serial2 (GPS) data to Serial1, allowing me to access the F10 raw data directly in u-center through my USB adapter.

I followed the documentation and issue below:

Troubleshooting Steps Taken:

  1. Parameter Configuration: I set SERIAL1_PASS = 1 and SERIAL2_PASS = 2. However, I am not receiving any data on the PC side via the Serial1 UART-to-USB adapter.

  2. Handling Driver Conflicts: Suspecting the GPS driver might be occupying the port, I tried setting SERIAL2_PROTOCOL = -1 (None) to release the interface, but this did not resolve the issue.

  3. Hardware Verification: I have verified the hardware connections. When I temporarily set GPS_PORT = 1 (pretending the GPS is on Serial1), I can see the AP_Periph firmware sending outgoing GPS configuration packets (UBX polling, etc.) through the Serial1 port. This confirms the UART-to-USB adapter and the MCU’s TX/RX pins are functional.

  4. GPS Module Verification: The GPS functionality works perfectly when I set GPS_PORT = 2 (configured as a standard GPS on Serial2). This confirms that the wiring between the MCU and the u-blox M10 is correct and functional.

If anyone has experience with similar configurations, could you please advise on the correct settings to forward data from Serial2 to Serial1?