How to assign physical USB modem to NetworkManager connection
1
vote
2
answers
2169
views
I work on dual independent modem device (yocto based). I would like to assign each to a different NM connection. I register them using cmd:
nmcli c add type gsm ifname cdc-wdm[0|1] con-name mdm1orange apn internet
It works. The problem is, -wdm
suffix comes from device registration/turn on order. I would like to associate it with USB port (they will use different operators SIMs APNs, configs etc), so I've created an udev rule:
SUBSYSTEM=="usbmisc", SUBSYSTEMS=="usb", KERNELS=="1-1.3:1.4", SYMLINK+="modem2", TAG+="systemd"
SUBSYSTEM=="usbmisc", SUBSYSTEMS=="usb", KERNELS=="1-1.4:1.4", SYMLINK+="modem1", TAG+="systemd"
It does work, I can see /dev/modem1
and /dev/modem2
being registered, but calling:
nmcli c add type gsm ifname modem[1|2] con-name mdm1orange apn internet
Just fails. NM does not have a clue which device I would like to use in connection.
So how can I assign based-on-usb-port-alias or index (with udev or anything else) to modem network interface, not just the /dev/
symlink? It would be nice to have also a WWAN interface alias created too.
Thanks!
Asked by JWZ1996
(51 rep)
Oct 6, 2022, 04:55 PM
Last activity: Feb 26, 2023, 03:44 AM
Last activity: Feb 26, 2023, 03:44 AM