EM7455, Ubuntu 20.04 (server) -- "primary port" changes from one boot to the next

I have some OnLogic PCs with the “NWK200” modules (EM7455).
I am able to configure and communicate with these modules (with Verizon).

Unfortunately, on at least one of these machines, the “primary port” name changes sometimes after a reboot. EG, it might be cdc-wdm2 for awhile, then maybe come up as cdc-wdm1. This is making it difficult to stay connected between start-ups. OnLogic support says they can’t help and I should look into udev rules because having multiple USB devices come up in different orders may cause this.

I created a rule to find the device using idVendor and idProduct and create a symlink. But when I use “nmcli r wwan on” it reports an error about inconsistent device names.

I’m not the most skilled with udev rules but I suspect it might not help as the device name is set before the rules fire (?).

I’ve tried both the native Ubuntu 20.04 qmi-wwan/qcserial drivers and the GobiNet/GobiSerial drivers with the native drivers black-listed, with the same result.

For a workaround, I have added multiple connections with nmcli hoping one device will connect, and this seems to work but I don’t feel it’s a valid solution. eg:

sudo nmcli c add type gsm ifname cdc-wdm1 con-name vzw1 apn vzwinternet
sudo nmcli c modify vzw1 connection.autoconnect yes

sudo nmcli c add type gsm ifname cdc-wdm2 con-name vzw2 apn vzwinternet
sudo nmcli c modify vzw2 connection.autoconnect yes

So – is there a way I can enforce that the device name is the same always?

Lacking a reply for how to symlink or set the cdc-wdm* name, here’s what I ended up doing… I’d searched the web many times trying to find a clue; it turns out Ubuntu 20.04 NetworkManager will happily add a gsm device WITHOUT the cdc-wdm* name and appears to always find it, even when the kernel-supplied name comes up differently from one boot to the next.

To whit, just:

sudo nmcli c add type gsm con-name vzw1 apn vzwinternet

1 Like

having a link solves the problem of guessing what the device name is when using qmicli

qmicli --device=/dev/lte --device-open-proxy --dms-get-manufacturer
[/dev/lte] Device manufacturer retrieved:
Manufacturer: ‘Sierra Wireless, Incorporated’

The following udev rule will create a persistent symlink (/dev/lte) which will point to the correct cdc-wdc* The name of the udev file is important so the link gets created after the device.

echo ‘KERNEL==“cdc-wdm*”, ATTRS{manufacturer}==“Sierra Wireless, Incorporated”, SYMLINK+=“lte”’ >> /etc/udev/rules.d/60-sierra-lte.rules

udevadm control --reload-rules && udevadm trigger # or reboot

(deleted, was a repeat of my earlier post. :neutral_face:)

Adding the link like that won’t solve the issue. The problem the user has is that it’s binding the NetworkManager settings to the device port name, and device port names are not stable across reboots, or e.g. if there are multiple devices in the system.

This is the correct solution. For systems with one single modem, this is definitely the way to go, just skip providing the ifname and NM will find to which device the settings apply.

If the system has multiple modems, with different NM settings each, then NM would allow binding the settings to specific IMEIs or IMSIs (IIRC!).