Slow fitPC-B Barebone and .rules
Posted: Sun Jan 03, 2016 4:49 pm
Hi All
This is not a question, but information that someone may find usefull.
I have just spent 2 days solving a problem that wouldn't allow me to use SYMLINK in Linux Mint.(and probably other flavours)
Because the USB device could end up on any port, I wanted a persistent name.
Basically the problem was this:
When the system reads the .rules (yours or the system) and the USB device is not ready,
it does not create the folder /dev/serial/by-id/device name... until the device is ready.
Note that the device was plugged in from boot up. In my case it took 40 sec's AFTER the Mint screen was up to create that folder, and thus install system SYMLINK to the device.
Because the system link was a very long name,and included a serial number, I wanted a short symlink name like "Adam4561".
I created 99-local.rules in /etc/udev/rules.d and wrote all the relevant detail such as idVendor & idProduct and SYMLINK+="Adam4561"
Didn't work , then supporter WharfRat on Mint Forum suggested to install a WAIT-FOR in the .rules file.
That didn't work either, as it times out after only 10 sec, and you can't extend it.
I could have created a script that waits for the device to appear, (I am a newbie to Linux and scripts are still Swahili to me) but instead wrote a Search & Delay routine in my software, then issued a statement "echo mypassword | sudo udevadm trigger" and now it all works.
Prior to using the fitPC, I used Advantech cpu boards, and this was never an issue.
I don't know why Mint is taking that long to initiate the usb device, but I can communicate with it immediatly if I use device name ttyUSB0, but I can't guarantee that is where it will be.
Hope this helps others.
This is not a question, but information that someone may find usefull.
I have just spent 2 days solving a problem that wouldn't allow me to use SYMLINK in Linux Mint.(and probably other flavours)
Because the USB device could end up on any port, I wanted a persistent name.
Basically the problem was this:
When the system reads the .rules (yours or the system) and the USB device is not ready,
it does not create the folder /dev/serial/by-id/device name... until the device is ready.
Note that the device was plugged in from boot up. In my case it took 40 sec's AFTER the Mint screen was up to create that folder, and thus install system SYMLINK to the device.
Because the system link was a very long name,and included a serial number, I wanted a short symlink name like "Adam4561".
I created 99-local.rules in /etc/udev/rules.d and wrote all the relevant detail such as idVendor & idProduct and SYMLINK+="Adam4561"
Didn't work , then supporter WharfRat on Mint Forum suggested to install a WAIT-FOR in the .rules file.
That didn't work either, as it times out after only 10 sec, and you can't extend it.
I could have created a script that waits for the device to appear, (I am a newbie to Linux and scripts are still Swahili to me) but instead wrote a Search & Delay routine in my software, then issued a statement "echo mypassword | sudo udevadm trigger" and now it all works.
Prior to using the fitPC, I used Advantech cpu boards, and this was never an issue.
I don't know why Mint is taking that long to initiate the usb device, but I can communicate with it immediatly if I use device name ttyUSB0, but I can't guarantee that is where it will be.
Hope this helps others.