Skip to content

Control CDC ACM endpoint not drained on Bitaxe Gamma over USB-IP (works fine for ASIC UART) #14

Description

@IxTechCrypto

Summary

Writes to the control CDC ACM interface hang indefinitely on my Bitaxe Gamma running current bitaxe-raw main. Writes to the ASIC UART CDC ACM on the same device work correctly. The two USB endpoints behave completely differently despite identical task structure in the firmware.

Environment

  • Bitaxe Gamma (BM1370), serial 4c792b82
  • bitaxe-raw at commit 109916f (PR Update esp-hal and flashing instructions #8 esp-hal-update, HEAD of main)
  • Flashed with cargo espflash flash --release --chip esp32s3
  • Host: Windows 11 → WSL2 Ubuntu → usbipd-win 5.3.0 forwarding the Bitaxe into WSL

Note: I have not yet tested against a native Linux host without usbipd, so it's possible this is a usbipd-side interaction rather than a bitaxe-raw bug. Flagging that up front.

What works

  • USB enumeration: lsusb -v -d c0de:cafe shows manufacturer OSMU, product Bitaxe, both CDC ACM interfaces (1-1:1.0 at ttyACM0 for control class, 1-1:1.2 at ttyACM1 for ASIC UART class, verified via /sys/class/tty/)
  • Data port drains fine: writing 4096 bytes to /dev/ttyACM1 completes in ~340 ms

What doesn't work

  • Writing any bytes to /dev/ttyACM0 (the control interface) hangs. 4096-byte write returns Write timeout after 2 s. 6-byte GPIO frame also hangs.
  • Behavior is identical whether:
    • Using Mujina (Rust, tokio-serial)
    • Using pyserial with dtr=True, rts=True explicitly set
    • Using raw echo -en '\x06\x00\x00\x00\x06\x00' > /dev/ttyACM0 from bash

Response direction was never tested because the write never completes.

Reproducer

import serial, time
s = serial.Serial("/dev/ttyACM0", 115200, timeout=0.5, write_timeout=2.0)
s.dtr = True; s.rts = True
try:
    s.write(bytes([0x55] * 4096))
    s.flush()
    print("drained")
except serial.SerialTimeoutException:
    print("hang — control endpoint not being read by firmware")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions