Docs

UTools-SI104 Docs

Read product documentation, quick starts, and protocol references online.

Overview

USB TO I2C / SPI BRIDGE
UTools-SI104 Product Overview V1.0
Stable host access to multiple I2C and SPI devices
UTools-SI104 is a USB multi-bus bridge device for R&D debugging, production testing, and system integration. It provides four independent I2C channels, one SPI channel, and an independent OTA channel through a USB Bulk private protocol. Host software can use one toolchain for peripheral access, register emulation, automated testing, and firmware maintenance.
4-channel I2C 1-channel SPI USB Bulk private protocol Automatic WinUSB binding I2C slave cache Independent OTA Document version V1.0

What problem is solved?

In board-level debugging, module testing, and production fixtures, host software often needs to access multiple I2C devices at the same time, emulate an I2C slave register area, or quickly verify SPI transfers. UTools-SI104 unifies these access paths into one USB device:

Host software
Python / C# / test platform
USB Bulk access
UTools-SI104
Protocol parsing
task queues and bus drivers
Target devices
I2C sensors / EEPROM
SPI Flash / peripheral modules
Host software only needs to target a stable USB protocol. SI104 handles channel selection, I2C/SPI timing, VCC protection, event buffering, and OTA maintenance paths.

How data flows

Host
access
Script starts command
Select I2C/SPI channel and parameters
USB Bulk transfer
Fixed frame header + payload
Firmware executes
Bus task processes reads and writes
JSON result
Structured output for automated analysis
Slave
emulation
Configure slave address
Raw / mailbox / register mode
Write cache
8KB virtual address space
External host access
Reads and writes through the register model
Event polling
Detects address and data changes

Core Capabilities

Parallel multi-channel I2C access

Four independent I2C channels can each be configured as master or slave, making the device suitable for multi-station fixtures and multi-device access.

Register Cache Simulation

The I2C slave path supports an 8KB cache, 16-bit virtual addresses, and an event queue, allowing it to emulate EEPROM or register-based devices.

SPI host transfer

Single-channel SPI configuration and full-duplex transfer cover CPOL/CPHA, bit order, data width, SCLK, and DMA options.

VCC protection strategy

The I2C power output has threshold detection and can refuse to enable output when external voltage is present, reducing the risk of incorrect power injection.

Independent maintenance path

OTA uses independent USB interfaces and endpoints, separating normal debugging from firmware upgrade workflows for production and field maintenance.

Automation friendly

The Python CLI outputs JSON and is paired with self-test scripts for enumeration, function checks, performance tests, and non-destructive OTA checks.

Quick specs

USB enumeration

VID:PID is 34b7:e481. The product string is UTools SI104, and interface strings distinguish I2C, SPI, and OTA paths.

Interface layout

The default firmware exposes six Vendor Bulk interfaces: I2C CH0..CH3, SPI, and OTA. Windows uses MS OS 2.0 descriptors for WinUSB binding.

I2C rate

Supports standard, fast, fast-plus, and custom rates. Common settings are 100kHz, 400kHz, and 1MHz.

Protocol payload

The private protocol supports a maximum single-frame data area of 512 bytes and uses a fixed 12-byte frame header for stable cross-platform transfer.

Endpoint assignment

I2C uses 0x01..0x04 / 0x81..0x84, SPI uses 0x05 / 0x85, and OTA uses 0x06 / 0x86.

Hardware interface

The 24-pin dual-row boxed header groups SPI0, I2C3, I2C2, I2C1, and I2C0 for stable fixture wiring.

Category Summary
Product name UTools-SI104 USB-to-I2C/SPI Bridge
USB identification VID 0x34B7, PID 0xE481
USB interface 4-way I2C Bulk, 1-way SPI Bulk, 1-way OTA Bulk
I2C capabilities Host read and write, read after write, scan, slave raw/mailbox/register, virtual address page, event polling
SPI capabilities Configuration, full-duplex transfer, abort recovery, optional DMA
Maintenance capability OTA upgrade, Windows WinUSB automatic binding, Linux I2C kernel driver prototype

Which applications are suitable?

Board-level R&D and debugging

Quickly access sensors, power chips, EEPROM, SPI Flash, and other peripherals while reducing temporary wiring and repeated scripts.

Production function test

One device covers multi-channel I2C and SPI loopback verification and feeds JSON reports into the test platform.

Protocol bring-up

Use the I2C slave register cache to emulate the target module and quickly reproduce master-side read/write behavior.

Linux system integration

Map the private Bulk I2C path to standard i2c_adapter instances through the Linux kernel driver, allowing common i2c-tools to access it directly.

Delivery Features

Synchronized firmware and host tools

Protocol definitions, Python tools, and firmware command sets are maintained in the same repository to reduce version drift.

Complete observability

Status queries, version reads, VCC measurement, error codes, and event queues make link troubleshooting more direct.

Reusable test coverage

The self-test script includes smoke, enum, feature, perf, and OTA suites that can be selected according to the project stage.

Maintenance and upgrade closed loop

The OTA tool supports write, activation, and reset options, making it suitable for production-line maintenance and field issue recovery.

Typical workflow

1
Connect device
Confirm USB enumeration as 34b7:e481 and identify the I2C/SPI/OTA interfaces.
2
Install dependencies
Install pyusb and confirm automatic WinUSB binding under Windows, refreshing cached state if needed.
3
Configure bus
Set the I2C mode, SPI timing, and required VCC policy.
4
Run access flow
Complete device access, cache emulation, and event polling through the CLI or library API.
5
Verify and maintain
Run self-tests to generate reports and upgrade firmware through the OTA channel when needed.

Manual

UTools-SI104 Technical Manual V1.1
USB to 4-channel I2C / 1-channel SPI bridge with private Bulk protocol
Project Content
Document name UTools-SI104 Technical Manual V1.1
Applicable products UTools-SI104 USB-to-I2C/SPI Bridge
Applicable objects Firmware development, PC development, testing, FAE, project integration personnel
Document type Technical interface, protocol, tool chain and debugging manual
Document version V1.1
USB identification VID 0x34B7, PID 0xE481

Directory and reading path

Quick access

  1. Read Product Positioning, USB Enumeration and Interface Layout first.
  2. Windows host computer reads WinUSB access first; Linux system integration reads Linux I2C driver first.
  3. Read Python CLI usage when you need to debug scripts.

Protocol Development

  1. Read Private Protocol Frame Format, Status Code, Command Set first.
  2. I2C master/slave function reading I2C functional model.
  3. Please read SPI Function Model for SPI; OTA is only described as a host-managed maintenance capability.

Testing and Maintenance

  1. Production line fixture reading Hardware self-test.
  2. Read Debugging and Diagnosis for problem location.
  3. Firmware maintenance is handled by the host application.

1. Product positioning

UTools-SI104 is a USB multi-bus bridge device. The current project default firmware uses the USB Vendor Bulk private protocol, which is targeted at the following scenarios:

  • The host computer directly accesses 4 independent I2C buses.
  • The host computer accesses 1 SPI bus.
  • Configure any I2C channel as a slave, providing three types of behaviors: raw, mailbox, and register.
  • Emulates a register-based device using 8KB I2C slave cache and virtual address page mapping.
  • Application firmware maintenance through an independent OTA function.
  • Automatic binding of WinUSB via MS OS 2.0 descriptor on Windows side.
  • Map to standard i2c_adapter on Linux side via private Bulk I2C driver.

2. System architecture

Level Module Description
PC tools si104_cli.py Command line entry, output JSON, covering common I2C/SPI operations
Host computer protocol si104_private_proto.py USB Bulk transmission, frame packaging, status code processing
Linux driver kernel_driver/si104_i2c.c / kernel_driver/si104_spi.c First-stage drivers from private Bulk I2C/SPI to standard Linux subsystems
USB Descriptor USB composite device Interface, endpoint, string, and WinUSB descriptors
RTOS routing runtime dispatcher USB RX/TX queues and I2C/SPI task dispatch
I2C protocol I2C engine I2C master, slave cache, VCC, and event queue
SPI protocol SPI engine SPI configuration, transfer, and abort recovery

