All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: RFC: Supporting STK without PDUs
Date: Fri, 10 Sep 2010 16:38:34 -0500	[thread overview]
Message-ID: <4C8AA55A.1090800@gmail.com> (raw)
In-Reply-To: <97D5E1BB8FC13D4EA3B34BAE8E6898C901145B3ED3@orsmsx508.amr.corp.intel.com>

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

Hi Waldo,

> I propose to add a set of additional (optional) STK functions that a modem plugin can chose to use/implement instead:
> 
> 	void (*envelope_parsed)(struct ofono_stk *stk,
> 		struct stk_envelope *e,
> 		ofono_stk_envelope_cb_t cb, void *data);
> 	/* if envelope_parsed is non-NULL then stk_send_envelope /
> 	   envelope_queue_run should call envelope_parsed(...) instead of
> 	   stk_pdu_from_envelope(...) + envelope(...)
> 	*/
> 
> 	void (*terminal_response_parsed)(struct ofono_stk *stk,
> 		struct stk_response *rsp,
> 		ofono_stk_generic_cb_t cb, void *data);
> 	/* if terminal_response_parsed is non-NULL then stk_respond()
> 	   should call terminal_response_parsed(...) instead of 
> 	   stk_pdu_from_response(...) + terminal_response(...)
> 	*/
> 
> 	void ofono_stk_proactive_command_parsed_notify(struct ofono_stk *stk,
> 		struct stk_command *command);
> 	/* ofono_stk_proactive_command_parsed_notify is like
> 	   ofono_stk_proactive_command_notify without the call to
> 	   stk_command_new_from_pdu(pdu, length);
> 	*/
> 
> Thoughts?

We have already had a discussion on this one when designing the current
stk modem API.  The bottom line is that oFono tries to keep its core <->
modem interfaces minimal and exposing the entirety of stkutil.h as
official API is definitely too much.

So right now you will need to re-encode into PDU form to support such
modems (or ask the vendor to give the raw pdus)  While this is a bit of
a performance hit, it isn't too bad as the PDUs are always smaller than
256 bytes.

Having said that, such 'pre-parsed' STK APIs are quite common.
Unfortunately they all behave differently, especially when it comes to
handling the more complex commands (e.g. Setup Call, etc)  We have been
kicking around some ideas on how to handle such modems.

Regards,
-Denis

  reply	other threads:[~2010-09-10 21:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-10 20:14 RFC: Supporting STK without PDUs Bastian, Waldo
2010-09-10 21:38 ` Denis Kenzior [this message]
2010-09-10 22:33   ` Bastian, Waldo
2010-09-10 23:08     ` Marcel Holtmann
2010-09-10 23:21     ` Denis Kenzior
2010-09-10 21:48 ` Marcel Holtmann

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=4C8AA55A.1090800@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.