CH347 Transport
A WCH CH347 USB bridge as one connection that serves its I2C bus, SPI bus and GPIO pins. Requests come from the I2C, SPI and EEPROM message inputs or from the I2C, EEPROM, SPI and GPIO Lua helpers, and run one after another on the device.
On Linux it needs WCH's ch34x_pis kernel module and a udev rule for /dev/ch34x_pis*; on Windows, WCH's CH347
driver. See the CH347 guide for setup, wiring and an I2C EEPROM walkthrough.

Configuration reference
| Config ID | ch347_transport |
| Selected by | app_transport = "ch347_transport" |
| Platforms | Linux, Windows |
| License | Premium |
Message-based I2C + SPI transport over a single CH347 USB bridge device
CH347 USB bridge. One device provides an I2C bus, a SPI bus and GPIO from a single open.
I2C is triggered by messages tagged with i2c_op metadata, SPI by messages tagged
with spi_op, and GPIO by messages tagged with gpio_op (GPIO is driven from Lua
scripts only); all run serialized over the one device and return their results as
messages that Lua scripts can parse.
On Linux needs the WCH CH347 driver and access to the device node (e.g.
/dev/ch34x_pis0); on Windows needs the CH347 driver installed.
| Setting | Key | Type | Default | Notes |
|---|---|---|---|---|
| CH347 Device | ch347_transport_device | Text (with presets) | detected at runtime | Required |
| I2C Speed | ch347_transport_i2c_speed | Text choice | "2" | Required |
| SPI Mode | ch347_transport_spi_mode | Text choice | "0" | Required |
| SPI Speed | ch347_transport_spi_clock | Text choice | "1" | Required |
Setting details
CH347 Device
The available values are detected on the machine running CycBox (attached devices, generated ids), so no fixed default or option list is shown here.
I2C Speed
Allowed values:
| Value | Label |
|---|---|
"0" | 20 kHz (low speed) |
"1" | 100 kHz (standard) |
"2" | 400 kHz (fast) |
"3" | 750 kHz (high speed) |
SPI Mode
Allowed values:
| Value | Label |
|---|---|
"0" | Mode 0 |
"1" | Mode 1 |
"2" | Mode 2 |
"3" | Mode 3 |
SPI Speed
Allowed values:
| Value | Label |
|---|---|
"0" | 60 MHz |
"1" | 30 MHz |
"2" | 15 MHz |
"3" | 7.5 MHz |
"4" | 3.75 MHz |
"5" | 1.875 MHz |
"6" | 937.5 KHz |
"7" | 468.75 KHz |
Example config
Default values as they appear in a saved configuration (for example the JSON block at the end of a cycbox/examples/*.lua file). Settings detected at runtime are omitted.
{
"app": {
"app_transport": "ch347_transport"
},
"ch347_transport": {
"ch347_transport_i2c_speed": "2",
"ch347_transport_spi_mode": "0",
"ch347_transport_spi_clock": "1"
}
}