empty file /dev/gsmmodem
Posted: 11 Aug 2020, 15:06
Hello.
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
break
}
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.
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
break
}
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.