I am running a PCEngines APU3, which has 2 4G modems in it, a a Sierra Wireless MC7710 (Slot 1), Sierra Wireless MC7455 (Slot 2). However for the APU3, the [sim card slots are swapped](https://teklager.se/en/knowledge-base/apu-4g-lte-modem-configuration/), eg SIM Slot 1 is for Modem 2, and SIM Slot 2 is for Modem 1. Unsure if that's related or not
Currently VyOS code assumes a 1:1 relationship between the `wwan` interface number, eg `wwan0` and the modem when calling `mmcli -m #`, however this is not always true, in my case the Modems are reversed, eg Slot 1 is Modem index 1, and Slot 2 is Modem Index 0.
Modem Index 0 creates the `wwan1` interface, and Modem Index 1 creates the `wwan0` interface
```
vyos@vyos# sudo mmcli -m 0
-----------------------------
General | path: /org/freedesktop/ModemManager1/Modem/0
| device id: 6b648f8f2c815551f0814fc326d4a3696a0b7104
-----------------------------
Hardware | manufacturer: Sierra Wireless, Incorporated
| model: MC7455
| firmware revision: SWI9X30C_02.38.00.00 rE3F3E55C03AE94 jenkins 2022/01/13 05:16:00
| carrier config: default
| h/w revision: 1.0
| supported: gsm-umts, lte
| current: gsm-umts, lte
| equipment id: 359072067759064
-----------------------------
System | device: /sys/devices/pci0000:00/0000:00:13.0/usb2/2-1/2-1.3
| drivers: qcserial, qmi_wwan
| plugin: sierra
| primary port: cdc-wdm1
| ports: cdc-wdm1 (qmi), ttyUSB3 (qcdm), ttyUSB4 (gps),
| ttyUSB5 (at), wwan1 (net)
```
```
vyos@vyos# sudo mmcli -m 1
--------------------------------
General | path: /org/freedesktop/ModemManager1/Modem/1
| device id: 951975576cfc528785733a50c1eb004b2fbf8547
--------------------------------
Hardware | manufacturer: Sierra Wireless, Incorporated
| model: MC7710
| firmware revision: SWI9200X_03.05.24.00ap r5792 carmd-en-10527 2013/05/02 13:35:47
| h/w revision: 10
| supported: gsm-umts, lte
| current: gsm-umts, lte
| equipment id: 358178041781966
--------------------------------
System | device: /sys/devices/pci0000:00/0000:00:12.0/usb1/1-1/1-1.4
| drivers: qcserial, qmi_wwan
| plugin: sierra
| primary port: cdc-wdm0
| ports: cdc-wdm0 (qmi), ttyUSB0 (qcdm), ttyUSB2 (at), wwan0 (net)
```
This causes issue due to the fact if I set an `apn` on wwan1, it'll connect, but none of the interface config, eg `address dhcp` will work because it's not actually wwan1, it's wwan0.
Perhaps the ability to set something like `hw-id` to remap interfaces like with MAC addresses. Could be `hw-id` or even like `modem`
```
set interfaces wwan wwan0 modem 1
set interfaces wwan wwan1 modem 0
```
Unsure if those indexes could change ever across reboots or upgrades, etc, so maybe if there is some more concrete/absolute value, maybe the device id?
```
set interfaces wwan wwan0 device /sys/devices/pci0000:00/0000:00:12.0/usb1/1-1/1-1.4
```