Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
udev rules on Raspberry Pi not working
I have a LocoBufferUSB and a FT232 serial adapter and I need permanent links for them, for example /dev/ttyLocobufferUSB and /dev/ttyTurntable .
lsusb shows: Bus 003 Device 005: ID 0403:c7d0 Future Technology Devices International, Ltd RR-CirKits LocoBuffer-USB Bus 003 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC I have tried different udev rules but I don't get any links. For example: SUBSYSTEM=="tty", ATTRS{interface}=="LocoBuffer-USB", SYMLINK+="ttyUSBLocoBuffer" SUBSYSTEM=="tty", ATTRS{interface}=="Ltd FT232 Serial (UART) IC", SYMLINK+="ttyUSBTurnTable" and ATTRS{idVendor}=="0403", ATTRS{idProduct}=="c7d0", ENV{ID_MM_CANDIDATE}="0", KERNEL=="ttyUSB*" SYMLINK+="ttyLocoBuffer" ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ENV{ID_MM_CANDIDATE}="0", KERNEL=="ttyUSB*" SYMLINK+="ttyTurnTable" The rules are in the file /etc/udev/rules.d/90-serial-ports.rule . I have tried both restarting the RPi and this command: sudo udevadm control --reload-rules && sudo udevadm trigger -- Daniel Bergqvist JMRI developer |
On April 9, 2025 5:32:04 AM GMT+05:30, "danielb987 via groups.io" <jmri@...> wrote:
Hi Daniel, a few thoughts: - I've found all my udev rules include ACTION==add IIRC (not on my PC right now, can't check) or some other ACTION match - There's 'udevadm monitor' to watch the events coming in and what udev makes of them when you plug in a device - There's also 'udevadm info -a /dev/ttyUSB0' to show you all the properties of a device and its parent devices you can match against - IIRC, if you have multiple filters ending in S (SUBSYSTEMS, ATTRS etc) they need to match the same parent device Hope this points you in a good direction, Heiko -- Sent from my Android device with K-9 Mail. Please excuse my brevity. |
Daniel,
toggle quoted message
Show quoted text
Here is what works for me. SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{interface}=="LocoBuffer-USB", SYMLINK+="ttyUSBLocoBuffer" Dave Sand ----- Original message -----
From: danielb987 <jmri@...> To: [email protected] Subject: [jmriusers] udev rules on Raspberry Pi not working Date: Tuesday, April 08, 2025 7:02 PM I have a LocoBufferUSB and a FT232 serial adapter and I need permanent links for them, for example /dev/ttyLocobufferUSB and /dev/ttyTurntable . lsusb shows: Bus 003 Device 005: ID 0403:c7d0 Future Technology Devices International, Ltd RR-CirKits LocoBuffer-USB Bus 003 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC I have tried different udev rules but I don't get any links. For example: SUBSYSTEM=="tty", ATTRS{interface}=="LocoBuffer-USB", SYMLINK+="ttyUSBLocoBuffer" SUBSYSTEM=="tty", ATTRS{interface}=="Ltd FT232 Serial (UART) IC", SYMLINK+="ttyUSBTurnTable" and ATTRS{idVendor}=="0403", ATTRS{idProduct}=="c7d0", ENV{ID_MM_CANDIDATE}="0", KERNEL=="ttyUSB*" SYMLINK+="ttyLocoBuffer" ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ENV{ID_MM_CANDIDATE}="0", KERNEL=="ttyUSB*" SYMLINK+="ttyTurnTable" The rules are in the file /etc/udev/rules.d/90-serial-ports.rule . I have tried both restarting the RPi and this command: sudo udevadm control --reload-rules && sudo udevadm trigger -- Daniel Bergqvist JMRI developer |
Dave,
toggle quoted message
Show quoted text
Thanks. The problem is that it doesn't work for me. I have the file: /etc/udev/rules.d/90-serial-ports.rule With the line: SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{interface}=="LocoBuffer-USB", SYMLINK+="ttyUSBLocoBuffer" And nothing happens. I have also tried with the line: ATTRS{idVendor}=="0403", ATTRS{idProduct}=="c7d0", KERNEL=="ttyUSB*", SYMLINK+="ttyLocoBuffer" But that doesn't work either. --- Daniel Bergqvist JMRI developer 2025-04-09 04:42 skrev Dave Sand: Daniel, |
This is what I have in my /etc/udev/rules.d/90-locobuffer.rules file:
SUBSYSTEM=="tty", ATTRS{product}=="LocoBuffer-USB", ATTRS{serial}=="FTNO3P86", SYMLINK+="ttyUSBLB" SUBSYSTEM=="tty", ATTRS{product}=="USB-Serial Controller D", SYMLINK+=“ttyUSBLBII" and in 91-dccex.rules: SUBSYSTEM=="tty", ATTRS{serial}=="75435353934351F0B121", SYMLINK+=“ttyUSBDCCEX" and these do the trick for my three USB command station interfaces from my pi. Your serial number is probably different. david zuhn |
开云体育Steve_G, Thank you!!! I have been a developer for 30 years and I'm well aware of the need of exact syntax but I missed this one. Daniel
On 2025-04-09 14:14, Steve_G via
groups.io wrote:
.rules |
to navigate to use esc to dismiss