Linux UDEV rule to map consistent modem port from EHS6T | Telit Cinterion IoT Developer Community
November 15, 2017 - 4:37pm, 2398 views
Hello,
We are working on a Linux based solution to send out alarms via SMS. The software use a TTY to communicate to the modem with AT commands.
The EHS6T USB Modem creates several TTY devices belwo /dev and only one could be used for modem communication. Unfortunately this TTY ports are not consistent between powercycles of the modem. Sometimes the port is /dev/ttyACM3 sometimes it is on /dev/ttyACM5.
I tried to fix that with a UDEV rule but with udevadm I dont find a unique attribute to link the modem TTY to /dev/modem.
Can anyone help me here please to find a soluton to link always the correct modem TTY to /dev/modem.
Thanks
Mike
Hello,
Here's the rule you can try:
ATTRS{modalias}=="usb:v1E2Dp0058*", ATTRS{bInterfaceNumber}=="00", OPTIONS+="last_rule", SYMLINK+="modem"
Regards,
Bartłomiej
Hello Bartlomiej,
Thank you so much for your quick answer. I did some quick tests and for that it worked.
ATTRS{bInterfaceNumber} didnt looked consistent for.
Can you please tell me where did you found ATTRS{modalias}? I didnt see that in the output of udevadm:
regards
Michael
Please check the content of /etc/udev/rules.d/ You should find rules files there and you could add it to the appropriate file.
Regards,
Bartłomiej