Skip to content
This repository was archived by the owner on Mar 7, 2023. It is now read-only.
This repository was archived by the owner on Mar 7, 2023. It is now read-only.

No devices detected in balenaOS Docker container #174

@iKK001

Description

@iKK001

Any idea why this library does not work when executed inside a balenaOS docker container ?

I am not sure whether it is the library or whether it is the combination within the docker service.

Fact is that lsusb cmd works when logged into the running docker image. Also /dev shows the USB-device correctly as ttyUSB0 when observing in a terminal inside the running docker image. So the usb-detection library does not recognize this for some reason.

Everything works when locally running my code on a Mac. I can detect plugging a USB-device and the usb-detection library gives me the callback:

import usbDetect from "usb-detection"
usbDetect.startMonitoring()
usbDetect.on("add", () => {
     // only works when run locally on a Mac - but does not work inside a bridged balenaOS docker service !!!!!!!
}

I do ENV UDEV=1 in my Dockerfile and add priviledge: true to the service in docker-compose.yml file. But it does not seem to work.

Any idea why ??

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions