--nas-get-preferred-networks displays no networks, but there seems to be a lot of info (tested with 1.35.95-dev)?
Reinhard Speyerer
rspmn at arcor.de
Tue Mar 25 14:28:29 UTC 2025
On Wed, Mar 19, 2025 at 03:00:47PM -0500, Dan Williams wrote:
> On Wed, 2025-03-19 at 14:12 +0100, Martin Maurer wrote:
> > Hello,
> >
> > mentioned in the other thread, I tried the get instead of the set:
> >
> > # qmicli -p -d /dev/cdc-wdm0 --nas-get-preferred-networks
> > [/dev/cdc-wdm0] Successfully got preferred networks:
> >
> > #
> >
> > No preferred network is displayed.
> >
> >
> > But switching on --verbose-full seems to list a lot info?
>
> Looks like TLVs 0x11 and 0x13 are ones that libqmi doesn't yet
> understand. They appear to be arrays like the existing preferred
> network array (MCC/MNC/tech) but 0x13 has another byte.
>
> Linaro's snaptel-sdk says they are "static" preferred networks and
> alludes to OPLMN so that's probably what they are. eg, they are defined
> by the operator and I believe part of the SIM, so you can't change
> them.
Hi Dan,
the NASGetPreferredNetworks TLVs returned differ with the SIM type and
EF contents.
Old Quam SIM:
NASGetPreferredNetworks 3000
+OK NASGetPreferredNetworks 02040000000000101a00040006010300000006010e000000d60007000000f4005b00000012150004060103000006010e0000d600070000f4005b0000
This is decoded correctly by qmicli as expected
$ qmicli -d /dev/cdc-wdm1 --nas-get-preferred-networks
[/dev/cdc-wdm1] Successfully got preferred networks:
Preferred PLMN list:
[0]:
MCC: '262'
MNC: '3'
Access Technology: 'unspecified'
[1]:
MCC: '262'
MNC: '14'
Access Technology: 'unspecified'
[2]:
MCC: '214'
MNC: '7'
Access Technology: 'unspecified'
[3]:
MCC: '244'
MNC: '91'
Access Technology: 'unspecified'
PCS digit status:
[0]:
MCC: '262'
MNC: '3'
MCC with PCS digit: 'no'
[1]:
MCC: '262'
MNC: '14'
MCC with PCS digit: 'no'
[2]:
MCC: '214'
MNC: '7'
MCC with PCS digit: 'no'
[3]:
MCC: '244'
MNC: '91'
MCC with PCS digit: 'no'
and also matches the EF.PLMNsel contents on the SIM.
USIM with both TS 31.102 EF.PLMNwAcT and EF.OPLMNwAcT present but all 0xff
contents:
NASGetPreferredNetworks 3000
+OK NASGetPreferredNetworks 02040000000000100200000011020000001201000013010000
USIM with only EF.OPLMNwAcT present: same set of TLVs returned as for Martin's
SIM, i.e. no 0x10/0x12 TLVs.
This might also explain the effect observed by Andreas in the other thread:
If a USIM does not have EF.PLMNwAcT NASSetPreferredNetworks is rejected by
the device.
Regards,
Reinhard
>
> I've got a local branch that handles printing these out with qmicli but
> can't push to an MR until FDO gitlab comes back in a few days...
>
> By the way I did get UimUninitialized when trying to get the preferred
> networks from a modem that had no SIM. What device do you have? Does it
> perhaps have dual-sim support?
>
> Dan
>
> >
> >
> > # qmicli --verbose-full -p -d /dev/cdc-wdm0 --nas-get-preferred-
> > networks
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] opening device with
> > flags 'proxy, auto'...
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] automatically
> > selecting
> > QMI mode
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] created endpoint
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] sent message...
> > <<<<<< RAW:
> > <<<<<< length = 28
> > <<<<<< data =
> > 01:1B:00:00:00:00:00:01:00:FF:10:00:01:0D:00:2F:64:65:76:2F:63:64:63:
> > 2D:77:64:6D:30
> >
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] sent generic request
> > (translated)...
> > <<<<<< QMUX:
> > <<<<<< length = 27
> > <<<<<< flags = 0x00
> > <<<<<< service = "ctl"
> > <<<<<< client = 0
> > <<<<<< QMI:
> > <<<<<< flags = "none"
> > <<<<<< transaction = 1
> > <<<<<< tlv_length = 16
> > <<<<<< message = "Internal Proxy Open" (0xFF00)
> > <<<<<< TLV:
> > <<<<<< type = "Device Path" (0x01)
> > <<<<<< length = 13
> > <<<<<< value = 2F:64:65:76:2F:63:64:63:2D:77:64:6D:30
> > <<<<<< translated = /dev/cdc-wdm0
> >
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] received message...
> > <<<<<< RAW:
> > <<<<<< length = 19
> > <<<<<< data =
> > 01:12:00:80:00:00:01:01:00:FF:07:00:02:04:00:00:00:00:00
> >
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] received generic
> > response (translated)...
> > <<<<<< QMUX:
> > <<<<<< length = 18
> > <<<<<< flags = 0x80
> > <<<<<< service = "ctl"
> > <<<<<< client = 0
> > <<<<<< QMI:
> > <<<<<< flags = "response"
> > <<<<<< transaction = 1
> > <<<<<< tlv_length = 7
> > <<<<<< message = "Internal Proxy Open" (0xFF00)
> > <<<<<< TLV:
> > <<<<<< type = "Result" (0x02)
> > <<<<<< length = 4
> > <<<<<< value = 00:00:00:00
> > <<<<<< translated = SUCCESS
> >
> > [19 Mar 2025, 13:05:27] [Debug] QMI Device at '/dev/cdc-wdm0' ready
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] assuming service
> > 'nas'
> > is supported...
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] allocating new client
> > ID...
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] sent message...
> > <<<<<< RAW:
> > <<<<<< length = 16
> > <<<<<< data = 01:0F:00:00:00:00:00:02:22:00:04:00:01:01:00:03
> >
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] sent generic request
> > (translated)...
> > <<<<<< QMUX:
> > <<<<<< length = 15
> > <<<<<< flags = 0x00
> > <<<<<< service = "ctl"
> > <<<<<< client = 0
> > <<<<<< QMI:
> > <<<<<< flags = "none"
> > <<<<<< transaction = 2
> > <<<<<< tlv_length = 4
> > <<<<<< message = "Allocate CID" (0x0022)
> > <<<<<< TLV:
> > <<<<<< type = "Service" (0x01)
> > <<<<<< length = 1
> > <<<<<< value = 03
> > <<<<<< translated = nas
> >
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] received message...
> > <<<<<< RAW:
> > <<<<<< length = 24
> > <<<<<< data =
> > 01:17:00:80:00:00:01:02:22:00:0C:00:02:04:00:00:00:00:00:01:02:00:03:
> > 04
> >
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] received generic
> > response (translated)...
> > <<<<<< QMUX:
> > <<<<<< length = 23
> > <<<<<< flags = 0x80
> > <<<<<< service = "ctl"
> > <<<<<< client = 0
> > <<<<<< QMI:
> > <<<<<< flags = "response"
> > <<<<<< transaction = 2
> > <<<<<< tlv_length = 12
> > <<<<<< message = "Allocate CID" (0x0022)
> > <<<<<< TLV:
> > <<<<<< type = "Result" (0x02)
> > <<<<<< length = 4
> > <<<<<< value = 00:00:00:00
> > <<<<<< translated = SUCCESS
> > <<<<<< TLV:
> > <<<<<< type = "Allocation Info" (0x01)
> > <<<<<< length = 2
> > <<<<<< value = 03:04
> > <<<<<< translated = [ service = 'nas' cid = '4' ]
> >
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] registered 'nas'
> > (version unknown) client with ID '4'
> > [19 Mar 2025, 13:05:27] [Debug] Asynchronously getting preferred
> > networks...
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] sent message...
> > <<<<<< RAW:
> > <<<<<< length = 13
> > <<<<<< data = 01:0C:00:00:03:04:00:01:00:26:00:00:00
> >
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] sent generic request
> > (translated)...
> > <<<<<< QMUX:
> > <<<<<< length = 12
> > <<<<<< flags = 0x00
> > <<<<<< service = "nas"
> > <<<<<< client = 4
> > <<<<<< QMI:
> > <<<<<< flags = "none"
> > <<<<<< transaction = 1
> > <<<<<< tlv_length = 0
> > <<<<<< message = "Get Preferred Networks" (0x0026)
> >
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] received message...
> > <<<<<< RAW:
> > <<<<<< length = 469
> > <<<<<< data =
> > 01:D4:01:80:03:04:02:01:00:26:00:C8:01:02:04:00:00:00:00:00:11:F2:00:
> > 28:00:06:01:01:00:80:C0:E8:00:03:00:80:C0:CC:00:10:00:80:C0:CC:00:14:
> > 00:80:C0:CC:00:08:00:80:C0:CC:00:0C:00:80:C0:E4:00:02:00:80:C0:E4:00:
> > 03:00:80:C0:D0:00:01:00:80:C0:D0:00:14:00:80:C0:04:01:02:00:80:C0:EE:
> > 00:14:00:80:C0:E6:00:01:00:80:C0:DE:00:01:00:80:C0:0E:01:01:00:80:C0:
> > D6:00:05:00:80:C0:D6:00:07:00:80:C0:CE:00:0A:00:80:C0:EA:00:21:00:80:
> > C0:EA:00:1E:00:80:C0:DB:00:01:00:80:C0:CA:00:01:00:80:C0:D8:00:1E:00:
> > 80:C0:F0:00:01:00:80:C0:0C:01:06:00:80:C0:E7:00:02:00:80:C0:1C:01:03:
> > 00:80:C0:F2:00:02:00:80:C0:F2:00:05:00:80:C0:E2:00:03:00:80:C0:25:01:
> > 46:00:80:C0:36:01:04:01:80:C0:1E:01:01:00:80:C0:14:01:01:00:80:C0:26:
> > 01:01:00:80:C0:10:01:03:00:80:C0:F4:00:5B:00:80:C0:18:01:0A:00:80:C0:
> > F6:00:01:00:80:C0:16:01:15:00:80:C0:13:C9:00:28:06:01:01:00:00:E8:00:
> > 03:00:00:CC:00:10:00:00:CC:00:14:00:00:CC:00:08:00:00:CC:00:0C:00:00:
> > E4:00:02:00:00:E4:00:03:00:00:D0:00:01:00:00:D0:00:14:00:00:04:01:02:
> > 00:00:EE:00:14:00:00:E6:00:01:00:00:DE:00:01:00:00:0E:01:01:00:00:D6:
> > 00:05:00:00:D6:00:07:00:00:CE:00:0A:00:00:EA:00:21:00:00:EA:00:1E:00:
> > 00:DB:00:01:00:00:CA:00:01:00:00:D8:00:1E:00:00:F0:00:01:00:00:0C:01:
> > 06:00:00:E7:00:02:00:00:1C:01:03:00:00:F2:00:02:00:00:F2:00:05:00:00:
> > E2:00:03:00:00:25:01:46:00:00:36:01:04:01:01:1E:01:01:00:00:14:01:01:
> > 00:00:26:01:01:00:00:10:01:03:00:00:F4:00:5B:00:00:18:01:0A:00:00:F6:
> > 00:01:00:00:16:01:15:00:00
> >
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] received generic
> > response (translated)...
> > <<<<<< QMUX:
> > <<<<<< length = 468
> > <<<<<< flags = 0x80
> > <<<<<< service = "nas"
> > <<<<<< client = 4
> > <<<<<< QMI:
> > <<<<<< flags = "response"
> > <<<<<< transaction = 1
> > <<<<<< tlv_length = 456
> > <<<<<< message = "Get Preferred Networks" (0x0026)
> > <<<<<< TLV:
> > <<<<<< type = "Result" (0x02)
> > <<<<<< length = 4
> > <<<<<< value = 00:00:00:00
> > <<<<<< translated = SUCCESS
> > <<<<<< TLV:
> > <<<<<< type = 0x11
> > <<<<<< length = 242
> > <<<<<< value =
> > 28:00:06:01:01:00:80:C0:E8:00:03:00:80:C0:CC:00:10:00:80:C0:CC:00:14:
> > 00:80:C0:CC:00:08:00:80:C0:CC:00:0C:00:80:C0:E4:00:02:00:80:C0:E4:00:
> > 03:00:80:C0:D0:00:01:00:80:C0:D0:00:14:00:80:C0:04:01:02:00:80:C0:EE:
> > 00:14:00:80:C0:E6:00:01:00:80:C0:DE:00:01:00:80:C0:0E:01:01:00:80:C0:
> > D6:00:05:00:80:C0:D6:00:07:00:80:C0:CE:00:0A:00:80:C0:EA:00:21:00:80:
> > C0:EA:00:1E:00:80:C0:DB:00:01:00:80:C0:CA:00:01:00:80:C0:D8:00:1E:00:
> > 80:C0:F0:00:01:00:80:C0:0C:01:06:00:80:C0:E7:00:02:00:80:C0:1C:01:03:
> > 00:80:C0:F2:00:02:00:80:C0:F2:00:05:00:80:C0:E2:00:03:00:80:C0:25:01:
> > 46:00:80:C0:36:01:04:01:80:C0:1E:01:01:00:80:C0:14:01:01:00:80:C0:26:
> > 01:01:00:80:C0:10:01:03:00:80:C0:F4:00:5B:00:80:C0:18:01:0A:00:80:C0:
> > F6:00:01:00:80:C0:16:01:15:00:80:C0
> > <<<<<< TLV:
> > <<<<<< type = 0x13
> > <<<<<< length = 201
> > <<<<<< value =
> > 28:06:01:01:00:00:E8:00:03:00:00:CC:00:10:00:00:CC:00:14:00:00:CC:00:
> > 08:00:00:CC:00:0C:00:00:E4:00:02:00:00:E4:00:03:00:00:D0:00:01:00:00:
> > D0:00:14:00:00:04:01:02:00:00:EE:00:14:00:00:E6:00:01:00:00:DE:00:01:
> > 00:00:0E:01:01:00:00:D6:00:05:00:00:D6:00:07:00:00:CE:00:0A:00:00:EA:
> > 00:21:00:00:EA:00:1E:00:00:DB:00:01:00:00:CA:00:01:00:00:D8:00:1E:00:
> > 00:F0:00:01:00:00:0C:01:06:00:00:E7:00:02:00:00:1C:01:03:00:00:F2:00:
> > 02:00:00:F2:00:05:00:00:E2:00:03:00:00:25:01:46:00:00:36:01:04:01:01:
> > 1E:01:01:00:00:14:01:01:00:00:26:01:01:00:00:10:01:03:00:00:F4:00:5B:
> > 00:00:18:01:0A:00:00:F6:00:01:00:00:16:01:15:00:00
> >
> > [/dev/cdc-wdm0] Successfully got preferred networks:
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] releasing 'nas'
> > client
> > with flags 'release-cid'...
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] unregistered 'nas'
> > client with ID '4'
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] sent message...
> > <<<<<< RAW:
> > <<<<<< length = 17
> > <<<<<< data = 01:10:00:00:00:00:00:03:23:00:05:00:01:02:00:03:04
> >
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] sent generic request
> > (translated)...
> > <<<<<< QMUX:
> > <<<<<< length = 16
> > <<<<<< flags = 0x00
> > <<<<<< service = "ctl"
> > <<<<<< client = 0
> > <<<<<< QMI:
> > <<<<<< flags = "none"
> > <<<<<< transaction = 3
> > <<<<<< tlv_length = 5
> > <<<<<< message = "Release CID" (0x0023)
> > <<<<<< TLV:
> > <<<<<< type = "Release Info" (0x01)
> > <<<<<< length = 2
> > <<<<<< value = 03:04
> > <<<<<< translated = [ service = 'nas' cid = '4' ]
> >
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] received message...
> > <<<<<< RAW:
> > <<<<<< length = 24
> > <<<<<< data =
> > 01:17:00:80:00:00:01:03:23:00:0C:00:02:04:00:00:00:00:00:01:02:00:03:
> > 04
> >
> > [19 Mar 2025, 13:05:27] [Debug] [/dev/cdc-wdm0] received generic
> > response (translated)...
> > <<<<<< QMUX:
> > <<<<<< length = 23
> > <<<<<< flags = 0x80
> > <<<<<< service = "ctl"
> > <<<<<< client = 0
> > <<<<<< QMI:
> > <<<<<< flags = "response"
> > <<<<<< transaction = 3
> > <<<<<< tlv_length = 12
> > <<<<<< message = "Release CID" (0x0023)
> > <<<<<< TLV:
> > <<<<<< type = "Result" (0x02)
> > <<<<<< length = 4
> > <<<<<< value = 00:00:00:00
> > <<<<<< translated = SUCCESS
> > <<<<<< TLV:
> > <<<<<< type = "Release Info" (0x01)
> > <<<<<< length = 2
> > <<<<<< value = 03:04
> > <<<<<< translated = [ service = 'nas' cid = '4' ]
> >
> > [19 Mar 2025, 13:05:27] [Debug] Client released
> > [19 Mar 2025, 13:05:27] [Debug] Closed
> > #
> >
> >
> > I am using a RM520N-GL, with pre-release libqmi 1.35.95-dev.
> >
> > ( RM520NGLAAR03A03M4G )
> >
> > Best regards,
> >
> > Martin
> >
> >
>
More information about the libqmi-devel
mailing list