2.1 Runtime data path

text
Host CLI / app
    |
| USB Bulk frame
    v
SI104 USB RX task
    |
    +--> I2C task --> private_i2c.c --> i2c_port.c
    |
    +--> SPI task --> private_spi.c --> spi_port.c
    |
    +--> Host-managed OTA maintenance path
    |
    v
USB TX lane --> Host response

The USB interrupt side is only responsible for collecting packets into the queue and remounting the endpoint. The protocol execution is completed in the RTOS task to avoid executing time-consuming bus transactions in the interrupt context.

3. USB enumeration and interface layout

3.1 Device identification

item value
VID 0x34B7
PID 0xE481
Manufacturer LanMotion
Product UTools SI104
Serial default value SI1040001
bcdDevice 0x0105

3.2 Interfaces and endpoints

Interface Function OUT EP IN EP Interface string
0 I2C CH0 0x01 0x81 SI104 BULK I2C0
1 I2C CH1 0x02 0x82 SI104 BULK I2C1
2 I2C CH2 0x03 0x83 SI104 BULK I2C2
3 I2C CH3 0x04 0x84 SI104 BULK I2C3
4 SPI 0x05 0x85 SI104 BULK SPI
5 OTA function Host application managed Host application managed Host maintenance capability

The default I2C/SPI interfaces are Vendor Specific classes with private subclasses for I2C/SPI and protocol field 0x04. OTA is managed by the host application, and this document does not define its protocol details.

3.3 Windows WinUSB

Firmware releases MS OS 2.0 descriptors and Windows should automatically bind MI_00 to MI_05 as WinUSB:

Windows Interface Features
MI_00..MI_03 I2C CH0..CH3
MI_04 SPI
MI_05 OTA function

If Windows still shows Code 28, run:

powershell
.\tools\windows_driver\refresh_si104_winusb.ps1

Then reseat the device.

4. External connector

The external connector of the device is 24PIN double row horn socket (2x12), divided from left to right:

  • SPI0
  • I2C3
  • I2C2
  • I2C1
  • I2C0
Pin Column 1 2 3 4 5 6 7 8 9 10 11 12
Partition SPI0 SPI0 SPI0 SPI0 I2C3 I2C3 I2C2 I2C2 I2C1 I2C1 I2C0 I2C0
Top row D2 D0 CS GND SCL SCL GND
Bottom row D3 D1 CLK VCC SDA VCC SDA VCC

Description:

  • Each I2C channel occupies 2 columns: signal column SCL/SDA and power column GND/VCC.
  • The SPI0_ prefix is ​​omitted for the SPI signals in the table, and the I2C signals distinguish the channels through partitions.
  • The I2C VCC output is controlled by firmware protection logic and detects external voltage before turning on.

5. Private protocol frame format

All multibyte fields are little-endian. USB OUT requests and USB IN responses use the same frame header.

c
typedef struct __attribute__((packed)) {
    uint16_t magic;       // 0xA55A
    uint8_t  version;     // 0x01
    uint8_t  cmd;         // command id
    uint8_t  channel;     // i2c: 0..3, spi: 0
    uint8_t  reserved;    // 0
    uint16_t seq;         // host sequence id
    uint16_t payload_len; // payload bytes
    uint16_t status;      // response status, request=0
} private_proto_hdr_t;
Field Description
magic Fixed 0xA55A, used to quickly identify protocol frames
version Currently 0x01
cmd Command ID
channel I2C uses 0..3, SPI uses 0
seq Host serial number, returned unchanged in the response to facilitate matching
payload_len Data payload length
status Fill in 0 for request, fill in status code for response

Agreement restrictions:

  • PRIVATE_PROTO_MAX_DATA = 512
  • The maximum frame length is 12 + 512 = 524 bytes.
  • The I2C_MASTER_XFER request payload contains an 8-byte transaction header, so a master write can carry up to 504 bytes of data.
  • When VCC telemetry is enabled, the I2C_MASTER_XFER response reserves a 6-byte tail; a master read can return up to 506 bytes. With VCC telemetry disabled, a master read can return 512 bytes.
  • I2C_REG_WRITE request payload contains a 4-byte offset/length header, so a maximum of 508 bytes of cached data can be written at a time.
  • The SPI_XFER request payload contains an 8-byte transaction header, so SPI TX can carry up to 504 bytes and SPI RX can return up to 512 bytes.

6. Status code

value name meaning
0 OK Success
1 BAD_MAGIC Frame header magic error
2 BAD_VERSION Protocol version mismatch
3 BAD_LENGTH Illegal length
4 BAD_CMD Unknown command
5 BAD_STATE Current status not allowed
6 BAD_PARAM Illegal parameter
7 IO_ERROR Low-level bus or USB I/O error
8 TIMEOUT Operation timeout
9 UNSUPPORTED Current firmware does not support
10 BUSY Resource busy
11 NO_POWER I2C power supply/pull-up detection does not meet the conditions

7. Command set

7.1 Common commands

Command ID Description
PING 0x01 Connectivity test
GET_VERSION 0x02 Read protocol/firmware capability information
GET_STATUS 0x03 Read channel status

7.2 I2C commands

Command ID Description
I2C_CONFIG 0x10 Configure I2C channel role, rate, slave mode
I2C_MASTER_XFER 0x11 Host write, read, read after writing
I2C_SLAVE_READ 0x12 Slave RX data reading
I2C_SLAVE_WRITE 0x13 Slave TX data preparation
I2C_ABORT 0x14 Abort current operation
I2C_RESET 0x15 Channel reset
I2C_MAILBOX_PUSH 0x16 Write mailbox TX data
I2C_MAILBOX_POP 0x17 Read mailbox RX data
I2C_REG_WRITE 0x18 Write register cache
I2C_REG_READ 0x19 Read register cache
I2C_REG_REPLY 0x1A Use cache to generate slave reply
I2C_EVENT_POLL 0x1B Polling slave cache events
I2C_VADDR_SET 0x1C Set virtual address page mapping
I2C_VADDR_GET 0x1D Read virtual address page mapping
I2C_VCC_SET 0x1E Control I2C VCC output
I2C_VCC_THRESHOLD 0x1F Query/set VCC protection threshold

7.3 SPI commands

Command ID Description
SPI_CONFIG 0x20 Configure SPI Timing
SPI_XFER 0x21 SPI transmission
SPI_ABORT 0x22 Abort and resume

8. I2C functional model

8.1 Channel configuration

c
typedef struct __attribute__((packed)) {
    uint8_t  role;        // 0 master, 1 slave
    uint8_t  i2c_mode;    // 0 standard, 1 fast, 2 fast-plus, 3 custom
    uint8_t  addr_10bit;  // 0/1
    uint8_t  reserved;    // slave mode and register flags
    uint32_t bus_hz;
    uint16_t slave_addr;
    uint16_t timeout_ms;
} private_i2c_cfg_req_t;

The reserved field bitwise encodes the slave behavior:

Bits Description
bits[1:0] Slave logic: 0 raw, 1 mailbox, 2 register
bit2 Register address width: 0 is 8-bit, 1 is 16-bit
bit3 Data width tip: 0 is 8-bit, 1 is 16-bit
bit4 16-bit data byte order: 0 little, 1 big

Rate recommendations:

Mode Typical Rate
standard 100kHz
fast 400kHz
fast_plus 1MHz
custom 10000..1000000 Hz

8.2 Host transmission

c
typedef struct __attribute__((packed)) {
    uint16_t addr;
    uint16_t flags;
    uint16_t tx_len;
    uint16_t rx_len;
    uint8_t  data[];
} private_i2c_master_xfer_req_t;
Conditions Behavior
tx_len > 0 && rx_len == 0 I2C write
tx_len == 0 && rx_len > 0 I2C read
tx_len > 0 && rx_len > 0 I2C write-then-read, often used for register reading

When firmware detects a lack of available pull-up power on the I2C bus, the transfer may return NO_POWER. The host computer should query or set VCC first.

