Page 1 of 1

empty file /dev/gsmmodem

Posted: 11 Aug 2020, 15:06
by rocker
When you connect a serial modem, you first create an empty /dev/gsmmodem file and then create a symbolic link /dev/gsmmodem2 to the device. Moreover, if the device is reconnected, then a new empty file/dev/gsmmodem2 and the symbolic link /dev/gsmmodem3 and so on will be created.
As far as I understand, the file creates this code in the usb_modeswitch_dispatcher:

set symlinkName "gsmmodem"
while {$idx < 256} {
if {![file exists $symlinkName]} {
set placeholder [open /dev/$symlinkName w]
close $placeholder
set symlinkName gsmmodem$idx
incr idx

I didn't quite understand the meaning of creating a file, but this code has always been, perhaps now udev works differently and instead of creating a link with the specified name due to the presence of this udev file itself renames the link.

Re: empty file /dev/gsmmodem

Posted: 31 Aug 2020, 19:38
by Josh
Can you tell which version of udev you are running on your system?

You can use the command "udevadm version".

Re: empty file /dev/gsmmodem

Posted: 12 Sep 2020, 00:38
by rocker
udevadm version 245 .