abiosoft / colima

Container runtimes on macOS (and Linux) with minimal setup
MIT License
19.78k stars 397 forks source link

serial usb device is not avaialble inside colima instance #769

Open fedulovivan opened 1 year ago

fedulovivan commented 1 year ago

Description

Could not find zigbee stick "Sonoff Zigbee 3.0 USB Dongle Plus" in the list of devices.

Version

Colima Version: colima version 0.5.5 git commit: 6251dc2c2c5d8197c356f0e402ad028945f0e830 runtime: docker arch: aarch64 client: v24.0.2 server: v23.0.6

Qemu Version: limactl version 0.17.0

Lima Version: qemu-img version 8.0.3 Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers

Operating System

Output of colima status

INFO[0000] colima is running using QEMU INFO[0000] arch: aarch64 INFO[0000] runtime: docker INFO[0000] mountType: sshfs INFO[0000] socket: unix:///Users/ivanf/.colima/default/docker.sock

Reproduction Steps

  1. plug usb device, ensure it is visible and accessible directly on host machine (using lsusb, stat, screen, starting zigbee2mqtt - all sucessfully)
    lsusb | grep Zigbee                                                                                                                         
    Bus 001 Device 001: ID 10c4:ea60 Silicon Laboratories, Inc. Sonoff Zigbee 3.0 USB Dongle Plus  Serial: d42530dd743bec119dd19c957a0af07f
    stat /dev/tty.usbserial-110                                                                                                                     
    998129413 845 crw-rw-rw- 1 root wheel 150994948 0 "Aug 12 14:17:26 2023" "Aug 12 14:17:26 2023" "Aug 12 14:17:26 2023" "Jan  1 03:00:00 1970" 65536 0 0 /dev/tty.usbserial-110
  2. create default colima instance with colima start (also tried with --vm-type=vz instead of qemu, and with --vz-rosetta - still no luck)
  3. enter colima instance shell with colima ssh
  4. list items in /dev - nothing suitable found also noticed that list of items in output of lsusb is always the same, no matter if i plug dongle to the host or not. also device /dev/ttyAMA0 is always present, no matter if i plug dongle to the host or not.
  5. try to start zigbee2mqtt in docker using device maping /dev/ttyAMA0:/dev/ttyACM0, get an error Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)

Expected behaviour

No response

Additional context

No response

AkihiroSuda commented 1 year ago

USB sharing is not merged yet

fedulovivan commented 1 year ago

USB sharing is not merged yet

wish this PR will evolve from POC to final solution