angelnu / docker-ccu

Script to create a docker container with the CCU2 firmware
Apache License 2.0
32 stars 13 forks source link

/dev/ttyS1 does not exist under HypriotOS #14

Closed TomTom101 closed 7 years ago

TomTom101 commented 7 years ago

I am trying to run CCU2 under HypriotOS, amongst other (fixable) things this error occurs when running build.sh:

build.sh terminates w/ error docker: Error response from daemon: linux runtime spec devices: error gathering device information while adding custom device "/dev/ttyS1": lstat /dev/ttyS1: no such file or directory.

$ uname -a

Linux black-pearl 4.4.50-hypriotos-v7+ #1 SMP PREEMPT Sun Mar 19 14:11:54 UTC 2017 armv7l GNU/Linux

I have to add I could not yet get the HM-MOD-RPI-PCB radio to run within this container. The HW itself does work, I cannot get them to communicate.

Whatfor is /dev_org/ttyS1 used anyway?

angelnu commented 7 years ago

I split the build script to not require any serial port. The new deploy.sh will also only pass those devices available and not assume any particular platform.

With this the container should build and deploy in any ARM platform. Please give it a try.

TomTom101 commented 7 years ago

Wow, quick reaction! That's commitment! Unfortunately, I can't get RFD/BidCos to run outside the container either. I did all the necessary changes in /boot/cmdline.txt, /boot/config.txt, disabled hciuart.service. I am out of ideas of how I can further debug. What does bug me is that /dev/serial0 still links to ttyS0, I was expecting ttyAMA0 here. Not sure if this is relevant or not. Any idea what I could check? Thanks a lot!

angelnu commented 7 years ago

@TomTom101 my proposal would be to wait for the homematic IP USB adapter that ELV announced for their next issue. Then we do not have to worry about the PI serial port and the special device driver. I am myself using a LAN gateway as antenna so now I can start the CCU2 docker container in any of my Raspis/OrangePIs.

Each Linux distro uses a different dev file for the serial port. I am using an Orange PI and there it is /dev/ttyS0. If this would be the problem a fix in the entrypoint.sh would address it.

How did you check that the adapter is not working outside the docker? Did you try to run rfd manually on the host?

TomTom101 commented 7 years ago

I have a Raspbian installation on a different cart where I used the RFD https://github.com/eq-3/occu to see whether the antenna is good to begin with. It does connect there. I did the same on the Hypriot distro (host) without avail. Hence I cannot expect it to work in the docker container either.

EDITED Ignore the part about not being able to write gpio, user error

You say the HM adapter is not yet available but announced in their journal? The "HmIP-RF USB"? I'd hope that it should make things easier.

_Ignore the part comment about

angelnu commented 7 years ago

Yep, exactly that. Then sharing USB devices with docker containers is a more frequent use case that gpios and "special" serial ports. They also explicitly mention that want to support docker with it.