* Add Barred Dialing Support
@ 2010-10-25 11:34 Jeevaka Badrappan
2010-10-25 11:34 ` [PATCH 1/4] simutil: add Efbdn fileid to sim_fileid enum Jeevaka Badrappan
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Jeevaka Badrappan @ 2010-10-25 11:34 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 199 bytes --]
Hi,
This patch adds the barred dialing support. If Barred Dialing service is
enabled, then oFono will go into emergency mode. Patch has been tested with the phonesim.
Regards,
jeevaka
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 1/4] simutil: add Efbdn fileid to sim_fileid enum 2010-10-25 11:34 Add Barred Dialing Support Jeevaka Badrappan @ 2010-10-25 11:34 ` Jeevaka Badrappan 2010-10-25 11:34 ` [PATCH 2/4] sim: add barred dialing support Jeevaka Badrappan ` (3 subsequent siblings) 4 siblings, 0 replies; 11+ messages in thread From: Jeevaka Badrappan @ 2010-10-25 11:34 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 465 bytes --] --- src/simutil.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/simutil.h b/src/simutil.h index 50ad418..5b56099 100644 --- a/src/simutil.h +++ b/src/simutil.h @@ -32,6 +32,7 @@ enum sim_fileid { SIM_EFMSISDN_FILEID = 0x6f40, SIM_EFSPN_FILEID = 0x6f46, SIM_EFSDN_FILEID = 0x6f49, + SIM_EFBDN_FILEID = 0x6f4d, SIM_EFADN_FILEID = 0x6f3a, SIM_EFEST_FILEID = 0x6f56, SIM_EFAD_FILEID = 0x6fad, -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/4] sim: add barred dialing support 2010-10-25 11:34 Add Barred Dialing Support Jeevaka Badrappan 2010-10-25 11:34 ` [PATCH 1/4] simutil: add Efbdn fileid to sim_fileid enum Jeevaka Badrappan @ 2010-10-25 11:34 ` Jeevaka Badrappan 2010-10-25 11:34 ` [PATCH 3/4] doc: Add BarredDialing property Jeevaka Badrappan ` (2 subsequent siblings) 4 siblings, 0 replies; 11+ messages in thread From: Jeevaka Badrappan @ 2010-10-25 11:34 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 4538 bytes --] --- src/sim.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 79 insertions(+), 8 deletions(-) diff --git a/src/sim.c b/src/sim.c index 699ebe9..c631e31 100644 --- a/src/sim.c +++ b/src/sim.c @@ -73,6 +73,7 @@ struct ofono_sim { unsigned char *efsst; unsigned char efsst_length; gboolean fixed_dialing; + gboolean barred_dialing; char *imsi; @@ -288,6 +289,7 @@ static DBusMessage *sim_get_properties(DBusConnection *conn, const char *pin_name; dbus_bool_t present = sim->state != OFONO_SIM_STATE_NOT_PRESENT; dbus_bool_t fdn; + dbus_bool_t bdn; reply = dbus_message_new_method_return(msg); if (!reply) @@ -315,6 +317,9 @@ static DBusMessage *sim_get_properties(DBusConnection *conn, fdn = sim->fixed_dialing; ofono_dbus_dict_append(&dict, "FixedDialing", DBUS_TYPE_BOOLEAN, &fdn); + bdn = sim->barred_dialing; + ofono_dbus_dict_append(&dict, "BarredDialing", DBUS_TYPE_BOOLEAN, &bdn); + if (sim->mnc_length && sim->imsi) { char mcc[OFONO_MAX_MCC_LENGTH + 1]; char mnc[OFONO_MAX_MNC_LENGTH + 1]; @@ -1261,6 +1266,57 @@ static void sim_fdn_enabled(struct ofono_sim *sim) DBUS_TYPE_BOOLEAN, &val); } +static void sim_bdn_enabled(struct ofono_sim *sim) +{ + DBusConnection *conn = ofono_dbus_get_connection(); + const char *path = __ofono_atom_get_path(sim->atom); + dbus_bool_t val; + + sim->barred_dialing = TRUE; + + val = sim->barred_dialing; + ofono_dbus_signal_property_changed(conn, path, + OFONO_SIM_MANAGER_INTERFACE, + "BarredDialing", + DBUS_TYPE_BOOLEAN, &val); +} + +static void sim_efbdn_info_read_cb(int ok, unsigned char file_status, + int total_length, int record_length, + void *userdata) +{ + struct ofono_sim *sim = userdata; + + if (!ok) + goto out; + + if (file_status == SIM_FILE_STATUS_VALID) + sim_bdn_enabled(sim); + +out: + if (sim->fixed_dialing != TRUE && + sim->barred_dialing != TRUE) + sim_retrieve_imsi(sim); +} + +static gboolean check_bdn_status(struct ofono_sim *sim) +{ + /* + * Check the status of Barred Dialing in the SIM-card + * (TS 11.11/TS 51.011, Section 11.5.1: BDN capability request). + * If BDN is allocated, activated in EFsst and EFbdn is validated, + * halt the SIM initialization. + */ + if (sim_sst_is_active(sim->efsst, sim->efsst_length, + SIM_SST_SERVICE_BDN)) { + sim_fs_read_info(sim->simfs, SIM_EFBDN_FILEID, + OFONO_SIM_FILE_STRUCTURE_FIXED, + sim_efbdn_info_read_cb, sim); + return TRUE; + } + return FALSE; +} + static void sim_efadn_info_read_cb(int ok, unsigned char file_status, int total_length, int record_length, void *userdata) @@ -1270,13 +1326,15 @@ static void sim_efadn_info_read_cb(int ok, unsigned char file_status, if (!ok) goto out; - if (file_status != SIM_FILE_STATUS_VALID) { + if (file_status != SIM_FILE_STATUS_VALID) sim_fdn_enabled(sim); - return; - } out: - sim_retrieve_imsi(sim); + if (check_bdn_status(sim) != TRUE) { + if (sim->fixed_dialing != TRUE && + sim->barred_dialing != TRUE) + sim_retrieve_imsi(sim); + } } static void sim_efsst_read_cb(int ok, int length, int record, @@ -1310,6 +1368,9 @@ static void sim_efsst_read_cb(int ok, int length, int record, return; } + if (check_bdn_status(sim) == TRUE) + return; + out: sim_retrieve_imsi(sim); } @@ -1337,13 +1398,22 @@ static void sim_efest_read_cb(int ok, int length, int record, * If FDN is activated, don't continue initialization routine. */ if (sim_est_is_active(sim->efest, sim->efest_length, - SIM_EST_SERVICE_FDN)) { + SIM_EST_SERVICE_FDN)) sim_fdn_enabled(sim); - return; - } + + /* + * Check the status of Barred Dialing in the USIM-card + * (TS 31.102, Section 5.3.2: BDN capability request). + * If BDN service is enabled, halt the USIM initialization. + */ + if (sim_est_is_active(sim->efest, sim->efest_length, + SIM_EST_SERVICE_BDN)) + sim_bdn_enabled(sim); out: - sim_retrieve_imsi(sim); + if (sim->fixed_dialing != TRUE && + sim->barred_dialing != TRUE) + sim_retrieve_imsi(sim); } static void sim_efust_read_cb(int ok, int length, int record, @@ -1922,6 +1992,7 @@ static void sim_free_state(struct ofono_sim *sim) sim->iidf_image = NULL; sim->fixed_dialing = FALSE; + sim->barred_dialing = FALSE; } void ofono_sim_inserted_notify(struct ofono_sim *sim, ofono_bool_t inserted) -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/4] doc: Add BarredDialing property 2010-10-25 11:34 Add Barred Dialing Support Jeevaka Badrappan 2010-10-25 11:34 ` [PATCH 1/4] simutil: add Efbdn fileid to sim_fileid enum Jeevaka Badrappan 2010-10-25 11:34 ` [PATCH 2/4] sim: add barred dialing support Jeevaka Badrappan @ 2010-10-25 11:34 ` Jeevaka Badrappan 2010-10-25 11:34 ` [PATCH 4/4] TODO: Marking the Barred Dialing task as done Jeevaka Badrappan 2010-10-25 15:42 ` Add Barred Dialing Support Denis Kenzior 4 siblings, 0 replies; 11+ messages in thread From: Jeevaka Badrappan @ 2010-10-25 11:34 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 625 bytes --] --- doc/sim-api.txt | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/doc/sim-api.txt b/doc/sim-api.txt index 6dc5e0b..d4d2b1b 100644 --- a/doc/sim-api.txt +++ b/doc/sim-api.txt @@ -138,3 +138,10 @@ Properties boolean Present [readonly] If FDN is enabled, oFono halts the SIM initialization procedure and only emergency calls are allowed. + + boolean BarredDialing [readonly] + + True if Barred Dialing service is enabled in SIM card. + + If BDN is enabled, oFono halts the SIM initialization + procedure and only emergency calls are allowed. -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/4] TODO: Marking the Barred Dialing task as done 2010-10-25 11:34 Add Barred Dialing Support Jeevaka Badrappan ` (2 preceding siblings ...) 2010-10-25 11:34 ` [PATCH 3/4] doc: Add BarredDialing property Jeevaka Badrappan @ 2010-10-25 11:34 ` Jeevaka Badrappan 2010-12-06 12:37 ` Sankar 2010-10-25 15:42 ` Add Barred Dialing Support Denis Kenzior 4 siblings, 1 reply; 11+ messages in thread From: Jeevaka Badrappan @ 2010-10-25 11:34 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1469 bytes --] --- TODO | 7 ------- doc/features.txt | 5 +++++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/TODO b/TODO index d9a6580..ad96241 100644 --- a/TODO +++ b/TODO @@ -110,13 +110,6 @@ SMS SIM / SIM File system ===================== -- Barred Dialing numbers support. BDN will not be supported by oFono. - If BDN service enabled SIM is used, oFono will go into emergency mode. - - Priority: Low - Complexity: C2 - Owner: Jeevaka Badrappan <jeevaka.badrappan@elektrobit.com> - - Read / Write EFcfis. Call forwarding settings can be bootstrapped on the SIM for faster notification of the user that call forwarding is active. These settings are stored in EFcfis. oFono should read these settings and diff --git a/doc/features.txt b/doc/features.txt index 3524e79..12be037 100644 --- a/doc/features.txt +++ b/doc/features.txt @@ -135,3 +135,8 @@ SIM check if FDN support is allocated and enabled in the SIM. If enabled, oFono halts the SIM initialization procedure and the modem remains in the PRESIM state. In this state oFono will only allow emergency calls. + +- Barred Dialing support. oFono reads the necessary bits from the SIM to + check if BDN support is allocated and enabled in the SIM. If enabled, + oFono halts the SIM initialization procedure and the modem remains in the + PRESIM state. In this state oFono will only allow emergency calls. -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 4/4] TODO: Marking the Barred Dialing task as done 2010-10-25 11:34 ` [PATCH 4/4] TODO: Marking the Barred Dialing task as done Jeevaka Badrappan @ 2010-12-06 12:37 ` Sankar 2010-12-06 13:22 ` Jeevaka.Badrappan 0 siblings, 1 reply; 11+ messages in thread From: Sankar @ 2010-12-06 12:37 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 2731 bytes --] Hi Jeevaka, I have a few comments on the support of FDN and BDN in Ofono. Can you please clarify. Thanks, Sankar. On Mon, Oct 25, 2010 at 5:04 PM, Jeevaka Badrappan < jeevaka.badrappan@elektrobit.com> wrote: > --- > TODO | 7 ------- > doc/features.txt | 5 +++++ > 2 files changed, 5 insertions(+), 7 deletions(-) > > diff --git a/TODO b/TODO > index d9a6580..ad96241 100644 > --- a/TODO > +++ b/TODO > @@ -110,13 +110,6 @@ SMS > SIM / SIM File system > ===================== > > -- Barred Dialing numbers support. BDN will not be supported by oFono. > - If BDN service enabled SIM is used, oFono will go into emergency mode. > - > - Priority: Low > - Complexity: C2 > - Owner: Jeevaka Badrappan <jeevaka.badrappan@elektrobit.com> > - > - Read / Write EFcfis. Call forwarding settings can be bootstrapped on > the > SIM for faster notification of the user that call forwarding is active. > These settings are stored in EFcfis. oFono should read these settings > and > diff --git a/doc/features.txt b/doc/features.txt > index 3524e79..12be037 100644 > --- a/doc/features.txt > +++ b/doc/features.txt > @@ -135,3 +135,8 @@ SIM > check if FDN support is allocated and enabled in the SIM. If enabled, > oFono halts the SIM initialization procedure and the modem remains in the > PRESIM state. In this state oFono will only allow emergency calls. > Is there a way for the clients to enable or disable the Fixed Dialling? I assume they should be able to do this by using the dbus calls, "LockPin/UnlockPin". Is there a way to store the FDN numbers in the sim card? How does ofono validate the request to be passed to the network when FDN is enabled? Looks like as per the current implementation of FDN, only emergency calls are allowed. But as per the 3GPP standards, calls shall be allowed to any number (irrespective of emergency no) that is part of the FDN list. If the modem remains in PRESIM State, how does the mobile receive the Incoming Calls or SMS? As per my understanding FDN applies in the uplink and not in the downlink. Please clarify if my understanding is wrong. > + > +- Barred Dialing support. oFono reads the necessary bits from the SIM to > + check if BDN support is allocated and enabled in the SIM. If enabled, > + oFono halts the SIM initialization procedure and the modem remains in > the > + PRESIM state. In this state oFono will only allow emergency calls. > I have similar doubts for BDN also. > -- > Best Regards, Sankar. > 1.7.0.4 > > _______________________________________________ > ofono mailing list > ofono(a)ofono.org > http://lists.ofono.org/listinfo/ofono > [-- Attachment #2: attachment.html --] [-- Type: text/html, Size: 3738 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH 4/4] TODO: Marking the Barred Dialing task as done 2010-12-06 12:37 ` Sankar @ 2010-12-06 13:22 ` Jeevaka.Badrappan 2010-12-06 14:29 ` Sankar 0 siblings, 1 reply; 11+ messages in thread From: Jeevaka.Badrappan @ 2010-12-06 13:22 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1414 bytes --] Hi Sankar, > Is there a way for the clients to enable or disable the Fixed Dialling? I assume they should be able to do this by using the dbus calls, "LockPin/UnlockPin". Is there a > way to store the FDN numbers in the sim card? How does ofono validate the request to be passed to the network when FDN is enabled? Looks like as per the current > implementation of FDN, only emergency calls are allowed. But as per the 3GPP standards, calls shall be allowed to any number (irrespective of emergency no) that is part of > the FDN list. Currently, there is no way to enable or disable fixed dialling or Barred Dialling using oFono. If my assumption is correct, there is no plans to add support.(Denis/Marcel can confirm this). oFono doesn't support storing any numbers in the SIM storage(EFadn, EFfdn or EFbdn). Agreed as per the specification calls shall be allowed to any number that is part of the FDN list. But its been agreed that oFono will enter presim state when FDN or BDN service is enabled in which state only emergency calls are allowed. > If the modem remains in PRESIM State, how does the mobile receive the Incoming Calls or SMS? As per my understanding FDN applies in the uplink and not in the downlink. > Please clarify if my understanding is wrong. Yes, your understanding is correct. FDN applies to the Mobile originated calls, SMS etc. Regards, Jeevaka ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/4] TODO: Marking the Barred Dialing task as done 2010-12-06 13:22 ` Jeevaka.Badrappan @ 2010-12-06 14:29 ` Sankar 2010-12-06 15:48 ` Jeevaka.Badrappan 0 siblings, 1 reply; 11+ messages in thread From: Sankar @ 2010-12-06 14:29 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 2358 bytes --] Hi Jeevaka, Thanks for confirming. On Mon, Dec 6, 2010 at 6:52 PM, <Jeevaka.Badrappan@elektrobit.com> wrote: > Hi Sankar, > > > Is there a way for the clients to enable or disable the Fixed > Dialling? I assume they should be able to do this by using the dbus > calls, "LockPin/UnlockPin". Is there a > > way to store the FDN numbers in the sim card? How does ofono validate > the request to be passed to the network when FDN is enabled? Looks like > as per the current > > implementation of FDN, only emergency calls are allowed. But as per > the 3GPP standards, calls shall be allowed to any number (irrespective > of emergency no) that is part of > the FDN list. > > Currently, there is no way to enable or disable fixed dialling or Barred > Dialling using oFono. If my assumption is correct, there is no plans to > add support.(Denis/Marcel can confirm this). oFono doesn't support > storing any numbers in the SIM storage(EFadn, EFfdn or EFbdn). Agreed as > per the specification calls shall be allowed to any number that is part > of the FDN list. But its been agreed that oFono will enter presim state > when FDN or BDN service is enabled in which state only emergency calls > are allowed. > Then as per your email, the support provided in Ofono seems to be limited. If there is no enable or disable is allowed, I am not sure, how we can we have a card in which FDN enabled, which will force the ofono to enter presim state. Unless there is no option to disable at, forever with that sim card, the phone will be in presim state,leading to only placing of emergency calls. > > > If the modem remains in PRESIM State, how does the mobile receive the > Incoming Calls or SMS? As per my understanding FDN applies in the uplink > and not in the downlink. > > Please clarify if my understanding is wrong. > > Yes, your understanding is correct. FDN applies to the Mobile originated > calls, SMS etc. > Thanks for confirming. Then in this case, are we not forcing the mobile to go in a state, where if FDN is already enabled in the sim card( may be from a different phone), user allowed with no option rather than making an emergency call. > > Regards, > Jeevaka > _______________________________________________ > ofono mailing list > ofono(a)ofono.org > http://lists.ofono.org/listinfo/ofono > [-- Attachment #2: attachment.html --] [-- Type: text/html, Size: 3220 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH 4/4] TODO: Marking the Barred Dialing task as done 2010-12-06 14:29 ` Sankar @ 2010-12-06 15:48 ` Jeevaka.Badrappan 2010-12-07 11:12 ` Sankar 0 siblings, 1 reply; 11+ messages in thread From: Jeevaka.Badrappan @ 2010-12-06 15:48 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1047 bytes --] Hi Sankar, > Then as per your email, the support provided in Ofono seems to be limited. If there is no enable or disable is allowed, > I am not sure, how we can we have a card in which FDN enabled, which will force the ofono to enter presim state. Unless there is no > option to disable at, forever with that sim card, the phone will be in presim state,leading to only placing of emergency calls. Support for disabling FDN was discussed earlier. Denis/Pessi could you confirm what was the decision made on FDN disable support? > Thanks for confirming. Then in this case, are we not forcing the mobile to go in a state, where if FDN is already enabled in the sim card( may be from a different phone), > user allowed with no option rather than making an emergency call. Yes, we are forcing the mobile into presim state where only emergency calls are allowed. We have already discussed this many times in irc and its been agreed that only emergency calls are allowed when FDN or BDN enabled SIM used. Regards, Jeevaka ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/4] TODO: Marking the Barred Dialing task as done 2010-12-06 15:48 ` Jeevaka.Badrappan @ 2010-12-07 11:12 ` Sankar 0 siblings, 0 replies; 11+ messages in thread From: Sankar @ 2010-12-07 11:12 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1444 bytes --] Hi Denis/Pessi, On Mon, Dec 6, 2010 at 9:18 PM, <Jeevaka.Badrappan@elektrobit.com> wrote: > Hi Sankar, > > > Then as per your email, the support provided in Ofono seems to be > limited. If there is no enable or disable is allowed, > > I am not sure, how we can we have a card in which FDN enabled, which > will force the ofono to enter presim state. Unless there is no > > option to disable at, forever with that sim card, the phone will be in > presim state,leading to only placing of emergency calls. > > Support for disabling FDN was discussed earlier. Denis/Pessi could you > confirm what was the decision made on FDN disable support? > Can you please provide your comments on the support for Enable/Disable of FDN/BDN in ofono. Thanks, Sankar. > > > Thanks for confirming. Then in this case, are we not forcing the > mobile to go in a state, where if FDN is already enabled in the sim > card( may be from a different phone), > > user allowed with no option rather than making an emergency call. > > Yes, we are forcing the mobile into presim state where only emergency > calls are allowed. We have already discussed this many times in irc and > its been agreed that only emergency calls are allowed when FDN or BDN > enabled SIM used. > > Regards, > Jeevaka > _______________________________________________ > ofono mailing list > ofono(a)ofono.org > http://lists.ofono.org/listinfo/ofono > [-- Attachment #2: attachment.html --] [-- Type: text/html, Size: 2108 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Add Barred Dialing Support 2010-10-25 11:34 Add Barred Dialing Support Jeevaka Badrappan ` (3 preceding siblings ...) 2010-10-25 11:34 ` [PATCH 4/4] TODO: Marking the Barred Dialing task as done Jeevaka Badrappan @ 2010-10-25 15:42 ` Denis Kenzior 4 siblings, 0 replies; 11+ messages in thread From: Denis Kenzior @ 2010-10-25 15:42 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 363 bytes --] Hi Jeevaka, On 10/25/2010 06:34 AM, Jeevaka Badrappan wrote: > > > Hi, > > This patch adds the barred dialing support. If Barred Dialing service is > enabled, then oFono will go into emergency mode. Patch has been tested with the phonesim. > All patches looked clean to me and have been applied. Keep up the good work :) Regards, -Denis ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-12-07 11:12 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-10-25 11:34 Add Barred Dialing Support Jeevaka Badrappan 2010-10-25 11:34 ` [PATCH 1/4] simutil: add Efbdn fileid to sim_fileid enum Jeevaka Badrappan 2010-10-25 11:34 ` [PATCH 2/4] sim: add barred dialing support Jeevaka Badrappan 2010-10-25 11:34 ` [PATCH 3/4] doc: Add BarredDialing property Jeevaka Badrappan 2010-10-25 11:34 ` [PATCH 4/4] TODO: Marking the Barred Dialing task as done Jeevaka Badrappan 2010-12-06 12:37 ` Sankar 2010-12-06 13:22 ` Jeevaka.Badrappan 2010-12-06 14:29 ` Sankar 2010-12-06 15:48 ` Jeevaka.Badrappan 2010-12-07 11:12 ` Sankar 2010-10-25 15:42 ` Add Barred Dialing Support Denis Kenzior
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.