Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
rocker
Posts: 2
Joined: 11 Aug 2020, 14:44

empty file /dev/gsmmodem

Post by rocker » 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.

Josh
Site Admin
Posts: 6569
Joined: 03 Nov 2007, 00:30

Re: empty file /dev/gsmmodem

Post by Josh » 31 Aug 2020, 19:38

Can you tell which version of udev you are running on your system?

You can use the command "udevadm version".

rocker
Posts: 2
Joined: 11 Aug 2020, 14:44

Re: empty file /dev/gsmmodem

Post by rocker » 12 Sep 2020, 00:38

udevadm version 245 .

Post Reply