RAKWireless / udp-packet-forwarder

UDP Packet Forwarder for Docker
MIT License
27 stars 23 forks source link

can not connect to /dev/ttyAMC1 #13

Closed hakaiderii closed 6 months ago

hakaiderii commented 7 months ago

hi

if i write in docker-compose.yml

devices:

it alway look for dev/ttyACM0 but my concentrator connect to /dev/ttyACM1

image

xoseperez commented 7 months ago

Hi @hakaiderii By adding /dev/ttyACM1 to your devices section you are making it accesible to the container, but you still have to tell the service to use it instead of the default one using the DEVICE variable. It will be something like this:

devices:
  - /dev/ttyACM1
 environment:
  DEVICE: /dev/ttyACM1

Or you can mount the device to the default path inside the container:

devices:
  - /dev/ttyACM1:/dev/ttyACM0

Another option is to run in privileged mode, which means all devices in the host ara available to the container, but I guess this is what you are trying to avoid,

xoseperez commented 6 months ago

I'm closing this issue. Please feel free to reopen if you need further assistance.