Skip to content

USB passthrough to apps silently drops serial devices whose by-id name or serial contains a colon (for example ESP32-S3 boards) #342

Closed

Description

@nixfred

What happens

Serial devices whose serial number contains : (ESP32-S3 and C3 boards with the built-in USB serial/JTAG use their MAC address, so the link looks like /dev/serial/by-id/usb-Espressif_USB_JTAG_serial_debug_unit_F0:F5:BD:01:88:2C-if00) are listed and can be attached to an app, but:

  • usbComposeOverlay() (omarchyd/usb.mjs, lines ~99-106) filters paths with /^\/dev\/(serial\/by-id\/usb-[A-Za-z0-9._+-]+|...)$/, which has no : in the class. udev's by-id names can contain :, =, @ and #. The path is dropped, so the app is started without the device and without any message.
  • USB_SERIAL (line 81, and the helper's own copy at helper/helper.mjs line 68) also rejects the serial, so usb-allow is skipped (no udev rule giving the server user access) and hostdevXml omits the serial for VMs. Both are silent as well (.catch(() => {})).

The app shows the stick as attached, but the container never receives it.

How to reproduce

import {usbComposeOverlay} from './omarchyd/usb.mjs'
usbComposeOverlay(['web'], [{path: '/dev/serial/by-id/usb-Espressif_USB_JTAG_serial_debug_unit_F0:F5:BD:01:88:2C-if00'}])
// actual: ''   (no devices: section at all)
usbComposeOverlay(['web'], [{path: '/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0'}])
// actual: a services/web/devices overlay, as expected

Expected: the stick is passed through to the app, or the user is told it cannot be.

Suggested fix

Do not drop the device silently. Note that simply adding : to SERIAL_PATH is not enough: the overlay writes the short form HOST:CONTAINER, and colons inside the path would be read as separators. Options: bind the device's resolved node (/dev/ttyACMn or /dev/ttyUSBn, which SERIAL_PATH already allows and listHostUsb already returns as node) when the by-id path has characters the short form cannot carry, or use the compose long syntax for devices. Independently, USB_SERIAL (here and in the helper) can accept : (the value is already quoted in the udev rule and escaped in the XML).

Environment

Omarchy Server main (0786ba9, 0.9.50), Node 26.

Activity

  1. calledtoconstruct commented on Nov 22, 2026

    @calledtoconstruct
    Collaborator

    Working to resolve this.

    No open pull request references this issue, and no one has commented that they are working on it.

    #526, #525, #524, #527, #133, #102, #777, #129, #239, #243, #236, #233, #232, #142, #242, and #443 share the app store with this and will land in one pull request.

    🤖 Generated with Grok 4.7

  2. calledtoconstruct commented on Nov 22, 2026

    @calledtoconstruct
    Collaborator

    Thanks @nixfred. A serial device whose by-id name contains a colon is passed through as one path, so the colon is not read as a host and container split. This ships in #876.

    🤖 Generated with Grok 4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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