Skip to content

Commit

Permalink
Update/correct serial passthru info)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hwurzburg committed Sep 14, 2024
1 parent 5dd07de commit 66d13d9
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions common/source/docs/common-serial-passthrough.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ Serial Passthrough

"Serial Passthrough" allows the autopilot to route serial protocol messages between serial ports on the autopilot including the USB port. This can be used to configure a sensors or devices (which have a serial interface) without disconnecting it from the autopilot using a USB connection. It is also possible to pass data from any serial port to another serial port.

.. note::

This feature is available in Copter-4.0 (and higher), Plane-3.10, Rover-3.6 (and higher)

Setup
-----

Expand All @@ -20,19 +16,21 @@ Setup

.. note:: On most F7 and H7 boards, a second USB virtual serial port also appears when you connect via USB to the autopilot and is assigned the last SERIALx port in ArduPilot for SLCAN use. This can also be used for serial device configuration by changing :ref:`SERIAL_PASS1<SERIAL_PASS1>` to that port's number. This allows the autopilot to remain connected to a Ground Control Station, and still use passthrough to a sensor for configuration simultaneously on the PC via its configuration program.

- Disable the sensor driver's use of the serial port by setting ``SERIALx_PROTOCOL`` to -1 ("None").
- Be sure to set each port's baud rate appropriately using the ``SERIALx_BAUD`` parameters. The rates may be different for each port. ArduPilot will do the buffering. For example, if attempting passthrough to the first GPS, :ref:`SERIAL3_BAUD <SERIAL3_BAUD>` should normally be set to 230400 but you may check the GPS driver's "autobauding" by looking at the ground stations Message window soon after startup.
- Its best if the sensor already can be detected and used by ArduPilot first.
- Be sure to set each port's baud rate appropriately using the ``SERIALx_BAUD`` parameters (USB ports automatically use the passthrough port's baud rate and do not need to be changed). The rates may be different for each port. ArduPilot will do the buffering. For example, if attempting passthrough to the first GPS, :ref:`SERIAL3_BAUD <SERIAL3_BAUD>` should normally be set to 230400 but you may check the GPS driver's "autobauding" by looking at the ground stations Message window soon after startup. Additionally, many sensor drivers ignore what is set for this parameter, since its hardcoded in the driver, but it MUST be set when using the passthrough feature.

.. figure:: ../../../images/serial-passthrough-gps-baud.png
:target: ../_images/serial-passthrough-gps-baud.png
:width: 300px

- The default for :ref:`SERIAL_PASS1<SERIAL_PASS1>` (the first serial port to be interconnected) defaults to SERIAL0, the primary USB port.
- Set :ref:`SERIAL_PASSTIMO <SERIAL_PASSTIMO>` to a length of time (in seconds) that gives you enough time to connect with the sensor's configuration software. 30 to 60 seconds is a good choice
- Set :ref:`SERIAL_PASSTIMO <SERIAL_PASSTIMO>` timeout to a length of time (in seconds) that gives you enough time to connect with the sensor's configuration software. 30 to 60 seconds is a good choice but setting it to zero will remain in passthrough until reboot occurs.
- Set :ref:`SERIAL_PASS2 <SERIAL_PASS2>` to the number of the serial port connected to the sensor. I.e. "2" if the sensor is connected to Telem2/Serial2.
- Press the "Disconnect" button on the ground station but leave the USB cable from the PC to the autopilot connected.

.. note:: some GCS do not have any easy means to "Disconnect" or will immediately try to reconnect. In those cases just close the GCS application entirely.

- Open the sensor's configuration software and connect to the autopilot's COM port. If all goes well the configuration software should work as it does when the PC is directly connected to the sensor
- After you are done, remember to restore the ``SERIALx_PROTOCOL`` to its original value to re-enable the sensor

If the configuration fails to connect there are some things to try:

Expand Down

0 comments on commit 66d13d9

Please sign in to comment.