> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# mjbots fdcanusb

> Configure fdcanusb bus rates on the adapter, then monitor and send classic CAN and CAN-FD frames in the CAN Monitor.

Use this guide for the mjbots fdcanusb USB interface. Inlay recognizes the adapter when its serial device identifies itself as fdcanusb, and uses the adapter's own text protocol. It carries up to 64 payload bytes. You can't send remote requests through it.

## Prepare the adapter

The Monitor doesn't set fdcanusb's bus rates or turn the bus on. Configure the adapter in its serial console first.

1. Connect the adapter's USB interface and install any host driver or device-access permissions it needs.
2. Connect CAN H, CAN L, and the required reference ground. Check the bus's termination and voltage requirements.
3. Close any other serial program that has the port open.
4. In a **Serial Monitor** tab, select the port chip at the start of the toolbar and choose the fdcanusb under **Port**. Keep **Mode** set to **UART**, set **Line ending** to **LF**, and select **Connect**.
5. Check the current settings by sending these lines one at a time: `conf get can.bitrate`, `conf get can.fd_bitrate`, and `can status`.

The adapter must be Bus On to receive frames, and you change its configuration while it's Bus Off. For a bus that uses 500 kbit/s arbitration and a 2 Mbit/s CAN-FD data phase, send these lines one at a time:

```text theme={"theme":"css-variables"}
can off
conf set can.bitrate 500000
conf set can.fd_bitrate 2000000
can on
can status
```

Replace the rates with your bus's requirements. Confirm each `OK` response and `mode:BUSON` before you continue. These are adapter console commands, not CAN frames. The [mjbots protocol reference](https://github.com/mjbots/fdcanusb/blob/master/README.md#usb-cdc-protocol) describes the firmware's configuration and persistence options.

## Connect the CAN Monitor

1. Select **Disconnect** to close the console connection.
2. Select the port chip and set **Mode** to **CAN**.
3. Confirm that **Bitrate** shows **Device-managed (fdcanusb)** instead of a list.
4. Select **Connect**.

If a **Bitrate** list appears, the selected port didn't identify itself as fdcanusb and the tab is using SLCAN. That list doesn't configure fdcanusb.

```text theme={"theme":"css-variables"}
Read the configured fdcanusb in CAN mode for five seconds without sending
test frames. Report IDs, payloads, and the FD and BRS indicators.
```

Received frames keep their `FD` and `BRS` markers. Use [CAN Monitor decoding](/docs/debug-mode/can.md#decode-signals) to apply a project database profile.

## Send a deliberate test frame

Review the receiver, ID, payload, and expected effect before you send. These examples show the accepted input syntax; replace them with frames for your bus.

The short form takes hexadecimal `id#data`:

```text theme={"theme":"css-variables"}
123#DEADBEEF
```

The short form turns off bitrate switching. It requests CAN-FD for payloads longer than eight bytes. For eight bytes or fewer, the adapter's default frame format decides. Use the native form when the frame format must be explicit:

| Native input | Frame |
| - | - |
| `can send 123 DEADBEEF bf` | Classic CAN, no bitrate switching |
| `can send 123 DEADBEEF bF` | CAN-FD, no bitrate switching |
| `can send 123 DEADBEEF BF` | CAN-FD with bitrate switching |

The tab's echo of a native `bf` send is labeled `FD` even though lowercase `f` requests classic format. Check the actual frame format in received bus traffic.

Use only payload lengths that are valid for the frame format and the adapter firmware, up to 64 bytes. The send box accepts `can send` but no other console commands. Send configuration commands in **UART** mode, as described above.

## Troubleshoot

* **A Bitrate list appears in CAN mode:** the selected port didn't identify itself as fdcanusb, so the tab uses the SLCAN protocol. Check that you selected the right port.
* **No frames:** in the adapter console, check `can status`, the arbitration and data rates, filters, bus activity, wiring, and termination.
* **Configuration rejected:** send `can off` before you change configuration, then `can on`.
* **Console commands unrecognized:** confirm that the installed firmware implements the linked mjbots USB CDC protocol.
* **`remote frames are not supported on fdcanusb`:** send a data frame instead.
* **Wrong frame format:** use the native form with `bf`, `bF`, or `BF`, and check the resulting traffic.
* **`[CAN send failed: ...]`:** check for hexadecimal byte pairs, the frame format's length limits, and the 64-byte maximum.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.