Skip to content
binho.io (opens in a new tab)Contact Us

USB CDC Operating Modes

The USB CDC interface (the virtual COM port the device presents alongside its USB HID interface) can do one of five different jobs. Which one it does is controlled by a single persistent device setting, stored in flash.

The modes are mutually exclusive: exactly one is active at a time.

Mode 0, the default, on both boards. The COM port is a transparent bridge to the device’s UART pins.

Mode 1, Supernova only. The COM port becomes an interactive shell for driving I2C, I3C and GPIO by typing commands.

Mode 2, on both boards. The COM port speaks the legacy Binho Nova ASCII protocol, so existing Nova host software works unmodified.

Mode 3, Pulsar only. The COM port becomes a transparent half-duplex RS-485 bridge.

Mode 4, Pulsar only. The COM port speaks SLCAN, so python-can and CANable tooling can drive the CAN bus.

ModeValueSupernovaPulsar
UART Passthrough0YesYes
Terminal1YesNo
Nova Compatible2YesYes
RS-485 Bridge3NoYes
CAN-FD Bridge4NoYes

Selecting a mode the device doesn’t support is rejected outright, so a device can’t be stranded in an unusable configuration this way.

Switching modes with device_settings_cli.py

Section titled “Switching modes with device_settings_cli.py”

device_settings_cli.py is a small host-side tool that reads and changes these settings over USB HID. It is the recommended way to switch modes: no Mission Control and no SDK code required.

It needs Python 3 with hidapi:

pip install hidapi
CommandWhat it does
showPrint the current settings: webusb_enabled, cdc_enabled, cdc_mode.
setChange one or more settings, then reset the device to persist them.
resetRestore factory defaults (webusb=1, cdc=1, cdc_mode=0) and reset.
FlagApplies toMeaning
--cdc-mode <mode>setuart_passthrough, terminal, nova_compat, rs485, canfd, or the numeric value 0–4.
--cdc on|offsetEnable or disable the CDC interface entirely.
--webusb on|offsetEnable or disable WebUSB.
--device supernova|pulsarallTarget one board when both are connected. Auto-detects otherwise.
--no-savesetApply in RAM only, without resetting. The change is lost on the next power cycle, and a cdc_mode change won’t take effect at all until a reset.
# What mode is the device in right now?
python device_settings_cli.py show
# Switch modes: the device resets automatically to apply
python device_settings_cli.py set --cdc-mode terminal
# Go back to the default
python device_settings_cli.py set --cdc-mode uart_passthrough
# ...or restore everything to factory defaults
python device_settings_cli.py reset
# Target one board when both are plugged in
python device_settings_cli.py --device pulsar set --cdc-mode canfd

A successful set prints the updated settings and then resets the device:

Connected to Binho Supernova
Settings updated:
webusb_enabled : 1 (on)
cdc_enabled : 1 (on)
cdc_mode : 1 (terminal)
Resetting device to persist settings to flash...
Device is resetting. Settings will be saved to flash.

The CLI is a thin wrapper over the SetUsbConfig HID command, which can be sent from Mission Control, a Binho SDK, or custom HID code. It carries three fields (webusb_enabled, cdc_enabled and cdc_mode), and each accepts 0xFF to mean “leave unchanged”.

SetUsbConfig only writes the setting. Send the reset command, or power-cycle the device, for the new mode to take effect.