Hilscher Community Forum
Static mapping of USB-devices - Printable Version

+- Hilscher Community Forum (https://forum.hilscher.com)
+-- Forum: netPI 3 - Docker featuring Industrial Raspberry Pi 3 platform (https://forum.hilscher.com/forum-1.html)
+--- Forum: Software (https://forum.hilscher.com/forum-5.html)
+--- Thread: Static mapping of USB-devices (/thread-439.html)

Pages: 1 2


RE: Static mapping of USB-devices - deme - May-15th-2019

Thanks for the clarification. Is it in the realm of possibility that you'll consider implementing a work-around with udev, script and yaml file containing udevadm info output on the host hilscher system?

Is it possible to mount bus devices under /dev/bus/usb/001/... directly with --device? The main problem is, that devices might get reconnected and get assigned different numbers under /dev/ttyUSB{0,1,...}. Even if they are connected on the same port physically but in different order. So the idea would be to just mount the physical location, assuming the logical usb device if exchanged is always connected to the same physical port on the bus. I'd then implement a check, if the device becomes unavailable to kill the container and the restart=always rule will then restart the container until the device becomes available again. If the application is designed as a microservice architecture with a second service monitoring the status of the first one, I'll still be able to react on situations, when a device is unreachable for some reason.


RE: Static mapping of USB-devices - Armin@netPI - May-15th-2019

Hello Dennis,

extensions to our Linux OS are not that easy to implement and to get an approval for a "go" since the single Linux OS build process we established builds the OSs for all our IOT devices we offer next to netPI at the same time. There are devices with Intel processor, our netX4000 controller and of course the ARM BCM of netPI. We are speaking about multiple Hilscher devices + all custom derivatives that are built during one process and they share in 99% of all cases the same build code.

This fact and in addition to the fact how docker behaves with /dev/ and shadow copies /dev/ in the container and a udev rule we have to define so commonly that it fits always to all devices in the "whole world" I came to the conclusion that we cannot implement such a udev rule by ourselves.

Sorry for having no better answer for you right now. How about a possibility to implement the udev by yourself ... send me a private message.