All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v0] Read EF_ICCID property of SIM
Date: Tue, 27 Apr 2010 09:21:21 -0500	[thread overview]
Message-ID: <201004270921.21557.denkenz@gmail.com> (raw)
In-Reply-To: <20100427080912.GB14818@gumpy.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]

Hi Daniel,

> On Tue, Apr 27, 2010 at 08:36:31AM +0200, Daniel Wagner wrote:
> > > Please use the sim file queue like EFpl does, no need to invent your
> > > own solution.
> >
> > I used the ofono_sim_read function but that didn't work. On the
> > terminal I saw only:
> >
> > CRSM=192,12258
> >
> > With read_file_transparent it is:
> >
> > ofonod[2048]: Control:> AT+CRSM=176,12258,0,0,10\r
> > ofonod[2048]: Control:< \r\r\n+CRSM:
> > 144,0,"989422024754212460F6"\r\n\r\nOK\r\n
> 
> I looked into this. It comes down to:
> 
> ofono_sim_read -> sim_op_next -> read_file_info
> 
> and since sim_op_next does not check what structure type it is, it
> always calles read_file_info (CRSM=192).
> 
> I'm not sure how to resolve this here. The problem is the callback
> given to sim_op_next has of course a different signature than
> read_file_transparent wants (ofono_sim_read_file_cb_t vs
> ofono_sim_read_cb_t)
> 
> Should I add something like:
> 
> int ofono_sim_read_transparent(struct ofono_sim *sim, int id,
>     				      	enum ofono_sim_file_structure expected_type,
> 					ofono_sim_read_cb_t cb, void *data)
> 

ofono_sim_read handles transparent, cyclic and record based files.  There 
should be no need to add anything.  Just do exactly what e.g. EFli / EFpl 
functions do.

What modem are you using? Some of them are dumb and don't implement +CRSM 'GET 
RESPONSE' properly.

Regards,
-Denis

  reply	other threads:[~2010-04-27 14:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26 15:38 [PATCH v0] Read EF_ICCID property of SIM Daniel Wagner
2010-04-26 17:11 ` Denis Kenzior
2010-04-27  6:36   ` Daniel Wagner
2010-04-27  8:09     ` Daniel Wagner
2010-04-27 14:21       ` Denis Kenzior [this message]
2010-04-27 15:43         ` Daniel Wagner
2010-04-27 15:46           ` Daniel Wagner
2010-04-27 15:53             ` Denis Kenzior
2010-04-27 16:06               ` Daniel Wagner
2010-04-27 16:19                 ` 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=201004270921.21557.denkenz@gmail.com \
    --to=denkenz@gmail.com \
    --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.