8.3 Slave mode

Mode Applicable Scenario Behavior
raw Simple byte stream verification Directly read and write slave RX/TX buffer
mailbox Two-way message exchange Host computer push/pop mailbox, external I2C host read and write messages
register Register or EEPROM emulation Resolve external host writes into address and data, map to cache

Register mode supports:

  • 8-bit or 16-bit register address.
  • 8-bit or 16-bit data width hint.
  • little/big endian data tips.
  • The event queue records external host writes, pointer settings, and host-side cache writes.

8.4 Virtual address cache

Each I2C channel has 8KB cache divided into 32 256B pages:

  • page0 is fixedly mapped to logical address 0x00xx.
  • page1..page31 can be bound to the virtual high byte 0x01..0xFE.
  • The unbinding value is 0xFF.
  • Unmapped virtual page reads return 0x00, writes are ignored.

Logical address mapping:

text
addr = (hi << 8) | lo

if hi == 0x00:
    physical = lo
else if hi is mapped:
    physical = mapped_page * 256 + lo
else:
    unmapped

8.5 Event Polling

I2C_EVENT_POLL response:

c
typedef struct __attribute__((packed)) {
    uint8_t  type;       // 0 no event, 1 master write, 2 pointer set, 3 host reg write
    uint8_t  sample_len; // 0..32
    uint16_t addr;
    uint16_t len;
    uint16_t dropped;
    uint8_t  sample[32];
} private_i2c_event_poll_rsp_t;

The host computer can know which logical address, length and sampling data are written by the external I2C host through event polling, and observe whether packet loss occurs in the event queue.

8.6 VCC control

I2C VCC is a device-level shared rail for all four I2C connectors, so enabling it affects CH0..CH3 and is not CH0-only. The host CLI routes VCC commands through the CH0 private endpoint by default to keep the tool entry stable; the effect still applies to all I2C channels:

  • I2C_VCC_SET: Turn on/off output, optionally save status.
  • I2C_VCC_THRESHOLD: Query or set the external voltage protection threshold.

Response fields include output status, persistence status, threshold, ADC voltage, failure reason, operation result, and measured voltage. Common reasons for failure:

value name description
0 none No failures
1 over_threshold It is detected that the external voltage exceeds the threshold and refuses to turn on the output
2 adc_read_fail ADC read failed
3 nvs_fail Persistence failed
4 policy_not_ready Protection policy not ready

9. SPI functional model

9.1 SPI configuration

SPI supports master mode and single-I/O slave mode. The standard use case is master mode; slave mode is intended for external SPI master fixture verification.

Parameters Description
cpol / cpha SPI Mode0..Mode3
bit_order msb or lsb
data_bits Commonly used 8/16/32
io_mode Currently commonly used 0=single
sclk SPI master clock, limited to 40 MHz in the standard firmware
timeout Firmware side timeout
use_dma Prefer DMA for master single-I/O transfers

Notes:

  • In master mode, sclk values above 40 MHz are rejected by the CLI/client library or by firmware as a parameter error.
  • For master single-I/O transfers larger than the peripheral FIFO capacity, firmware automatically prefers DMA when DMA is available.
  • Slave mode supports single-I/O only and requires an external SPI master to provide SCLK for verification.

9.2 SPI transmission

SPI_XFER supports:

  • tx-only.
  • rx-only.
  • full-duplex.
  • Single transfer payload is subject to the protocol limit of 512 bytes.
  • DMA options can be overridden on a single transfer. The no-DMA option can force the FIFO path for comparison.

Typical read JEDEC ID:

bash
python si104_cli.py spi-config --cpol 0 --cpha 0 --bit-order msb --data-bits 8 --sclk 1000000
python si104_cli.py spi-xfer --tx "9F" --rx-len 3

10. OTA Function

The standard firmware keeps an independent OTA maintenance capability for host application firmware upgrade and maintenance. This document does not define OTA operation flows, script interfaces, or upgrade parameters; public protocol scripts only cover I2C/SPI private protocol functions.

11. Python CLI usage

