From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] Simulate send ss command in sim app
Date: Thu, 09 Sep 2010 12:33:51 -0500 [thread overview]
Message-ID: <4C891A7F.7040303@gmail.com> (raw)
In-Reply-To: <1284047237-5012-1-git-send-email-yang.gu@intel.com>
[-- Attachment #1: Type: text/plain, Size: 5068 bytes --]
Hi Yang,
> +void DemoSimApplication::CBMenu( const QSimTerminalResponse& resp )
> +{
> + QSimCommand cmd;
> +
> + if ( resp.result() == QSimTerminalResponse::Success ) {
> + switch ( resp.menuItem() ) {
> +
> + case CBMenu_Registration:
> + {
> + cmd.setType( QSimCommand::SendSS );
> + cmd.setDestinationDevice( QSimCommand::Network );
> + cmd.setNumber( "**33#" );
> + command( cmd, this, SLOT(sendCBMenu()) );
> + }
> + break;
> +
> + case CBMenu_Activation:
> + {
> + cmd.setType( QSimCommand::SendSS );
> + cmd.setDestinationDevice( QSimCommand::Network );
> + cmd.setNumber( "*33#" );
> + command( cmd, this, SLOT(sendCBMenu()) );
> + }
> + break;
You have to be careful here:
- For call barring, activation and registration are equivalent
- Activation requires PIN2, so this is not a valid request
> +
> + case CBMenu_Interrogation:
> + {
> + cmd.setType( QSimCommand::SendSS );
> + cmd.setDestinationDevice( QSimCommand::Network );
> + cmd.setNumber( "*#33#" );
> + command( cmd, this, SLOT(sendCBMenu()) );
> + }
> + break;
> +
> + case CBMenu_Deactivation:
> + {
> + cmd.setType( QSimCommand::SendSS );
> + cmd.setDestinationDevice( QSimCommand::Network );
> + cmd.setNumber( "#33#" );
> + command( cmd, this, SLOT(sendCBMenu()) );
> + }
> + break;
> +
> + case CBMenu_Erasure:
> + {
> + cmd.setType( QSimCommand::SendSS );
> + cmd.setDestinationDevice( QSimCommand::Network );
> + cmd.setNumber( "##33#" );
> + command( cmd, this, SLOT(sendCBMenu()) );
> + }
> + break;
Same comments as for Activation/Registration above
> +
> + default:
> + endSession();
> + break;
> + }
> + } else if ( resp.result() == QSimTerminalResponse::BackwardMove ) {
> + sendSendSSMenu();
> + } else {
> + endSession();
> + }
> +}
> +
<snip>
> +void DemoSimApplication::CFMenu( const QSimTerminalResponse& resp )
> +{
> + QSimCommand cmd;
> +
> + if ( resp.result() == QSimTerminalResponse::Success ) {
> + switch ( resp.menuItem() ) {
> +
> + case CFMenu_Registration:
> + {
> + cmd.setType( QSimCommand::SendSS );
> + cmd.setDestinationDevice( QSimCommand::Network );
> + cmd.setNumber( "**002#" );
> + command( cmd, this, SLOT(sendCFMenu()) );
This is not a valid request, registration must provide a phone number
> + }
> + break;
> +
> + case CFMenu_Activation:
> + {
> + cmd.setType( QSimCommand::SendSS );
> + cmd.setDestinationDevice( QSimCommand::Network );
> + cmd.setNumber( "*002#" );
> + command( cmd, this, SLOT(sendCFMenu()) );
> + }
> + break;
> +
> + case CFMenu_Interrogation:
> + {
> + cmd.setType( QSimCommand::SendSS );
> + cmd.setDestinationDevice( QSimCommand::Network );
> + cmd.setNumber( "*#002#" );
> + command( cmd, this, SLOT(sendCFMenu()) );
> + }
> + break;
Interrogation of 'All CF' is actually not supported natively by GSM.
oFono handles this nicely, but you should filter such requests for Send
SS. Same goes for call barring '330', '333' and '353' services. Refer
to 22.004 Section 7.2 for more details.
> +
> + case CFMenu_Deactivation:
> + {
> + cmd.setType( QSimCommand::SendSS );
> + cmd.setDestinationDevice( QSimCommand::Network );
> + cmd.setNumber( "#002#" );
> + command( cmd, this, SLOT(sendCFMenu()) );
> + }
> + break;
> +
> + case CFMenu_Erasure:
> + {
> + cmd.setType( QSimCommand::SendSS );
> + cmd.setDestinationDevice( QSimCommand::Network );
> + cmd.setNumber( "##002#" );
> + command( cmd, this, SLOT(sendCFMenu()) );
> + }
> + break;
> +
> + default:
> + endSession();
> + break;
> + }
> + } else if ( resp.result() == QSimTerminalResponse::BackwardMove ) {
> + sendSendSSMenu();
> + } else {
> + endSession();
> + }
> +}
Please fix up this patch with the call forwarding / call barring
changes. Otherwise it looks good to me.
Regards,
-Denis
prev parent reply other threads:[~2010-09-09 17:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-09 15:47 [PATCH] Simulate send ss command in sim app Yang Gu
2010-09-09 17:33 ` Denis Kenzior [this message]
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=4C891A7F.7040303@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.