Enhancement: udev system script to get uart for serial port
Bug #44190 reported by
Ilkka Tuohela
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
udev (Ubuntu) |
Invalid
|
Medium
|
Scott James Remnant (Canonical) |
Bug Description
Binary package hint: udev
Sysfs or udev don't export UART of a serial port, which means you really can't use it to detect weird cards by it.
For example, I have a option globetrotter gprs card, which has 2 serial ports, one for proprietary control connection and one for normal serial connection. These ports can be really detected only by UART, thus I need a way to tell which one is which from udev rules.
To post a comment you must log in.
Attached is my script to detect UART from userland using /proc. The script should be in /lib/udev/ serial_ uart
Eventually, UART should be shown in sysfs tree, usable from udev. Meanwhile this script does what is needed (except when /proc is not mounted at all).
Example udev rules for my GPRS card:
SYSFS{prod_ id1}==" Option International", SYSFS{prod_ id2}==" GSM/GPRS GlobeTrotter", IMPORT{ program} ="serial_ uart %p"
### Control channel device, not really used in linux id1}==" Option International", SYSFS{prod_ id2}==" GSM/GPRS GlobeTrotter", ENV{SERIAL_ UART}== "16450" , SYMLINK+ ="globetrotter/ control"
SYSFS{prod_
### Normal serial device id1}==" Option International", SYSFS{prod_ id2}==" GSM/GPRS GlobeTrotter", ENV{SERIAL_ UART}== "16550A" , SYMLINK+ ="globetrotter/ serial"
SYSFS{prod_