11.1 Install dependencies

bash
pip install pyusb

11.2 Global parameters

Parameters Default value Description
--vid 0x34B7 USB Vendor ID
--pid 0xE481 USB Product ID
--serial None Specify the serial number when using multiple devices
--timeout-ms 3000 USB transfer timeout

11.3 Parameter list

Type convention:

Type tag Meaning Example
int Decimal integer 1000
auto_int Automatically identify base, support 0x 0x50 / 80
str(hex bytes) Hexadecimal byte string, supports space, comma, colon separation "00 01 A5"
str Ordinary string "SI1040001"

Global parameters:

Parameters Type Required Default value Optional range/format Description
--vid auto_int No 0x34B7 0x0000..0xFFFF USB Vendor ID
--pid auto_int No 0xE481 0x0000..0xFFFF USB Product ID
--serial str No None Any serial number string It is recommended to specify when using multiple devices
--timeout-ms int No 3000 >0 USB transmission timeout, unit ms

I2C parameters:

Parameters Type Required Default value Optional range/format Applicable commands
--ch int Yes None 0/1/2/3 i2c-* commands other than i2c-vcc-*
--role str No master master / slave i2c-config
--mode str/int No standard standard/std/normal/0, fast/1, fast_plus/fast+/fp/2, custom/3 i2c-config
--addr10 int No 0 0/1 i2c-config
--bus-hz int Conditions required None 10000..1000000, only valid in custom mode i2c-config
--slave-addr auto_int No 0x30 0x0000..0x03FF i2c-config
--timeout int No 1000 >0 i2c-config
--slave-mode str No raw raw/mailbox/reg i2c-config
--reg-addr-width int No 8 8/16 i2c-config
--data-width int No 8 8/16 i2c-config
--data-endian str No little little/big i2c-config
--addr auto_int Yes None 0x0000..0x03FF i2c-write/read/wr
--data str(hex bytes) Depending on the command None or empty string i2c-write<=504, i2c-reg-write<=508, slave/mailbox <=512 bytes i2c-write, i2c-slave-write, i2c-mailbox-push, i2c-reg-write
--tx str(hex bytes) Yes None <=504 bytes i2c-wr
--rx-len int Depending on the command None or 0 1..506 with default VCC telemetry, 1..512 with --monitor-vcc 0 i2c-read, i2c-wr
--flags auto_int No 0 0x0000..0xFFFF i2c-write/read/wr
--monitor-vcc int No 1 0/1 i2c-write/read/wr, i2c-scan
--start auto_int No 0x03 0x00..0x7F i2c-scan
--end auto_int No 0x77 0x00..0x7F i2c-scan
--show-fail int No 0 0/1 i2c-scan
--len int Yes None >=0, recommended <=512 i2c-slave-read, i2c-reg-read, i2c-reg-reply
--max-len int No 512 1..512 i2c-mailbox-pop
--offset auto_int Yes None 0x0000..0xFFFF i2c-reg-write/read/reply
--interval-ms int No 200 >=1 i2c-event-watch
--count int No 0 0 or a positive integer i2c-event-watch
--show-empty int No 0 0/1 i2c-event-watch
--slot int Yes None 1..31 i2c-vaddr-set
--vaddr auto_int Yes None 0x01..0xFF, 0xFF means unbundling i2c-vaddr-set
--enable int Yes None 0/1 i2c-vcc-set
--save int No 0 0/1 i2c-vcc-set, i2c-vcc-threshold
--set-mv int No None 100..6000 mV i2c-vcc-threshold

i2c-ping, i2c-version, i2c-status, i2c-event-poll, i2c-vaddr-get, i2c-reset only requires --ch. i2c-vcc-status/set/threshold routes through CH0 by default, usually with no need to specify --ch; VCC output affects CH0..CH3 at the same time.

SPI parameters:

Parameters Type Required Default value Optional range/format Applicable commands
--cpol int No 0 0/1 spi-config
--cpha int No 0 0/1 spi-config
--bit-order str No msb msb/lsb spi-config
--data-bits int No 8 1..32, commonly used 8/16/32 spi-config
--io-mode int No 0 Currently commonly used 0=single spi-config
--sclk int No 1000000 1..40000000 spi-config
--timeout int No 1000 >0 spi-config
--use-dma int No 0 0/1 spi-config, spi-xfer
--tx str(hex bytes) No Empty string 0..504 bytes spi-xfer
--rx-len int No 0 0..512 spi-xfer
--flags auto_int No 0 0x0000..0xFFFF spi-xfer
--no-dma int No 0 0/1 spi-xfer

11.4 I2C Master Example

bash
# Connectivity test
python si104_cli.py i2c-ping --ch 0

# Configure 400kHz I2C master
python si104_cli.py i2c-config --ch 0 --role master --mode fast --timeout 1000

# Write register
python si104_cli.py i2c-write --ch 0 --addr 0x50 --data "00 01 A5"

# Read after writing
python si104_cli.py i2c-wr --ch 0 --addr 0x50 --tx "00" --rx-len 8

# Disable the VCC telemetry tail when reading the full 512 bytes
python si104_cli.py i2c-read --ch 0 --addr 0x50 --rx-len 512 --monitor-vcc 0

# Scan address
python si104_cli.py i2c-scan --ch 0 --start 0x03 --end 0x77

11.5 I2C Slave Buffer Example

bash
# Configure CH0 as a register slave with 16-bit address + 8-bit data
python si104_cli.py i2c-config --ch 0 --role slave --slave-addr 0x30 --slave-mode reg --reg-addr-width 16 --data-width 8

# Bind slot1 to virtual high byte 0x12
python si104_cli.py i2c-vaddr-set --ch 0 --slot 1 --vaddr 0x12

# Write cache
python si104_cli.py i2c-reg-write --ch 0 --offset 0x1200 --data "11 22 33 44"

# Read cache
python si104_cli.py i2c-reg-read --ch 0 --offset 0x1200 --len 16

# Polling events
python si104_cli.py i2c-event-poll --ch 0

11.6 VCC Example

bash
# Query VCC status
python si104_cli.py i2c-vcc-status

# Request to open VCC without saving
python si104_cli.py i2c-vcc-set --enable 1

# Set the threshold to 1000mV and save
python si104_cli.py i2c-vcc-threshold --set-mv 1000 --save 1

12. Linux I2C driver

kernel_driver/si104_i2c.c is the first stage out-of-tree Linux kernel module, which aims to register the 4-way SI104 private Bulk I2C interface as a standard Linux I2C adapter.

Realized scope:

  • Bind I2C interface 0..3 of 34b7:e481.
  • CH0..CH3 use 0x01/0x81 to 0x04/0x84 respectively.
  • Supports writing one message, reading one message, and reading two messages after writing repeated-start.
  • Supports common SMBus access through I2C core emulation, but does not support SMBus quick yet.
  • The shared VCC output under firmware protection can be requested via module parameters or sysfs. VCC affects CH0..CH3 at the same time.

Loading example:

bash
sudo insmod si104_i2c.ko enable_vcc=1 bus_hz=400000 i2c_timeout_ms=1000 usb_timeout_ms=3000
i2cdetect -l
sudo i2cdetect -y -r <bus>

Runtime shared VCC control:

bash
find /sys/bus/usb/drivers/si104_i2c -name vcc_enable -print
echo 1 | sudo tee /sys/bus/usb/drivers/si104_i2c/<usb-interface>/vcc_enable
echo 0 | sudo tee /sys/bus/usb/drivers/si104_i2c/<usb-interface>/vcc_enable

Module parameters:

Parameters Description
bus_hz I2C frequency, range 10000..1000000
i2c_timeout_ms Firmware side I2C timeout
usb_timeout_ms Host side USB Bulk timeout
enable_vcc Request to open shared VCC during probe; affects CH0..CH3

Unimplemented scope:

  • SI104 private slave/register/mailbox/vaddr control plane.
  • SPI controller driver.
  • OTA maintenance capability is provided by the host application.

13. Hardware self-test

Self-test script path:

