Re: primary device changing from boot to boot



On Tue, Sep 5, 2017 at 9:56 AM, Pičugins Arsenijs <crimier yandex ru> wrote:
I don't know if it's going to help you with this issue, but if you can hardcode a path to the serial port 
somewhere, take a look in the "/dev/serial/by-id" directory - it has symlinks to /dev/tty* entries that 
correspond to hardware serial ports currently connected. Names of the symlinks are generated from some kind 
of hardware IDs, so should be the same, no matter the order of enumeration (unless your hardware doesn't 
expose an unique ID that udev, or whatever makes those symlinks, could use)


It is true that the symlinks in /dev/serial/by-id are constant but I
don't know how to get nm to use them as nmcli is particularlly finiky
about what is allowed for the 'ifname' param.

root@ventana:~# ls /dev/serial/by-id/
usb-Sierra_Wireless_Inc._HL7xxx_014284000070452-if00
usb-Sierra_Wireless_Inc._HL7xxx_014284000070452-if02
usb-Sierra_Wireless_Inc._HL7xxx_014284000070452-if04

root@ventana: ~# nmcli connection add type gsm ifname
"usb-Sierra_Wireless_Inc._HL7xxx_014284000070452-if00" con-name
mymodem apn vzwinternet
Error: 'ifname':
'usb-Sierra_Wireless_Inc._HL7xxx_014284000070452-if00' is not a valid
interface nor '*'.

root@ventana: ~# nmcli connection add type gsm ifname
"/dev/serial/by-id/usb-Sierra_Wireless_Inc._HL7xxx_014284000070452-if00"
con-name mymodem apn vzwinternet
Error: 'ifname':
'usb-Sierra_Wireless_Inc._HL7xxx_014284000070452-if00' is not a valid
interface nor '*'.

I'm not sure what the rules are for ifname for type gsm... seems to
accept 'foo', but apparently not just anything.

Tim


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]