Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied for /dev/ttyUSB0 when use Docker #347

Open
chrissooo opened this issue Sep 1, 2024 · 1 comment
Open

Permission denied for /dev/ttyUSB0 when use Docker #347

chrissooo opened this issue Sep 1, 2024 · 1 comment

Comments

@chrissooo
Copy link

chrissooo commented Sep 1, 2024

Hi,

My Setup:

  • Raspberry Pi 4 with fresh Bookworm installation
  • USB modbus Dongle on /dev/ttyUSB0
  • ORNO 515

Start docker with following comman (also try privillage):

sudo docker run --privileged -p 8080:8080 --device=/dev/ttyUSB0 volkszaehler/mbmd run -a /dev/ttyUSB0 -d ORNO1p:1 --comset 8E1

After start following errors i see:

2024/09/01 10:20:49 mbmd 0.13 (fa6b574)
2024/09/01 10:20:49 config: creating RTU connection for /dev/ttyUSB0 (9600baud, 8E1)
2024/09/01 10:20:49 config: declared device ORNO1p:1.0
2024/09/01 10:20:49 httpd: starting api at 0.0.0.0:8080
2024/09/01 10:20:49 initialized device ORNO1p1.1: {ORNO1p ORNO1p ORNO WE-514 & WE-515    0}
2024/09/01 10:20:49 device ORNO1p1.1 did not respond (1/3): read failed: permission denied
2024/09/01 10:20:50 device ORNO1p1.1 did not respond (2/3): read failed: permission denied
2024/09/01 10:20:51 device ORNO1p1.1 did not respond (3/3): read failed: permission denied
2024/09/01 10:20:52 device ORNO1p1.1 is offline
2024/09/01 10:20:54 device ORNO1p1.1 is offline - reactivating
2024/09/01 10:20:54 device ORNO1p1.1 did not respond (1/3): read failed: permission denied
2024/09/01 10:20:55 device ORNO1p1.1 did not respond (2/3): read failed: permission denied

When i download the nbmd binary fpr my pi and start it with the same Parameter for example:

./mbmd run -a /dev/ttyUSB0 -d ORNO1p:1 --comset 8E1

its work without problems.

can you help me, i make something wrong maybe?

@chrissooo
Copy link
Author

chrissooo commented Sep 1, 2024

A little Update and the solution. I have build the Docker Image new from Dockerfile from this repository, and then its work. Maybe becource newer version of alpine? Is it possible to rebuild and push it to docker to get a working Version from docker pull?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant