Garbled description with --nas-get-serving-system
Dan Williams
dcbw at redhat.com
Mon Dec 2 15:57:35 UTC 2019
On Mon, 2019-12-02 at 14:30 +0000, Paul Gildea wrote:
> Hi, I was wondering had any knowledge of an issue we are seeing. We
> are
> connecting to private networks we are running on two different brands
> of
> EPC. Then, we are using libqmi to query the modem for the network
> info via
> --nas-get-serving-system
0A: D4:F2:9C:EE:2C:D3:EF:6F:F9:1A
^length ^ data
So length is 10 bytes, but in ASCII "TestNetwork" is 11 bytes long.
Hmm. What do we know packs more than one character into each byte...
The string is most likely GSM7 encoded and libqmi is expecting all
strings in UTF8, which is what almost everything in QMI is reported as.
So my best guess is that the Telit modem firmware is not correctly
converting the network name to Unicode for us. Every other QMI
implementation we've seen does :)
ModemManager has some special code to ignore the description when it's
not UTF-8 safe, and libqmi only does it for printable stuff like what
qmicli outputs. Perhaps it could work around the Telit firmware
somehow.
Dan
> [/dev/cdc-wdm0] Successfully got serving system:
> Registration state: 'registered'
> CS: 'attached'
> PS: 'attached'
> Selected network: '3gpp'
> Radio interfaces: '1'
> [0]: 'lte'
> Roaming status: 'off'
> Data service capabilities: '1'
> [0]: 'lte'
> *[Invalid UTF-8]* Current PLMN:
> MCC: '1'
> MNC: '4'
> *Description: '\xd3\xb7\x99~\x0f\xcb\xcb\xd1 ' *
> Roaming indicators: '1'
> [0]: 'off' (lte)
> 3GPP time zone offset: '0' minutes
> 3GPP location area code: '65534'
> 3GPP cell ID: '16'
> Detailed status:
> Status: 'available'
> Capability: 'cs-ps'
> HDR Status: 'none'
> HDR Hybrid: 'no'
> Forbidden: 'no'
> LTE tracking area code: '8'
> Full operator code info:
> MCC: '1'
> MNC: '4'
> MNC with PCS digit: 'no'
>
> Instead of a network name in the description field we are getting
> garbled
> text and before this we also see "[Invalid UTF-8]" returned. This
> only
> happens for the Telit LM960A18, no other modem we have (EM7565,
> EM7511,
> EM/MC7455 etc.), I was wondering was this a known issue, or perhaps
> some
> setting on the network end that needs to be adjusted?
>
> *Firmware:* 32.00.142-B020
>
> *Network name from at+cops?, which is shown correctly:*
>
> input> at+cops?
>
> at+cops?
>
> +COPS: 0,0,"TestNetwork",7
>
>
>
> OK
>
> input>
>
> *libqmi version:* 1.24.0
>
> *Verbose libqmi:*
>
> [26 Nov 2019, 12:46:18] [Debug] [/dev/cdc-wdm0] Opening device with
> flags
> 'proxy, auto'...
> [26 Nov 2019, 12:46:18] [Debug] [/dev/cdc-wdm0] loaded driver of cdc-
> wdm
> port: qmi_wwan
> [26 Nov 2019, 12:46:18] -Warning ** [/dev/cdc-wdm0] requested auto
> mode but
> no MBIM QMUX support available
> [26 Nov 2019, 12:46:18] [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
>
> [26 Nov 2019, 12:46:18] [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
>
> [26 Nov 2019, 12:46:18] [Debug] [/dev/cdc-wdm0] received message...
> <<<<<< RAW:
> <<<<<< length = 19
> <<<<<< data =
> 01:12:00:00:00:00:01:01:00:FF:07:00:02:04:00:00:00:00:00
>
> [26 Nov 2019, 12:46:18] [Debug] [/dev/cdc-wdm0] received generic
> response
> (translated)...
> <<<<<< QMUX:
> <<<<<< length = 18
> <<<<<< flags = 0x00
> <<<<<< 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
>
> [26 Nov 2019, 12:46:18] [Debug] QMI Device at '/dev/cdc-wdm0' ready
> [26 Nov 2019, 12:46:18] [Debug] [/dev/cdc-wdm0] Assuming service
> 'nas' is
> supported...
> [26 Nov 2019, 12:46:18] [Debug] [/dev/cdc-wdm0] Allocating new client
> ID...
> [26 Nov 2019, 12:46:18] [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
>
> [26 Nov 2019, 12:46:18] [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
>
> [26 Nov 2019, 12:46:18] [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:
> 05
>
> [26 Nov 2019, 12:46:18] [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:05
> <<<<<< translated = [ service = 'nas' cid = '5' ]
>
> [26 Nov 2019, 12:46:18] [Debug] [/dev/cdc-wdm0] Registered 'nas'
> (version
> unknown) client with ID '5'
> [26 Nov 2019, 12:46:18] [Debug] Asynchronously getting serving
> system...
> [26 Nov 2019, 12:46:18] [Debug] [/dev/cdc-wdm0] sent message...
> <<<<<< RAW:
> <<<<<< length = 13
> <<<<<< data = 01:0C:00:00:03:05:00:01:00:24:00:00:00
>
> [26 Nov 2019, 12:46:18] [Debug] [/dev/cdc-wdm0] sent generic request
> (translated)...
> <<<<<< QMUX:
> <<<<<< length = 12
> <<<<<< flags = 0x00
> <<<<<< service = "nas"
> <<<<<< client = 5
> <<<<<< QMI:
> <<<<<< flags = "none"
> <<<<<< transaction = 1
> <<<<<< tlv_length = 0
> <<<<<< message = "Get Serving System" (0x0024)
>
> [26 Nov 2019, 12:46:18] [Debug] [/dev/cdc-wdm0] received message...
> <<<<<< RAW:
> <<<<<< length = 99
> <<<<<< data =
> 01:62:00:80:03:05:02:01:00:24:00:56:00:02:04:00:00:00:00:00:01:06:00:
> 01:01:01:02:01:08:10:01:00:01:11:02:00:01:0B:12:0F:00:01:00:04:00:0A:
> D4:F2:9C:EE:2C:D3:EF:6F:F9:1A:15:03:00:01:08:01:1A:01:00:00:1C:02:00:
> FE:FF:1D:04:00:20:00:00:00:21:05:00:02:03:00:00:00:0
>
> [26 Nov 2019, 12:46:22] [Debug] [/dev/cdc-wdm0] received generic
> response
> (translated)...
> <<<<<< QMUX:
> <<<<<< length = 98
> <<<<<< flags = 0x80
> <<<<<< service = "nas"
> <<<<<< client = 5
> <<<<<< QMI:
> <<<<<< flags = "response"
> <<<<<< transaction = 1
> <<<<<< tlv_length = 86
> <<<<<< message = "Get Serving System" (0x0024)
> <<<<<< TLV:
> <<<<<< type = "Result" (0x02)
> <<<<<< length = 4
> <<<<<< value = 00:00:00:00
> <<<<<< translated = SUCCESS
> <<<<<< TLV:
> <<<<<< type = "Serving System" (0x01)
> <<<<<< length = 6
> <<<<<< value = 01:01:01:02:01:08
> <<<<<< translated = [ registration_state = 'registered'
> cs_attach_state =
> 'attached' ps_attach_state = 'attached' selected_network = '3gpp'
> radio_interfaces = '{ [0] = 'lte '}' ]
> <<<<<< TLV:
> <<<<<< type = "Roaming Indicator" (0x10)
> <<<<<< length = 1
> <<<<<< value = 01
> <<<<<< translated = off
> <<<<<< TLV:
> <<<<<< type = "Data Service Capability" (0x11)
> <<<<<< length = 2
> <<<<<< value = 01:0B
> <<<<<< translated = { [0] = 'lte '}
> <<<<<< TLV:
> <<<<<< type = "Current PLMN" (0x12)
> <<<<<< length = 15
> <<<<<< value = 01:00:04:00:0A:D4:F2:9C:EE:2C:D3:EF:6F:F9:1A
> <<<<<< translated = [ mcc = '1' mnc = '4' description = 'ÔòԜî,Óïoù'
> ]
> <<<<<< TLV:
> <<<<<< type = "Roaming Indicator List" (0x15)
> <<<<<< length = 3
> <<<<<< value = 01:08:01
> <<<<<< translated = { [0] = '[ radio_interface = 'lte'
> roaming_indicator
> = 'off' ] '}
> <<<<<< TLV:
> <<<<<< type = "Time Zone 3GPP" (0x1a)
> <<<<<< length = 1
> <<<<<< value = 00
> <<<<<< translated = 0
> <<<<<< TLV:
> <<<<<< type = "LAC 3GPP" (0x1c)
> <<<<<< length = 2
> <<<<<< value = FE:FF
> <<<<<< translated = 65534
> <<<<<< TLV:
> <<<<<< type = "CID 3GPP" (0x1d)
> <<<<<< length = 4
> <<<<<< value = 20:00:00:00
> <<<<<< translated = 32
> <<<<<< TLV:
> <<<<<< type = "Detailed Service Status" (0x21)
> <<<<<< length = 5
> <<<<<< value = 02:03:00:00:00
> <<<<<< translated = [ status = 'available' capability = 'cs-ps'
> hdr_status = 'none' hdr_hybrid = 'no' forbidden = 'no' ]
> <<<<<< TLV:
> <<<<<< type = "LTE TAC" (0x24)
> <<<<<< length = 2
> <<<<<< value = 00:0A
> <<<<<< translated = 2560
> <<<<<< TLV:
> <<<<<< type = "MNC PCS Digit Include Status" (0x27)
> <<<<<< length = 5
> <<<<<< value = 01:00:04:00:00
> <<<<<< translated = [ mcc = '1' mnc = '4' includes_pcs_digit = 'no'
> ]
>
> [/dev/cdc-wdm0] Successfully got serving system:
> Registration state: 'registered'
> CS: 'attached'
> PS: 'attached'
> Selected network: '3gpp'
> Radio interfaces: '1'
> [0]: 'lte'
> Roaming status: 'off'
> Data service capabilities: '1'
> [0]: 'lte'
> [Invalid UTF-8] Current PLMN:
> MCC: '1'
> MNC: '4'
> Description: '\xd4\xf2\x9c\xee,\xd3\xefo\xf9\x1a'
> Roaming indicators: '1'
> [0]: 'off' (lte)
> 3GPP time zone offset: '0' minutes
> 3GPP location area code: '65534'
> 3GPP cell ID: '32'
> Detailed status:
> Status: 'available'
> Capability: 'cs-ps'
> HDR Status: 'none'
> HDR Hybrid: 'no'
> Forbidden: 'no'
> LTE tracking area code: '2560'
> Full operator code info:
> MCC: '1'
> MNC: '4'
> MNC with PCS digit: 'no'
> [26 Nov 2019, 12:46:22] [Debug] [/dev/cdc-wdm0] Releasing 'nas'
> client with
> flags 'release-cid'...
> [26 Nov 2019, 12:46:22] [Debug] [/dev/cdc-wdm0] Unregistered 'nas'
> client
> with ID '5'
> [26 Nov 2019, 12:46:22] [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:05
>
> [26 Nov 2019, 12:46:26] [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:05
> <<<<<< translated = [ service = 'nas' cid = '5' ]
>
> [26 Nov 2019, 12:46:26] [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:
> 05
>
> [26 Nov 2019, 12:46:26] [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:05
> <<<<<< translated = [ service = 'nas' cid = '5' ]
>
> Thanks,
>
> --
> Paul
> _______________________________________________
> libqmi-devel mailing list
> libqmi-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libqmi-devel
More information about the libqmi-devel
mailing list