($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Christophe Ronco <c.ronco@kerlink.fr>
To: ofono@lists.linux.dev
Cc: Christophe Ronco <c.ronco@kerlink.fr>
Subject: [PATCH 0/1]
Date: Thu, 28 Mar 2024 09:11:56 +0100	[thread overview]
Message-ID: <20240328081157.4586-1-c.ronco@kerlink.fr> (raw)

Hi,
I use a ME310G1 modem (from Telit). With some SIMs, Ofono is not able to give CardIdentifier property.

This information is normally read in SIM by reading file 12258. 
This is the first AT+CRSM command send to modem.

When not working, it's because in AT command answer, there are two lines
starting with prefix +CRSM. The first line is:
+CRSM: 0
I don't know what does this answer mean, I though that two parameters minimum
(sw1 and sw2) were requested. A correct result line is also sent, but it
won't be analyzed by AT modem driver. It stops at first line with correct prefix.

Here is an extract of traces I have when this behavior is reproduced:
2024-03-26T12:27:22.721536+00:00 klk-zcel-04000C ofonod[1268]: Aux: > AT+CGMI\r
2024-03-26T12:27:22.730407+00:00 klk-zcel-04000C ofonod[1268]: Aux: < \r\nTelit\r\n\r\nOK\r\n
2024-03-26T12:27:22.731175+00:00 klk-zcel-04000C ofonod[1268]: Aux: > AT+CLCK="SC",2\r
2024-03-26T12:27:22.831416+00:00 klk-zcel-04000C ofonod[1268]: Aux: < \r\nOK\r\n
2024-03-26T12:27:22.831805+00:00 klk-zcel-04000C ofonod[1268]: Aux: > AT+CGMM\r
2024-03-26T12:27:22.840647+00:00 klk-zcel-04000C ofonod[1268]: Aux: < \r\nME310G1-WW\r\n\r\nOK\r\n
2024-03-26T12:27:22.842950+00:00 klk-zcel-04000C ofonod[1268]: Aux: > AT+CRSM=192,12258\r
2024-03-26T12:27:23.101668+00:00 klk-zcel-04000C ofonod[1268]: Modem: < \r\n#QSS: 2\r\n
2024-03-26T12:27:23.165293+00:00 klk-zcel-04000C ofonod[1268]: Aux: < \r\n+CRSM: 0\r\n\r\n+CRSM: 144,0,62178202412183022FE28A01058B032F06068002000A880110\r\n\r\nOK\r\n\r\n#QSS: 2\r\n
2024-03-26T12:27:23.166088+00:00 klk-zcel-04000C ofonod[1268]: ../git/plugins/telit.c:qss_notify() 0x1856a00
2024-03-26T12:27:23.166664+00:00 klk-zcel-04000C ofonod[1268]: ../git/plugins/telit.c:switch_sim_state_status() 0x1856a00, SIM status: 2
2024-03-26T12:27:23.167472+00:00 klk-zcel-04000C ofonod[1268]: Aux: > AT+CGMR\r
2024-03-26T12:27:23.176251+00:00 klk-zcel-04000C ofonod[1268]: Aux: < \r\nM0C.200004\r\n\r\nOK\r\n
2024-03-26T12:27:23.178463+00:00 klk-zcel-04000C ofonod[1268]: Aux: > AT+CRSM=192,28421\r
2024-03-26T12:27:23.929127+00:00 klk-zcel-04000C ofonod[1268]: Aux: < \r\n+CRSM: 144,0,62178202412183026F058A01058B036F060E80020008880110\r\n\r\nOK\r\n

The aim of this patch is to ignore result lines that do not contain at least sw1 and sw2 parameters.

Christophe Ronco (1):
  atmodem: sim: when reading sim files, avoid incomplete result lines

 drivers/atmodem/sim.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

-- 
2.25.1


             reply	other threads:[~2024-03-28  8:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28  8:11 Christophe Ronco [this message]
2024-03-28  8:11 ` [PATCH 1/1] atmodem: sim: when reading sim files, avoid incomplete result lines Christophe Ronco
2024-03-28 15:17   ` Denis Kenzior
2024-05-07 14:46     ` [PATCH v2 0/1] " Christophe Ronco
2024-05-07 14:46       ` [PATCH 1/1] " Christophe Ronco
2024-05-07 16:40       ` [PATCH v2 0/1] " patchwork-bot+ofono

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=20240328081157.4586-1-c.ronco@kerlink.fr \
    --to=c.ronco@kerlink.fr \
    --cc=ofono@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).