bash
test_scripts/si104_self_test.py

Default fixture wiring:

  • I2C CH0 <-> CH1
  • I2C CH2 <-> CH3
  • SPI MOSI <-> MISO

Commonly used commands:

bash
# Default smoke test
python test_scripts/si104_self_test.py

# Private protocol non-destructive matrix
python test_scripts/si104_self_test.py --suite private --report-json reports/si104_self_test_private.json

# Complete matrix
python test_scripts/si104_self_test.py --suite all --report-json reports/si104_self_test_all.json

# Performance test
python test_scripts/si104_self_test.py --suite perf --perf-iterations 1000 --perf-payload-len 256

Test suite:

Kits Contents
smoke Private endpoint, I2C bidirectional loopback, SPI MOSI-MISO loopback
enum USB descriptor, interface and endpoint layout
feature I2C/SPI Non-Destructive Function Matrix
perf Throughput and delay matrix
private enum + smoke + feature + perf
all Current equivalent complete non-destructive matrix

By default, --vcc auto will first request the firmware VCC protection logic to turn on the I2C pull-up power supply; if it detects that the external voltage has exceeded the threshold, the firmware will refuse to turn on the output, and the script will continue to use the external power supply.

14. Debugging and Diagnostics

14.1 Device not found

Check:

  • Whether the VID/PID is 34b7:e481.
  • Whether Windows has bound WinUSB.
  • Whether --serial is required in multi-device scenarios.
  • Whether the current user has USB access rights under Linux.

14.2 I2C returns NO_POWER

Possible reasons:

  • The target I2C bus does not have an external pull-up supply.
  • SI104 Internal VCC is not open.
  • The external voltage exceeds the protection threshold and the firmware refuses to turn on the VCC output.

suggestion:

bash
python si104_cli.py i2c-vcc-status
python si104_cli.py i2c-vcc-set --enable 1

14.3 I2C read and write timeout

Check:

  • Whether the target address exists.
  • Whether --mode and --bus-hz are suitable for the target device.
  • I2C line sequence, pull-up, and level are correct.
  • If the slave mode is not reset and the channel status remains, you can execute i2c-reset.

14.4 Abnormal SPI reading

Check:

  • Whether the CPOL/CPHA matches the target device.
  • Whether the MISO/MOSI/CLK/CS line sequence is correct.
  • Is sclk above 40 MHz or beyond the fixture signal-integrity margin?
  • Whether it is necessary to turn off or turn on DMA for comparison.

15. Technical specifications

Category Specifications
USB USB Vendor Bulk composite device
VID/PID 0x34B7 / 0xE481
I2C channel 4 channels, CH0..CH3
I2C role master / slave
I2C speed standard, fast, fast-plus, custom 10000..1000000 Hz
I2C slave mode raw, mailbox, register
I2C cache 8KB per channel, 32 pages, 256B per page
SPI channel 1 channel, master mode as the primary use case, single-I/O slave verification supported
SPI configuration CPOL/CPHA, bit order, data bits, SCLK up to 40 MHz, DMA options
Protocol payload Maximum 512B payload per frame
OTA Host-application-managed independent maintenance capability
Windows MS OS 2.0 WinUSB automatic binding
Linux Private Bulk I2C kernel driver prototype

16. Release material index

Material Purpose
UTools-SI104 product overview Product positioning, typical connections, and capability overview
UTools-SI104 technical manual Interfaces, protocol behavior, CLI parameters, and diagnostics
si104_cli.py Python CLI
si104_private_proto.py Private protocol Python client
test_scripts/si104_self_test.py Hardware self-test
kernel_driver/si104_i2c.c / kernel_driver/si104_spi.c Linux kernel driver prototypes
release.json / tools_manifest.json Cloud release index and tool package checksum manifest

17. Revision History

Version Date Description
V1.1 2026-05 Updated SPI DMA/40 MHz limits, OTA function description, cloud release index, and release material index
V1.0 2026-05 Completed the product overview and technical manual split, covering I2C / SPI interfaces, host access, script tools and driver instructions

Copyright (c) 2026 LanMotion.