All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: SIMCOM support
Date: Thu, 24 Jan 2013 10:21:56 -0600	[thread overview]
Message-ID: <51015FA4.4050300@gmail.com> (raw)
In-Reply-To: <51012DAB.9000108@syscom-instruments.com>

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

Hi Anthony,

On 01/24/2013 06:48 AM, Viallard Anthony wrote:
> Hello ofono guys,
>
> I've got a embedded device with SIM5216E modem. Based on the previous
> work done by my colleague Jean-Christian de Rivaz (you can see previous
> talk on this mailing list about this modem "Some experiments with the
> SIMCOM SIM5216E modem on a ARM926 board"), the simcom AT doc, my
> MacGyver kit and my resourcefulness, i do a patch for ofono to support
> this modem (and maybe others models).

How closely related is this one to SIMCOM 900?  We already do have a 
plugin for it in the tree, so it might be a good idea to merge the two 
if they are closely related.

>
> I attach the patch to this email.

Please use git send-email to send patches.

>
> While making this patch, I wondered about that :
>
> * After entering a pin code, ofono goes too fast and checks too early
> the sim pin status with "CPIN?". The ME responds "CME Error : 14 (SIM
> busy)" and ofono stops here. Ofono doesn't send more CPIN? or intercept
> the "+CPIN: READY" that the modem send after a while when SIM is back
> online. So, I use the same workaround that for ZTE : sending severals
> AT+CPIN? commands during 20 seconds until having "+CPIN: READY". It
> works well but as my modem sends the "+CPIN: READY" from its own, I
> think I can use another mechanism more "standard" in ofono, isn't it ?
>

oFono core expects the sim atom driver to return from PIN entry function 
when the SIM initialization procedures have been completed.  Many modems 
have an unsolicited notification that is fired when this is done, to 
avoid CPIN? polling.  Are you saying your modem fires off a 'CPIN: 
READY' as an unsolicited notification?  If so, then you can follow the 
same type of mechanism as VENDOR_IFX or VENDOR_STE

> * I want to save power when i doesn't need the modem. So, i guess it is
> the purpose of the "org.ofono.Modem.SetProperty" dbus method and the
> setting "Powered". When I set "Powered" to "False", I see ofono calls
> the "disable" callback of "struct ofono_modem_driver", so I think its
> here I must write the famous CFUN command(s) to put modem down. In the
> AT doc for SIMCOM, I have severals CFUN values for, i think, disable
> purpose :
>
> 0 – minimum functionality
> 4 – disable phone both transmit and receive RF circuits
> 7 – Offline Mode

oFono expects the following:

Powered = True, Online = True -> Full functionality
Powered = True, Online = False -> RX/TX circuits down, SIM Card reader 
enabled
Powered = False -> Everything is powered down.

>
> For now, i do a CFUN=4 but maybe i need to do more and add CFUN=7 ? Or
> maybe use CFUN=0 ?
>

You would need to find out what exactly those modes do.

> Can the "disable" callback be called by ofono in other case and so, i
> must only do a CFUN=4 ?
>

disable is performed when the modem is powered down, either by normal 
means or when oFono daemon shuts down.

> * I would like to do a reset of the modem at start and at end of ofono
> life (with AT+CFUN=6 or AT+CRESET). The purpose is having a modem always
> in init state for ofono and the others programs. Do you think its a good
> idea ?
>

In general that is not desirable.  The modem should be initialized when 
the enable driver method is called.  Why do you want to do this?

Regards,
-Denis

  reply	other threads:[~2013-01-24 16:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-24 12:48 SIMCOM support Viallard Anthony
2013-01-24 16:21 ` Denis Kenzior [this message]
2013-01-24 17:13   ` Viallard Anthony
2013-01-24 18:21     ` Denis Kenzior
2013-01-25  9:01       ` Renat Zaripov
  -- strict thread matches above, loose matches on Subject: below --
2013-07-19 13:33 Viallard Anthony
2013-07-19 13:55 ` Jesper Larsen

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=51015FA4.4050300@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.