i have two USB serial devices and i want to use them in two containers. One device is a normal arduino uno and the other device is a zebra barcode scanner.
Now i tried to connect them and i dont see the /dev/ devices in my container.
I used the following image: hilschernetpi/netpi-debian-stretch with privileged mode enabled.
In "dmesg" i see the devices plugged in and discovered right, but no dev device.
How can i make it work?
one thing I have to mention here about using priviledge mode on netPI. On a standard Raspberry Pi utillizing Docker in mode "priviledged" ALL /dev devices are automatically mapped. Not so with netPI. netPI includes a special version Docker mapping not ALL available host devices into the container automatically. This is because of security reasons ... else you could easily get access to the netPI SD card drive and hack netPI's security software and root system. This is what we definitively not want.
So back to your problem. Yes indeed because of my explanation above you have to map the devices manually from the beginning and start of the container. Linux maps those units to host devices called /dev/ttyUSBx if they are serial port device and x for any next device starting with 0 then 1 etc.
So you have to insert the serial devices while netPI was booting. Then you have to map /dev/ttyUSB0 and /dev/ttyUSB1 and also the bus device /dev/bus.
This should work
Armin
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)
one thing I have to mention here about using priviledge mode on netPI. On a standard Raspberry Pi utillizing Docker in mode "priviledged" ALL /dev devices are automatically mapped. Not so with netPI. netPI includes a special version Docker mapping not ALL available host devices into the container automatically. This is because of security reasons ... else you could easily get access to the netPI SD card drive and hack netPI's security software and root system. This is what we definitively not want.
So back to your problem. Yes indeed because of my explanation above you have to map the devices manually from the beginning and start of the container. Linux maps those units to host devices called /dev/ttyUSBx if they are serial port device and x for any next device starting with 0 then 1 etc.
So you have to insert the serial devices while netPI was booting. Then you have to map /dev/ttyUSB0 and /dev/ttyUSB1 and also the bus device /dev/bus.
This should work
Armin
Hi Armin,
i see. It make totally sense to not automap everything.
I tried to map it the following way:
But when i try to map the devices in portainer i got the following error message:
I do it as you said. Plugged in the USB devices, restarted the netPI and then start a container with mapped USB devices.
What can we do next?
August-24th-2018, 10:03 AM (This post was last modified: August-24th-2018, 10:03 AM by Armin@netPI.)
Thank you for your fast reaply.
I followed to what you configured and everything is fine.
I googled a little bit about Zebra Scanner for example. What I found out was that USB it not always USB under Linux ... and how devices are supported by a kernel driver when the are connected to a USB even if they are based on a simple serial communication is not always the same under Linux.
Here comes now the point where I have doubts. You should start with the Zebra device only for a test because I don't know if netPI Linux kernel has included the hidraw kernel module driver included or not. But it is worth it to test. So start netPI with Zebra only, map /dev/bus and /dev/hidraw0 and see what happens then.
Thx
Armin
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)
=> also not working with the same error "no such device"
When i used both devices on other linux computers (debian) they appeared both as "ttyACMX". I dont know why it is not working here.
The driver of the scanner is one thing, but i think the arduino should work?!
And indeed the debian on netPI is not different of others ... all the same kernel... so if those devices really are mapping to ttyACMx I am afraid of that the kernel mode driver is not available in the current netPI firmware.
I will keep you informed.
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)