# OAK4 M8 Control (1.49.0 and later)

> **Available from Luxonis OS 1.49.0**
> This guide applies to Luxonis OS 1.49.0 and later. For earlier releases, see [OAK4 M8 Manual Control](https://docs.luxonis.com/hardware/platform/deploy/oak4-m8-interface/oak4-m8-manual-control.md). To check the version, run `cat /etc/os-release` on the device and read the `VERSION` line.

A driver in Luxonis OS controls the M8 connector. You check and change the pin functions with `oakctl device aux`, and you use
GPIO pins with the libgpiod tools on the device. For the pinout and the voltage levels, see the [OAK4 M8 Interface
Guide](https://docs.luxonis.com/hardware/platform/deploy/oak4-m8-interface.md).

## Pin functions on each board

Each board offers its own set of pin functions. This table lists them by the model string of the device. To print the model
string, run `cat /proc/device-tree/model` on the device. It prints a line such as `Luxonis, Inc. OAK4-D R9`. `oakctl device aux
info` shows the same functions for the device that you ask.

In each cell, the first function is the one that the pin has after boot. Pins 3, 4, 5 and 8 have fixed roles on every board. The
USB2 route column gives the values of the `usb` switch, which [Connect a USB device](#Connect%20a%20USB%20device) explains.

| Model | Pin 1 | Pin 2 | Pin 6 | Pin 7 | USB2 route | GPIO lines |
| --- | --- | --- | --- | --- | --- | --- |
| OAK4-S R0, R1, R2, R5, R9 | `uart-rx`, `i2c-sda`, `gpio` | `fsync` | `uart-tx`, `i2c-scl`, `gpio` | `detect`, `gpio` | `usb-c`
or `connector` | `aux-1`, `aux-6`, `aux-7` |
| OAK4-D R0, R1, R2, R7, R9 | `uart-rx`, `i2c-sda` | `fsync` | `uart-tx`, `i2c-scl` | `detect`, `gpio` | `usb-c` or `connector` |
`aux-7` |
| DEV-KIT R3, R4 | `uart-rx`, `i2c-sda` | `fsync` | `uart-tx`, `i2c-scl` | `detect`, `gpio` | `usb-c` or `connector` | `aux-7` |
| OAK4-FFC R0 | `uart-rx` | `fsync` | `uart-tx` | `detect`, `gpio` | `usb-c` only | `aux-7` |
| OAK4-FFC R1 | `uart-rx`, `gpio` | `fsync` | `uart-tx`, `gpio` | `detect`, `gpio` | `usb-c` only | `aux-1`, `aux-6`, `aux-7` |
| OAK4-FFC R2 | `gpio`, `uart-rx` | `fsync`, `gpio` | `gpio`, `strobe`, `uart-tx` | `detect`, `gpio` | `usb-c` or `connector` |
`aux-1`, `aux-2`, `aux-6`, `aux-7` |

These notes apply to the table and to the rest of this guide:

 * On OAK4-FFC R2, the camera sets the direction of each pin. `uart-rx` and `detect` are inputs, `uart-tx` and `strobe` are
   outputs, and `gpio` and `fsync` work in either direction. Pins 1 and 6 boot as GPIO inputs.
 * On the other boards, the level shifters pick the direction by themselves.
 * No OAK4-FFC revision has I2C on the M8 connector.

## Check the connector

Run the `oakctl device aux` commands on the device, or from a computer that can reach the device. They need Luxonis OS 1.49.0 or
later on the device and oakctl 0.32.0 or later. They do not work through Luxonis Hub or over WebRTC. To pick a device from a
computer, add `-d` with the device's IP address, serial number or index in `oakctl device list`, as in other `oakctl device`
commands.

### Show what your board offers

`oakctl device aux info` lists the functions of each pin and the USB2 routes:

```sh
oakctl device aux info
```

Example output on OAK4-S R9:

```text
Connector: m8
+-----+---------------------------------------------------+--------------+-------------------------+
| Pin | Functions (directions)                            | Default      | GPIO line               |
+==================================================================================================+
| 1   | uart-rx (in/out), i2c-sda (in/out), gpio (in/out) | uart-rx auto | aux-connector 0 (aux-1) |
|-----+---------------------------------------------------+--------------+-------------------------|
| 2   | fsync (in/out)                                    | fsync auto   |                         |
|-----+---------------------------------------------------+--------------+-------------------------|
| 3   | fixed: usb-dp                                     |              |                         |
|-----+---------------------------------------------------+--------------+-------------------------|
| 4   | fixed: usb-dn                                     |              |                         |
|-----+---------------------------------------------------+--------------+-------------------------|
| 5   | fixed: power-out                                  |              |                         |
|-----+---------------------------------------------------+--------------+-------------------------|
| 6   | uart-tx (in/out), i2c-scl (in/out), gpio (in/out) | uart-tx auto | aux-connector 1 (aux-6) |
|-----+---------------------------------------------------+--------------+-------------------------|
| 7   | detect (in), gpio (in/out)                        | detect in    | aux-connector 2 (aux-7) |
|-----+---------------------------------------------------+--------------+-------------------------|
| 8   | fixed: gnd                                        |              |                         |
+-----+---------------------------------------------------+--------------+-------------------------+

+--------+------------------+---------+
| Switch | Values           | Default |
+=====================================+
| usb    | usb-c, connector | usb-c   |
+--------+------------------+---------+
```

The columns mean the following:

 * `Functions (directions)` lists the functions of the pin. `in/out` means that the function works in either direction.
 * `Default` is the function and direction after boot. `auto` means that the level shifter picks the direction.
 * `GPIO line` gives the GPIO chip, the line number and the line name of a pin that can be a GPIO. The line name is always
   `aux-<pin>`, and the line number differs between boards.
 * `fixed` marks a pin with a fixed role, such as USB2 D+ or GND.
 * The `usb` switch is the USB2 route, with its values and its default.

### Show the current state

`oakctl device aux status` shows what each pin does now, whether something is attached to DET, and the USB2 route:

```sh
oakctl device aux status
```

Example output on OAK4-S R9, with nothing attached:

```text
+-----+----------+-----------+--------+-----------+
| Pin | Function | Direction | Holder | GPIO line |
+=================================================+
| 1   | uart-rx  | auto      | nobody |           |
|-----+----------+-----------+--------+-----------|
| 2   | fsync    | auto      | nobody |           |
|-----+----------+-----------+--------+-----------|
| 6   | uart-tx  | auto      | nobody |           |
|-----+----------+-----------+--------+-----------|
| 7   | detect   | in        | nobody |           |
+-----+----------+-----------+--------+-----------+
DET (pin 7): nothing attached

+--------+-------+--------+
| Switch | Value | Holder |
+=========================+
| usb    | usb-c | nobody |
+--------+-------+--------+
```

The output reads as follows:

 * `Holder` is `nobody`, a program as `<name> (pid <N>)`, or a kernel driver as `kernel: <name>`. Nobody else can change a pin or
   switch that has a holder.
 * `GPIO line` shows `in use` while a program holds the pin's GPIO line.
 * The DET line shows `attached`, `nothing attached`, or `unavailable` while pin 7 is a GPIO.
 * The `usb` switch shows the current USB2 route and its holder.

### Use oakctl in scripts

Add `-f json` to any `oakctl device aux` command to print one JSON document. The pretty output is for people and can change
between releases. The JSON output keeps its keys, and later releases only add keys.

When the device refuses a request, oakctl exits with code 1. With `-f json`, it prints an `error` document, then prints the usual
failure message on standard error. The `kind` of the error is `busy`, `invalid`, `unavailable` or `failed`. A `busy` error has an
`owner` when a program or a kernel driver holds the pin or switch. It has no `owner` when an accessory on DET or a held GPIO line
blocks the change.

For example, this command fails while agentconfd keeps USB2 on the M8 connector for a USB accessory:

```sh
oakctl device aux usb set usb-c -f json
```

oakctl prints the document on one line. Here it is formatted for reading:

```json
{
  "error": {
    "request": "switch set usb usb-c",
    "kind": "busy",
    "message": "switch set usb usb-c: switch usb is busy, held by agentconfd_daem (pid 1279)",
    "owner": { "kind": "process", "pid": 1279, "comm": "agentconfd_daem" }
  }
}
```

With `-f json`, a `set` that changes nothing prints `{"pins":[],"switches":[]}`.

## Change a pin function

`oakctl device aux set <pin> <function>` changes the function of one pin. Use the pin labels and function names that `info`
prints. This command connects the I2C bus to pins 1 and 6:

```sh
oakctl device aux set 1 i2c
```

The output lists every pin that changed. Example output on OAK4-S R9:

```text
+-----+----------+-----------+--------+-----------+
| Pin | Function | Direction | Holder | GPIO line |
+=================================================+
| 1   | i2c-sda  | auto      | nobody |           |
|-----+----------+-----------+--------+-----------|
| 6   | i2c-scl  | auto      | nobody |           |
+-----+----------+-----------+--------+-----------+
```

If the pins already have the function, the command prints `Nothing changed`.

UART and I2C use two pins each, and the two pins of a pair always change together:

 * `uart` and `i2c` set both pins of the pair. `oakctl device aux set 1 uart` makes pin 1 UART RX and pin 6 UART TX.
 * Setting one pin to a function of a pair, such as `uart-rx`, moves its partner into the pair too.
 * When one pin leaves a pair, its partner leaves too. The partner takes the same function if it has it, otherwise `gpio`,
   otherwise its first function outside the pair. For example, on OAK4-FFC R2, `oakctl device aux set 6 strobe` takes pin 6 out of
   the UART and makes pin 1 a GPIO, because pin 1 has no `strobe` function.

A setting lasts until the next change or until the device reboots. At boot, every pin returns to the default that `info` shows, so
run the command again after each reboot.

`set` does not lock the pin, so a later `set` can change it again. To keep a GPIO pin as it is, hold its GPIO line with a program
on the device, as [Keep a GPIO pin as it is](#Keep%20a%20GPIO%20pin%20as%20it%20is) explains.

If something holds a pin that the change touches, `set` fails and names the reason. Example output on a board with GPIO on pin 2,
while DepthAI uses the device:

```text
oakctl command failed:
   0: set 2 gpio: pin 2 is busy, held by kernel: fsync-stm
```

Run `oakctl device aux status` to see every holder. [Troubleshooting](#Troubleshooting) lists every message and what to do.

## Use a pin as GPIO

The GPIO lines column of the board table shows which pins can be GPIO on your board. A GPIO pin is a line of the GPIO chip
`aux-connector`, named `aux-<pin>`. You use it with the libgpiod tools in a shell on the device. To open a shell, see [Connect to
the camera through SSH or ADB](https://docs.luxonis.com/hardware/platform/deploy/oak4-deployment-guide/oak4-advanced.md).

First, set the pin to `gpio`:

```sh
oakctl device aux set 1 gpio
```

Then drive or read the line by its name. `gpiofind` looks up the line, because its number on the chip differs between boards:

```sh
gpioset $(gpiofind aux-1)=1   # drive pin 1 high
gpioget $(gpiofind aux-1)     # read pin 1
```

These rules apply to every GPIO pin:

 * `gpioset` makes the pin an output, and `gpioget` makes it an input. `gpioget` therefore reads the level that comes into the
   pin, not the level that an earlier `gpioset` set.
 * On OAK4-FFC R2, the driver also switches the pin's level shifter to match, in a safe order.
 * Values are levels. 1 is high and 0 is low.
 * When `gpioset` or `gpioget` exits, the pin stays `gpio` and keeps its last direction and level.
 * You can request the line only while the pin is `gpio`. Otherwise `gpioset` and `gpioget` fail with `Device or resource busy`.
 * Programs use the libgpiod library the same way. They open the chip `aux-connector` and find the line by its name.

> **Do not use SoC GPIO numbers**
> Before Luxonis OS 1.49.0, you drove M8 pins through SoC GPIO numbers on the chip `f000000.pinctrl`, such as line 20 on OAK4-S. The driver now holds those lines, so requests for them fail with `Device or resource busy`. Use the `aux-<pin>` lines.

### Keep a GPIO pin as it is

`gpioset` exits right after it sets the level. The pin keeps its level, but any `oakctl device aux set` can change it. To keep the
pin as it is, hold its line. `gpioset --mode=signal` holds the line until you stop it:

```sh
gpioset --mode=signal $(gpiofind aux-1)=1 &
```

While a program holds the line, the pin's function cannot change:

 * `status` shows `in use` in the `GPIO line` column of the pin.
 * `oakctl device aux set 1 uart` fails with `pin 1 is busy: a program holds its GPIO line aux-1`.
 * A change to another pin that would move this pin fails too. For example, `oakctl device aux set 6 uart` fails while a program
   holds `aux-1`, because pin 1 would have to join the UART.

To release the line, stop the program that holds it. The pin stays `gpio` and keeps its last direction and level.

### Use DET (pin 7) as GPIO

Pin 7 is the accessory detect line. You can make it a GPIO only while nothing is attached:

```sh
oakctl device aux set 7 gpio
```

If an accessory pulls DET low, the command fails with `pin 7 is busy: something is attached to DET`.

While pin 7 is a GPIO, the camera does not detect accessories. `status` shows `DET (pin 7): unavailable`, and USB2 no longer
switches to the connector on its own when you plug in a USB accessory. DepthAI's automatic role selection also makes the camera an
FSYNC master, because it sees nothing attached. To turn detection back on, run `oakctl device aux set 7 detect` or reboot the
device.

## Use the UART

Pin 1 is RX and pin 6 is TX. Every board has a UART on these pins, but not every board starts with it:

 * OAK4-S, OAK4-D, DEV-KIT, OAK4-FFC R0 and OAK4-FFC R1 boot with the UART on pins 1 and 6.
 * OAK4-FFC R2 boots with pins 1 and 6 as GPIO inputs.

On OAK4-FFC R2, connect the UART to pins 1 and 6 after each boot:

```sh
oakctl device aux set 1 uart
```

The setting lasts until the next reboot. On the other boards, run the same command to return pins 1 and 6 to the UART after you
used them for something else.

Applications on the device open the UART as `/dev/ttyHS0`. The UART supports baud rates of 9600, 19200, 38400, 57600 and 115200,
and parity none, even or odd. It does not support software flow control (XON/XOFF).

To open the UART from your computer through a USB serial adapter, use a terminal program such as `picocom` or `screen`. Replace
the device name with the one of your adapter:

```sh
picocom -b 115200 /dev/tty.usbserial-A50285BI
```

## Use the I2C bus

OAK4-S, OAK4-D, and DEV-KIT R3 and R4 have I2C on pin 1 (SDA) and pin 6 (SCL). To connect the I2C bus to these pins, run:

```sh
oakctl device aux set 1 i2c
```

The bus reaches pins 1 and 6 only while they are set to `i2c`. The M8 I2C bus is `988000.i2c`, and its bus number differs between
boards. This command looks up the bus number and scans the bus with `i2cdetect`:

```sh
i2cdetect -y -r $(basename $(ls -d /sys/bus/platform/devices/988000.i2c/i2c-*) | cut -d- -f2)
```

Then use the bus with the standard Linux I2C subsystem. For more detail, see the [OAK4 SOM Development
Guide](https://docs.luxonis.com/hardware/platform/deploy/oak4-som-development-guide.md).

On OAK4-D and on DEV-KIT R3 and R4, the M8 I2C bus also connects to devices on the board. Give your accessory an address outside
this list: `0x0f`, `0x22`, `0x44`, `0x45`, `0x51` and `0x5d`. Address `0x0f` is in use only while the device boots. In the
`i2cdetect` output, `UU` marks an address that a driver on the board uses. On OAK4-S, no devices on the board use the M8 I2C bus.

## Connect a USB device

Pins 3 and 4 carry USB2. The camera has one USB2 connection, which goes either to the USB-C port or to the M8 connector. A USB
device on the M8 connector needs the camera to be the USB host. While the camera is the USB host, a computer on the USB-C port
loses its USB connection to the camera.

Where USB2 can go depends on the board, as the USB2 route column of the board table shows:

 * On OAK4-FFC R0 and R1, USB2 cannot reach the M8 connector.
 * On every other board, USB2 switches between the USB-C port and the M8 connector.

### Automatic switching

The system service `agentconfd` watches DET. When you plug in an accessory that pulls DET low, agentconfd does the following:

 * It routes USB2 to the M8 connector, makes the camera the USB host, and looks for a USB device for up to 5 seconds.
 * If it finds a USB device, USB2 stays on the M8 connector until you unplug the accessory.
 * If it finds none, as with an FSYNC cable, it routes USB2 back to the USB-C port and makes the camera a USB device again.

When you unplug the accessory, agentconfd routes USB2 back to the USB-C port and makes the camera a USB device. On OAK4-FFC R0 and
R1, it changes neither the route nor the USB role.

On OAK4-S R0, R1 and R2, automatic USB2 switching to the M8 connector now works. In earlier releases, it did not work on these
revisions.

On boards that switch USB2, each plug of an accessory that pulls DET low drops a USB connection on the USB-C port. These times
were measured on OAK4-S with a Linux computer:

 * With no USB device on the accessory, as with an FSYNC cable, the connection drops for about 5.5 seconds. agentconfd looks for a
   USB device for 5 seconds, and the computer reconnects about 0.4 seconds after USB2 returns to the USB-C port.
 * If the contact bounces as you plug in the accessory, agentconfd looks twice, and the connection drops for about 11 seconds.
 * With a USB device on the accessory, the connection stays down until you unplug the accessory.

Unplugging an accessory does not drop the connection on the USB-C port.

For a custom USB accessory, pull DET (pin 7) low to GND through a 33 Ω resistor, so that the camera detects it.

> **Power budget**
> Pin 5 supplies up to 5 W in total. If the accessory, the cable, or any converter in between needs more, USB enumeration can fail or become unstable.

### Route USB2 by hand

To test a USB device that does not pull DET low, route USB2 to the M8 connector yourself:

```sh
oakctl device aux usb set connector
```

The output shows the new route:

```text
+--------+-----------+--------+
| Switch | Value     | Holder |
+=============================+
| usb    | connector | nobody |
+--------+-----------+--------+
```

agentconfd sees the change and makes the camera the USB host. To route USB2 back, run `oakctl device aux usb set usb-c`, and
agentconfd makes the camera a USB device again. `usb set <route>` is short for `switch set usb <route>`, and messages show the
request in the long form.

A route set by hand is not locked:

 * It lasts until the next change or until the device reboots.
 * agentconfd routes USB2 back to `usb-c` each time it lets go of the route, after a plug without a USB device or after an unplug.
 * While agentconfd keeps USB2 on the M8 connector for a USB device, `oakctl device aux usb set usb-c` fails with `switch usb is
   busy, held by agentconfd_daem (pid <N>)`. `agentconfd_daem` is the process name of agentconfd. Unplug the device to free the
   route.

On a board with one route, `usb set` to the other route fails.

## Synchronize cameras with FSYNC and strobe

On every board, pin 2 carries FSYNC from the STM32 microcontroller. Pin 2 can also carry FSYNC and strobe combined. The rising
edge marks FSYNC at the end of exposure. The low level marks the strobe duration, because the strobe is active low.

To wire FSYNC between devices, see the [FSYNC Y-Adapter](hw-catalog://FSYNC Y-Adapter) page and [Hardware
synchronization](https://docs.luxonis.com/hardware/platform/deploy/data-sync/hardware-sync.md).

When DepthAI picks the FSYNC master or slave role on its own, it decides from DET. A camera with an accessory on DET and no USB
device on the M8 connector becomes the slave, and every other camera becomes the master. Automatic role selection therefore needs
pin 7 on `detect`.

### Keep pin 2 free for DepthAI

While a DepthAI application uses the device, the FSYNC driver holds pin 2. `status` then shows pin 2 held by `kernel: fsync-stm`.
On OAK4-FFC R2, `oakctl device aux set 2 gpio` fails with `pin 2 is busy, held by kernel: fsync-stm`, and `gpioget $(gpiofind
aux-2)` fails with `Device or resource busy`. Pin 2 is free again after the application closes the device.

> **A held pin 2 turns off FSYNC**
> If a program holds pin 2 when DepthAI starts, DepthAI turns off FSYNC for every camera on the device, including the sync between the on-board cameras. On OAK4-FFC R2, a program that holds the `aux-2` line has the same effect. DepthAI then logs that the FSYNC controller is not available, and the log does not name the program. Release pin 2 and `aux-2` before you start DepthAI.

On OAK4-FFC R2, `oakctl device aux set 2 gpio` alone does not keep pin 2 as a GPIO. If no program holds `aux-2`, DepthAI switches
pin 2 back to `fsync` when it starts.

### Strobe on pin 6

On OAK4-FFC R2, pin 6 can carry a separate strobe signal:

```sh
oakctl device aux set 6 strobe
```

This command connects pin 6 to a strobe output of the STM32 microcontroller, and the pin becomes an output. DepthAI does not
control this strobe output. If pins 1 and 6 are a UART, the command also makes pin 1 a GPIO. Example output, with pins 1 and 6 on
the UART before the command:

```text
+-----+----------+-----------+--------+-----------+
| Pin | Function | Direction | Holder | GPIO line |
+=================================================+
| 1   | gpio     | in        | nobody |           |
|-----+----------+-----------+--------+-----------|
| 6   | strobe   | out       | nobody |           |
+-----+----------+-----------+--------+-----------+
```

> **Strobe control in DepthAI**
> A future DepthAI release will support control of this strobe output. If you need it now, contact [support@luxonis.com](mailto:support@luxonis.com).

## Troubleshooting

When `oakctl device aux` refuses a request, it prints `oakctl command failed:` and a line with the request and the reason, and it
exits with code 1:

```text
oakctl command failed:
   0: set 1 i2c: pin 1 has no function i2c, its functions are gpio, uart-rx
```

The list below leaves out the request part of each message, such as `set 1 i2c:`. A `usb set` request shows as `switch set usb
<route>`.

 * oakctl says that the OS on your device does not support this feature. The device runs a Luxonis OS older than 1.49.0. [Update
   Luxonis OS](https://docs.luxonis.com/software-v3/sw-stack/luxonis-os.md), or use [OAK4 M8 Manual
   Control](https://docs.luxonis.com/hardware/platform/deploy/oak4-m8-interface/oak4-m8-manual-control.md) on the older OS.
 * oakctl does not know the `aux` subcommand. Update [oakctl](https://docs.luxonis.com/software-v3/oak-apps/oakctl.md) to 0.32.0
   or later.
 * oakctl says that the device has no aux connector. The board has no M8 connector that the driver supports, for example DEV-KIT
   R0, R1 and R2.
 * oakctl says that the aux connector driver did not start. Run `dmesg | grep aux-connector` on the device to see why.
 * `pin <N> is busy, held by <holder>`. A program or a kernel driver holds the pin. If the holder is `kernel: fsync-stm`, a
   DepthAI application uses the device, and the pin is free again after it closes the device. Otherwise, stop the program that
   `status` names.
 * `pin <N> is busy: a program holds its GPIO line aux-<N>`. Run `gpioinfo aux-connector` on the device. It shows the program that
   holds each line. Stop that program.
 * `pin 7 is busy: something is attached to DET`. Unplug the accessory before you make pin 7 a GPIO.
 * `switch usb is busy, held by agentconfd_daem (pid <N>)`. agentconfd keeps USB2 on the M8 connector for a USB device. Unplug the
   device.
 * `no pin <X> on this board`. Use a pin label that `info` prints.
 * `pin <X> is a fixed pin (<role>)`. Pins 3, 4, 5 and 8 have fixed roles and cannot change.
 * `pin <X> has no function <F>, its functions are ...`. The board does not offer that function on that pin. The message lists the
   functions that it offers.
 * `switch usb has no value <V>, its values are ...`. Use a route that the message lists.
 * `gpioset` or `gpioget` on an `aux-<pin>` line fails with `Device or resource busy`. Set the pin to `gpio` first. If it is
   already `gpio`, another program holds the line.
 * `gpioset` or `gpioget` on `f000000.pinctrl` fails with `Device or resource busy`. The driver holds the line. Change the pin
   function with `oakctl device aux set`, and use the `aux-<pin>` lines for GPIO.
 * `gpiofind aux-<pin>` finds no line. The pin cannot be a GPIO on this board.
 * `GPIO.setup` in a Script node fails with `Device or resource busy`. The Script node cannot use M8 lines in this release, as the
   [Script node](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/script.md) page explains. Drive M8 GPIO
   with libgpiod on the device instead.
 * FSYNC does not work, and DepthAI logs that the FSYNC controller is not available. A program held pin 2 or `aux-2` when DepthAI
   started. See [Keep pin 2 free for DepthAI](#Keep%20pin%202%20free%20for%20DepthAI).

### A USB device does not work on the M8 connector

If a USB device works on the USB-C port but not through the M8 connector, check these points:

 * USB D+, USB D-, 5 V, GND and DET are wired correctly through the harness.
 * DET is pulled low to GND through a 33 Ω resistor. With the device plugged in, `oakctl device aux status` shows `DET (pin 7):
   attached`, and the `usb` switch shows `connector`.
 * Pin 7 is `detect`, not `gpio`.
 * The accessory stays within the 5 V, 5 W budget of pin 5.
 * The board can route USB2 to the M8 connector. OAK4-FFC R0 and R1 cannot.
