From: Christophe Ronco <c.ronco@kerlink.fr>
To: ofono@ofono.org
Subject: [PATCH 0/1] fix SIM file reading on MC7304 modem
Date: Fri, 17 Feb 2017 16:06:11 +0100 [thread overview]
Message-ID: <20170217150612.24137-1-c.ronco@kerlink.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 2184 bytes --]
I always had errors when reading SIM files on modem MC7304.
Failing function in qmimodem driver is qmi_read_attributes.
Using OFONO_QMI_DEBUG, response from modem is
UIM_resp msg=36 len=7 [client=1,type=2,tid=274,len=19]
QMI: {type=2,error=INTERNAL}
Using qmicli (and AT command), I am able to read the same file:
qmicli -d /dev/cdc-wdm0 --uim-get-file-attributes=0x3f00,0x7fff,0x6fad
[(null)] Successfully got file '/dev/cdc-wdm0' attributes from the UIM:
Card result:
SW1: '0x90'
SW2: '0x00'
File attributes:
File size: 4
File ID: 28589
File type: transparent
Record size: 0
Record count: 0
Read security attributes: (always) (null)
Write security attributes: (single) adm
Increase security attributes: (always) (null)
Deactivate security attributes: (single) adm
Activate security attributes: (single) adm
Raw: 62:17:82:02:41:21:83:02:6F:AD:8A:01:05:8B:03:6F:06:01:80:02:00:04:88:01:18
I ended up trying to do it using qmicli and comparing binary commands sent by
ofono qmimodem driver and qmicli.
Command sent by qmimodem driver in qmi_read_attributes function
01 1b 00 00 0b 01
00 12 01 24 00 0f 00 "Get File Attributes" (0x0024), length 15
01 02 00 06 00 : "Session Information" (0x01), session_type = 'Card on slot 1' application_identifier = ''
02 07 00 ad 6f 04 00 3f ff 7f: "File" (0x02)
Command sent by qmicli:
01:1B:00:00:0B:01:
00:01:00:24:00:0F:00: "Get File Attributes" (0x0024), length 15
02:07:00:AD:6F:04:00:3F:FF:7F: "File" (0x02)
01:02:00:00:00 "Session Information" (0x01) session_type = 'primary-gw-provisioning' application_identifier = ''
So difference seemed to be session_type value in "Session Information" parameter.
I have no idea what this parameter really means. I changed that to set
session_type to 'primary-gw-provisioning' in qmimodem driver and ... it fixed
the bug.
I have also tested the fix on a MC7430.
Christophe Ronco (1):
qmimodem: fix sim file reading on MC7304
drivers/qmimodem/sim.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.11.0
next reply other threads:[~2017-02-17 15:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 15:06 Christophe Ronco [this message]
2017-02-17 15:06 ` [PATCH 1/1] qmimodem: fix sim file reading on MC7304 Christophe Ronco
2017-02-17 17:18 ` Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170217150612.24137-1-c.ronco@kerlink.fr \
--to=c.ronco@kerlink.fr \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.