RE: [PATCH v3 2/2] plugins: add ctm create to ifx plugin
Hi Marcel, -Original Message- From: ofono-boun...@ofono.org [mailto:ofono-boun...@ofono.org] On Behalf Of Marcel Holtmann Sent: Friday, January 14, 2011 1:15 AM To: ofono@ofono.org Subject: Re: [PATCH v3 2/2] plugins: add ctm create to ifx plugin Hi Jeevaka, plugins/ifx.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/plugins/ifx.c b/plugins/ifx.c index c0a69c2..08b0001 100644 --- a/plugins/ifx.c +++ b/plugins/ifx.c @@ -57,6 +57,7 @@ #include ofono/radio-settings.h #include ofono/audio-settings.h #include ofono/stk.h +#include ofono/ctm.h #include ofono/log.h #include drivers/atmodem/atutil.h @@ -700,6 +701,7 @@ static void ifx_post_sim(struct ofono_modem *modem) DBG(%p, modem); + ofono_ctm_create(modem, 0, ifxmodem, data-dlcs[AUX_DLC]); so no emergency calls with CTM are possible? Or do we have to potentially also handle that? Emergency calls with TTY are mandatory in the US so we have to handle that as well Regards Fred - Intel Corporation SAS (French simplified joint stock company) Registered headquarters: Les Montalets- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH 1/3] stk: Handle Launch Browser proactive command
--- src/stk.c | 90 src/stkagent.c | 68 ++ src/stkagent.h |7 3 files changed, 165 insertions(+), 0 deletions(-) diff --git a/src/stk.c b/src/stk.c index f151fc1..e6df58b 100644 --- a/src/stk.c +++ b/src/stk.c @@ -2358,6 +2358,91 @@ static gboolean handle_command_play_tone(const struct stk_command *cmd, return FALSE; } +static void confirm_launch_browser_cb(enum stk_agent_result result, + gboolean confirm, + void *user_data) +{ + struct ofono_stk *stk = user_data; + unsigned char no_cause[] = { 0x00 }; + struct ofono_error failure = { .type = OFONO_ERROR_TYPE_FAILURE }; + struct stk_response rsp; + + stk-respond_on_exit = FALSE; + + switch (result) { + case STK_AGENT_RESULT_TIMEOUT: + confirm = FALSE; + /* Fall through */ + + case STK_AGENT_RESULT_OK: + if (confirm) + break; + + send_simple_response(stk, STK_RESULT_TYPE_USER_REJECT); + return; + default: + memset(rsp, 0, sizeof(rsp)); + ADD_ERROR_RESULT(rsp.result, STK_RESULT_TYPE_TERMINAL_BUSY, + no_cause); + + if (stk_respond(stk, rsp, stk_command_cb)) + stk_command_cb(failure, stk); + + return; + } + + send_simple_response(stk, STK_RESULT_TYPE_SUCCESS); +} + +static gboolean handle_command_launch_browser(const struct stk_command *cmd, + struct stk_response *rsp, + struct ofono_stk *stk) +{ + const struct stk_command_launch_browser *lb = cmd-launch_browser; + static unsigned char no_cause[] = { 0x00 }; + int qualifier = cmd-qualifier; + char *alpha_id; + int err; + + if (qualifier 3 || qualifier == 1) { + rsp-result.type = STK_RESULT_TYPE_COMMAND_NOT_UNDERSTOOD; + return TRUE; + } + + if ( lb-browser_id 4) { + rsp-result.type = STK_RESULT_TYPE_DATA_NOT_UNDERSTOOD; + return TRUE; + } + + alpha_id = dbus_apply_text_attributes(lb-alpha_id ? lb-alpha_id : , + lb-text_attr); + if (alpha_id == NULL) { + rsp-result.type = STK_RESULT_TYPE_DATA_NOT_UNDERSTOOD; + return TRUE; + } + + err = stk_agent_confirm_launch_browser(stk-current_agent, alpha_id, + lb-icon_id.id, lb-url, + confirm_launch_browser_cb, + stk, NULL, stk-timeout * 1000); + g_free(alpha_id); + + if (err 0) { + /* +* We most likely got an out of memory error, tell SIM +* to retry +*/ + ADD_ERROR_RESULT(rsp-result, STK_RESULT_TYPE_TERMINAL_BUSY, + no_cause); + return TRUE; + } + + stk-respond_on_exit = TRUE; + stk-cancel_cmd = stk_request_cancel; + + return FALSE; +} + static void stk_proactive_command_cancel(struct ofono_stk *stk) { if (stk-immediate_response) @@ -2545,6 +2630,11 @@ void ofono_stk_proactive_command_notify(struct ofono_stk *stk, rsp, stk); break; + case STK_COMMAND_TYPE_LAUNCH_BROWSER: + respond = handle_command_launch_browser(stk-pending_cmd, + rsp, stk); + break; + default: rsp.result.type = STK_RESULT_TYPE_COMMAND_NOT_UNDERSTOOD; break; diff --git a/src/stkagent.c b/src/stkagent.c index 2cdc6e1..2395182 100644 --- a/src/stkagent.c +++ b/src/stkagent.c @@ -1013,3 +1013,71 @@ int stk_agent_display_action_info(struct stk_agent *agent, const char *text, return 0; } + +static void confirm_launch_browser_cb(DBusPendingCall *call, void *data) +{ + struct stk_agent *agent = data; + stk_agent_confirmation_cb cb = agent-user_cb; + DBusMessage *reply = dbus_pending_call_steal_reply(call); + enum stk_agent_result result; + gboolean remove_agent; + dbus_bool_t confirm; + + if (check_error(agent, reply, 0, result) == -EINVAL) { + remove_agent = TRUE; + cb(STK_AGENT_RESULT_TERMINATE, FALSE, agent-user_data); + goto error; + } + + if (result != STK_AGENT_RESULT_OK) { + cb(result, FALSE, agent-user_data); + goto done; + } + + if (dbus_message_get_args(reply, NULL, +
[PATCH 3/3] doc: Describe ConfirmLaunchBrowser method
--- doc/stk-api.txt |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/doc/stk-api.txt b/doc/stk-api.txt index 425ee23..7669311 100644 --- a/doc/stk-api.txt +++ b/doc/stk-api.txt @@ -257,6 +257,14 @@ Methodsbyte RequestSelection(string title, byte icon_id, until the call is canceled using Cancel(). This method should not return. + boolean ConfirmLaunchBrowser() (string information, + byte icon_id, string url) + + Asks the agent to request user to confirm launch + browser. If confirmed, then the agent should send + confirmation message to oFono and then should open + the launch browser with the given url. + void Cancel() [noreply] Asks the agent to cancel any ongoing operation in -- 1.7.0.4 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH] stemodem: Incorrect string length in dtmf buf.
From: Helen Clemson helen.clem...@stericsson.com Strlen includes a NULL character. This change affects both stemodem and hfpmodem. --- drivers/hfpmodem/voicecall.c |4 ++-- drivers/stemodem/voicecall.c |5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c index 4c8ee37..1aefc53 100644 --- a/drivers/hfpmodem/voicecall.c +++ b/drivers/hfpmodem/voicecall.c @@ -590,8 +590,8 @@ static void hfp_send_dtmf(struct ofono_voicecall *vc, const char *dtmf, req-data = data; req-affected_types = 0; - /* strlen(AT+VTS=) = 7 */ - buf = g_try_new(char, strlen(dtmf) + 7); + /* strlen(AT+VTS=) = 7 + NULL */ + buf = g_try_new(char, strlen(dtmf) + 8); if (buf == NULL) goto error; diff --git a/drivers/stemodem/voicecall.c b/drivers/stemodem/voicecall.c index 8f3533d..ea3d48f 100644 --- a/drivers/stemodem/voicecall.c +++ b/drivers/stemodem/voicecall.c @@ -375,15 +375,14 @@ static void ste_send_dtmf(struct ofono_voicecall *vc, const char *dtmf, { struct voicecall_data *vd = ofono_voicecall_get_data(vc); struct cb_data *cbd = cb_data_new(cb, data); - int len = strlen(dtmf); int s; char *buf; if (cbd == NULL) goto error; - /* strlen(AT+VTS=) = 7 */ - buf = g_try_new(char, len + 7); + /* strlen(AT+VTS=) = 7 + NULL */ + buf = g_try_new(char, strlen(dtmf) + 8); if (buf == NULL) goto error; -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH] stemodem: Fix spelling mistake in error message.
From: Helen Clemson helen.clem...@stericsson.com --- drivers/stemodem/voicecall.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/stemodem/voicecall.c b/drivers/stemodem/voicecall.c index ea3d48f..68caa81 100644 --- a/drivers/stemodem/voicecall.c +++ b/drivers/stemodem/voicecall.c @@ -469,7 +469,7 @@ static void ecav_notify(GAtResult *result, gpointer user_data) if (l == NULL status != CALL_STATUS_DIALING status != CALL_STATUS_WAITING status != CALL_STATUS_INCOMING) { - ofono_error(ECAV notification for unknow call. + ofono_error(ECAV notification for unknown call. id: %d, status: %d, id, status); return; } -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH] test: add disable-call-forwarding
Hi Jarko, Makefile.am |3 +- test/disable-call-forwarding | 53 ++ 2 files changed, 55 insertions(+), 1 deletions(-) create mode 100755 test/disable-call-forwarding patch has been applied. Thanks. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH] stemodem: Incorrect string length in dtmf buf.
Hi Helen, Strlen includes a NULL character. This change affects both stemodem and hfpmodem. --- drivers/hfpmodem/voicecall.c |4 ++-- drivers/stemodem/voicecall.c |5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) please break this down into two patches. We always use separate patches per driver directory. In addition it also then makes your subject line correct. diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c index 4c8ee37..1aefc53 100644 --- a/drivers/hfpmodem/voicecall.c +++ b/drivers/hfpmodem/voicecall.c @@ -590,8 +590,8 @@ static void hfp_send_dtmf(struct ofono_voicecall *vc, const char *dtmf, req-data = data; req-affected_types = 0; - /* strlen(AT+VTS=) = 7 */ - buf = g_try_new(char, strlen(dtmf) + 7); + /* strlen(AT+VTS=) = 7 + NULL */ + buf = g_try_new(char, strlen(dtmf) + 8); While you are modifying this anyway, please also remove this extra empty line. We try not to have that one if we check the result right away. if (buf == NULL) goto error; Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [RFC PATCH 4/4] Dummy example GPRS context provisioning driver
Hi Jukka, Some virtual operators are using the same MCC/MNC as their host, or some operators have several different trade names, and these can have different access settings (at least different UI visible name). SPN in SIM typically tells these cases apart. This is why I included reading SPN to that example provisioning. Do you have specific examples? To my knowledge the MVNOs should be provisioning the SIM with a different MNC from the host but the network used (and thus the network's MCC/MNC) are their host's. I was not sure if all MVNOs have their own MNC, but in any case some operators use different trade names. Off the top of my hat I know our local Finnish operators Elisa and Sonera use trade names like Kolumbus and TeleFinland, and their name shown in UI needs to be correct. what does the name showing in the UI has to do with the provision data for the GPRS contexts? I am missing your point here. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH] stemodem: Fix spelling mistake in error message.
Hi Helen, drivers/stemodem/voicecall.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) patch has been applied. Thanks. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [RFC PATCH 4/4] Dummy example GPRS context provisioning driver
Hi , I was not sure if all MVNOs have their own MNC, but in any case some operators use different trade names. Off the top of my hat I know our local Finnish operators Elisa and Sonera use trade names like Kolumbus and TeleFinland, and their name shown in UI needs to be correct. what does the name showing in the UI has to do with the provision data for the GPRS contexts? I am missing your point here. Isn't the 'name' property of a context shown in some UI (when user selects connection to open)? And there might be cases where other context settings like APN is different with different trade names. --Jukka ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH v2 1/2] stemodem: Incorrect string length in dtmf buf.
From: Helen Clemson helen.clem...@stericsson.com Strlen includes a NULL character. --- drivers/stemodem/voicecall.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/stemodem/voicecall.c b/drivers/stemodem/voicecall.c index 6f948f7..423f63e 100644 --- a/drivers/stemodem/voicecall.c +++ b/drivers/stemodem/voicecall.c @@ -375,16 +375,14 @@ static void ste_send_dtmf(struct ofono_voicecall *vc, const char *dtmf, { struct voicecall_data *vd = ofono_voicecall_get_data(vc); struct cb_data *cbd = cb_data_new(cb, data); - int len = strlen(dtmf); int s; char *buf; if (cbd == NULL) goto error; - /* strlen(AT+VTS=) = 7 */ - buf = g_try_new(char, len + 7); - + /* strlen(AT+VTS=) = 7 + NULL */ + buf = g_try_new(char, strlen(dtmf) + 8); if (buf == NULL) goto error; -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH v2 2/2] hfpmodem: Incorrect string length in dtmf buf.
From: Helen Clemson helen.clem...@stericsson.com Strlen includes a NULL character. --- drivers/hfpmodem/voicecall.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c index 4c8ee37..d4d370e 100644 --- a/drivers/hfpmodem/voicecall.c +++ b/drivers/hfpmodem/voicecall.c @@ -590,9 +590,8 @@ static void hfp_send_dtmf(struct ofono_voicecall *vc, const char *dtmf, req-data = data; req-affected_types = 0; - /* strlen(AT+VTS=) = 7 */ - buf = g_try_new(char, strlen(dtmf) + 7); - + /* strlen(AT+VTS=) = 7 + NULL */ + buf = g_try_new(char, strlen(dtmf) + 8); if (buf == NULL) goto error; -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH 1/2] src: Added enum for PDP context status.
From: Marit Henriksen marit.henrik...@stericsson.com --- src/common.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/common.h b/src/common.h index 64f297e..234ef4a 100644 --- a/src/common.h +++ b/src/common.h @@ -129,6 +129,12 @@ enum pin_type { PIN_TYPE_NET, }; +/* 27.007 Section 10.1.10 */ +enum context_status { + CONTEXT_STATUS_DEACTIVATED = 0, + CONTEXT_STATUS_ACTIVATED = 1, +}; + const char *telephony_error_to_str(const struct ofono_error *error); gboolean valid_phone_number_format(const char *number); -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH 2/2] stemodem: Use macro for context status.
From: Marit Henriksen marit.henrik...@stericsson.com --- drivers/stemodem/gprs-context.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/stemodem/gprs-context.c b/drivers/stemodem/gprs-context.c index 1762fb3..39b5fb5 100644 --- a/drivers/stemodem/gprs-context.c +++ b/drivers/stemodem/gprs-context.c @@ -48,6 +48,7 @@ #include caif_socket.h #include if_caif.h #include caif_rtnl.h +#include common.h #define MAX_CAIF_DEVICES 4 #define MAX_DNS 2 @@ -500,7 +501,7 @@ static void ste_cgact_read_cb(gboolean ok, GAtResult *result, if (!g_at_result_iter_next_number(iter, state)) continue; - if (state == 1) + if (state == CONTEXT_STATUS_ACTIVATED) continue; ofono_gprs_context_deactivated(gc, gcd-active_context); -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH] stemodem: Always run +CGACT? when we get +CGEV.
From: Marit Henriksen marit.henrik...@stericsson.com Remove checks for certain values of CGEV, and instead we will always run CGACT? to check what contexts that are active. --- drivers/stemodem/gprs-context.c | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/stemodem/gprs-context.c b/drivers/stemodem/gprs-context.c index 1762fb3..a084cd4 100644 --- a/drivers/stemodem/gprs-context.c +++ b/drivers/stemodem/gprs-context.c @@ -531,13 +531,9 @@ static void cgev_notify(GAtResult *result, gpointer user_data) if (!g_at_result_iter_next_unquoted_string(iter, event)) return; - if (g_str_has_prefix(event, NW REACT ) || - g_str_has_prefix(event, NW DEACT ) || - g_str_has_prefix(event, ME DEACT )) { - /* Ask what primary contexts are active now */ - g_at_chat_send(gcd-chat, AT+CGACT?, cgact_prefix, - ste_cgact_read_cb, gc, NULL); - } + /* Ask what primary contexts are active now */ + g_at_chat_send(gcd-chat, AT+CGACT?, cgact_prefix, + ste_cgact_read_cb, gc, NULL); } static int ste_gprs_context_probe(struct ofono_gprs_context *gc, -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH] stemodem: Removed defaults in switches.
From: Marit Henriksen marit.henrik...@stericsson.com Coding style guidline M12. --- drivers/stemodem/voicecall.c | 17 +++-- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/stemodem/voicecall.c b/drivers/stemodem/voicecall.c index 99383cf..2ce315c 100644 --- a/drivers/stemodem/voicecall.c +++ b/drivers/stemodem/voicecall.c @@ -76,7 +76,7 @@ struct change_state_req { }; /* Translate from the ECAV-based STE-status to CLCC based status */ -static int call_status_ste_to_ofono(int status) +static int call_status_ste_to_ofono(enum call_status_ste status) { switch (status) { case STE_CALL_STATUS_IDLE: @@ -95,9 +95,9 @@ static int call_status_ste_to_ofono(int status) return CALL_STATUS_INCOMING; case STE_CALL_STATUS_BUSY: return CALL_STATUS_DISCONNECTED; - default: - return CALL_STATUS_DISCONNECTED; } + + return CALL_STATUS_DISCONNECTED; } static struct ofono_call *create_call(struct ofono_voicecall *vc, int type, @@ -198,22 +198,22 @@ static void ste_dial(struct ofono_voicecall *vc, snprintf(buf, sizeof(buf), ATD%s, ph-number); switch (clir) { + case OFONO_CLIR_OPTION_DEFAULT: + break; case OFONO_CLIR_OPTION_INVOCATION: strcat(buf, I); break; case OFONO_CLIR_OPTION_SUPPRESSION: strcat(buf, i); break; - default: - break; } switch (cug) { + case OFONO_CUG_OPTION_DEFAULT: + break; case OFONO_CUG_OPTION_INVOCATION: strcat(buf, G); break; - default: - break; } strcat(buf, ;); @@ -528,9 +528,6 @@ static void ecav_notify(GAtResult *result, gpointer user_data) existing_call-status = status; ofono_voicecall_notify(vc, existing_call); break; - - default: - break; } } -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH] stemodem: Use macro for clip validity.
From: Marit Henriksen marit.henrik...@stericsson.com --- drivers/stemodem/voicecall.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/stemodem/voicecall.c b/drivers/stemodem/voicecall.c index 8f3533d..961b750 100644 --- a/drivers/stemodem/voicecall.c +++ b/drivers/stemodem/voicecall.c @@ -116,7 +116,7 @@ static struct ofono_call *create_call(struct ofono_voicecall *vc, int type, call-direction = direction; call-status = status; - if (clip != 2) { + if (clip != CLIP_VALIDITY_NOT_AVAILABLE) { strncpy(call-phone_number.number, num, OFONO_MAX_PHONE_NUMBER_LENGTH); call-phone_number.type = num_type; -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH] stemodem: Return immediately if not voice call.
From: Marit Henriksen marit.henrik...@stericsson.com --- drivers/stemodem/voicecall.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/stemodem/voicecall.c b/drivers/stemodem/voicecall.c index 8f3533d..e840e4f 100644 --- a/drivers/stemodem/voicecall.c +++ b/drivers/stemodem/voicecall.c @@ -433,6 +433,9 @@ static void ecav_notify(GAtResult *result, gpointer user_data) if (!g_at_result_iter_next_number(iter, call_type)) return; + if (call_type != BEARER_CLASS_VOICE) + return; + /* Skip process id and exit cause */ g_at_result_iter_skip_next(iter); g_at_result_iter_skip_next(iter); @@ -454,9 +457,6 @@ static void ecav_notify(GAtResult *result, gpointer user_data) return; } - if (call_type != BEARER_CLASS_VOICE) - return; - /* * Handle the call according to the status. * If it doesn't exists we make a new one -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH] gatserver: Add ATS6 command handler.
--- gatchat/gatserver.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 11eaac6..906cf26 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -83,6 +83,7 @@ struct v250_settings { char s3;/* set by S3=val */ char s4;/* set by S4=val */ char s5;/* set by S5=val */ + int s6; /* set by S6=val */ gboolean echo; /* set by Eval */ gboolean quiet; /* set by Qval */ gboolean is_v1; /* set by Vval, v0 or v1 */ @@ -426,6 +427,14 @@ static void at_c108_cb(GAtServerRequestType type, GAtResult *result, at_template_cb(type, result, server, server-v250.c108, D, 0, 2, 2); } +static void at_s6_cb(GAtServerRequestType type, GAtResult *result, + gpointer user_data) +{ + GAtServer *server = user_data; + at_template_cb(type, result, server, server-v250.s6, S6, 0, 255, 2); + +} + static inline gboolean is_extended_command_prefix(const char c) { switch (c) { @@ -1031,6 +1040,7 @@ static void v250_settings_create(struct v250_settings *v250) v250-s3 = '\r'; v250-s4 = '\n'; v250-s5 = '\b'; + v250-s6 = 2; v250-echo = TRUE; v250-quiet = FALSE; v250-is_v1 = TRUE; @@ -1054,6 +1064,7 @@ static void basic_command_register(GAtServer *server) g_at_server_register(server, S3, at_s3_cb, server, NULL); g_at_server_register(server, S4, at_s4_cb, server, NULL); g_at_server_register(server, S5, at_s5_cb, server, NULL); + g_at_server_register(server, S6, at_s6_cb, server, NULL); g_at_server_register(server, E, at_e_cb, server, NULL); g_at_server_register(server, Q, at_q_cb, server, NULL); g_at_server_register(server, V, at_v_cb, server, NULL); -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
RE: [PATCH v3 2/2] plugins: add ctm create to ifx plugin
Hi, On 14 Jan 2011, Marcel Holtmann wrote: #include drivers/atmodem/atutil.h @@ -700,6 +701,7 @@ static void ifx_post_sim(struct ofono_modem *modem) DBG(%p, modem); +ofono_ctm_create(modem, 0, ifxmodem, data-dlcs[AUX_DLC]); so no emergency calls with CTM are possible? Or do we have to potentially also handle that? a very good point! So yes, TTY-enabled emergency calls are definitely needed. And in fact, that's probably one of the _most_ important use-cases for TTY there is (as you cannot send an SMS to the emergency center [1]). [1] well, actually there are specs for this, and even trials, but it'll take ages before this gets widely deployed ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH] plugins: add ctm create to ifx plugin
--- plugins/ifx.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/plugins/ifx.c b/plugins/ifx.c index c0a69c2..61c60c1 100644 --- a/plugins/ifx.c +++ b/plugins/ifx.c @@ -57,6 +57,7 @@ #include ofono/radio-settings.h #include ofono/audio-settings.h #include ofono/stk.h +#include ofono/ctm.h #include ofono/log.h #include drivers/atmodem/atutil.h @@ -692,6 +693,7 @@ static void ifx_pre_sim(struct ofono_modem *modem) ofono_voicecall_create(modem, 0, ifxmodem, data-dlcs[VOICE_DLC]); ofono_audio_settings_create(modem, 0, ifxmodem, data-dlcs[VOICE_DLC]); + ofono_ctm_create(modem, 0, ifxmodem, data-dlcs[AUX_DLC]); } static void ifx_post_sim(struct ofono_modem *modem) -- 1.7.0.4 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH] stemodem: Removed defaults in switches.
Hi Marit, Coding style guidline M12. --- drivers/stemodem/voicecall.c | 17 +++-- 1 files changed, 7 insertions(+), 10 deletions(-) patch has been applied. Thanks. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH v2 2/2] hfpmodem: Incorrect string length in dtmf buf.
Hi Helen, Strlen includes a NULL character. --- drivers/hfpmodem/voicecall.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) patch has been applied. Thanks. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH v2 1/2] stemodem: Incorrect string length in dtmf buf.
Hi Helen, Strlen includes a NULL character. --- drivers/stemodem/voicecall.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) patch has been applied. Thanks. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH] stemodem: Use macro for clip validity.
Hi Marit, drivers/stemodem/voicecall.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) patch has been applied. Thanks. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH] stemodem: Return immediately if not voice call.
Hi Marit, drivers/stemodem/voicecall.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) patch has been applied. Thanks. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH] stemodem: Always run +CGACT? when we get +CGEV.
Hi Marit, Remove checks for certain values of CGEV, and instead we will always run CGACT? to check what contexts that are active. --- drivers/stemodem/gprs-context.c | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) patch has been applied. Thanks. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH 2/2] stemodem: Use macro for context status.
Hi Marit, drivers/stemodem/gprs-context.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) patch has been applied. Thanks. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH 1/2] src: Added enum for PDP context status.
Hi Marit, src/common.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) patch has been applied. Thanks. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH] plugins: add ctm create to ifx plugin
Hi Jeevaka, plugins/ifx.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) patch has been applied. However please prefix these with the plugin in question. So it should be ifx: instead. I fixed that for you. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH 1/2] plugins-mbm: Adding timer removal to mbm_remove()
From: Tomasz Gregorek tomasz.grego...@stericsson.com In case the modem is disconnected during enabling process, mbm_disconnect() will set up data-reopen_source timer. This timer needs to be removed in mbm_remove() to stop execution of reopen_callback() after hardware disconnection. --- plugins/mbm.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/plugins/mbm.c b/plugins/mbm.c index dca9bd8..38583ac 100644 --- a/plugins/mbm.c +++ b/plugins/mbm.c @@ -91,6 +91,11 @@ static void mbm_remove(struct ofono_modem *modem) DBG(%p, modem); + if (data-reopen_source 0) { + g_source_remove(data-reopen_source); + data-reopen_source = 0; + } + ofono_modem_set_data(modem, NULL); g_at_chat_unref(data-data_port); -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH 2/2] plugins-mbm: Remove data-reopen_source timer before setting up new one
From: Tomasz Gregorek tomasz.grego...@stericsson.com Check if there is a timer running already and remove it before creating a new one. This will prevent calling reopen_callback() more than if mbm_disconnect() is called more than once. --- plugins/mbm.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/plugins/mbm.c b/plugins/mbm.c index 38583ac..4048f6a 100644 --- a/plugins/mbm.c +++ b/plugins/mbm.c @@ -351,6 +351,9 @@ static void mbm_disconnect(gpointer user_data) data-data_port = NULL; /* Waiting for the +CGEV: ME DEACT might also work */ + if (data-reopen_source 0) + g_source_remove(data-reopen_source); + data-reopen_source = g_timeout_add_seconds(1, reopen_callback, modem); } -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH] gatserver: Add ATS6 command handler.
Hi Olivier, diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 11eaac6..906cf26 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -83,6 +83,7 @@ struct v250_settings { char s3;/* set by S3=val */ char s4;/* set by S4=val */ char s5;/* set by S5=val */ + int s6; /* set by S6=val */ why is this an int and not just an unsigned char? You mark the value as from 0-255 and this fine here. gboolean echo; /* set by Eval */ gboolean quiet; /* set by Qval */ gboolean is_v1; /* set by Vval, v0 or v1 */ @@ -426,6 +427,14 @@ static void at_c108_cb(GAtServerRequestType type, GAtResult *result, at_template_cb(type, result, server, server-v250.c108, D, 0, 2, 2); } +static void at_s6_cb(GAtServerRequestType type, GAtResult *result, + gpointer user_data) +{ + GAtServer *server = user_data; + at_template_cb(type, result, server, server-v250.s6, S6, 0, 255, 2); + You have an extra empty line here. Please remove that. +} + static inline gboolean is_extended_command_prefix(const char c) { switch (c) { @@ -1031,6 +1040,7 @@ static void v250_settings_create(struct v250_settings *v250) v250-s3 = '\r'; v250-s4 = '\n'; v250-s5 = '\b'; + v250-s6 = 2; v250-echo = TRUE; v250-quiet = FALSE; v250-is_v1 = TRUE; @@ -1054,6 +1064,7 @@ static void basic_command_register(GAtServer *server) g_at_server_register(server, S3, at_s3_cb, server, NULL); g_at_server_register(server, S4, at_s4_cb, server, NULL); g_at_server_register(server, S5, at_s5_cb, server, NULL); + g_at_server_register(server, S6, at_s6_cb, server, NULL); g_at_server_register(server, E, at_e_cb, server, NULL); g_at_server_register(server, Q, at_q_cb, server, NULL); g_at_server_register(server, V, at_v_cb, server, NULL); Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH 2/2] plugins-mbm: Remove data-reopen_source timer before setting up new one
Hi Tomasz, Check if there is a timer running already and remove it before creating a new one. This will prevent calling reopen_callback() more than if mbm_disconnect() is called more than once. --- plugins/mbm.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) patch has been applied, but same comment about the prefix applies here as well. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH 1/2] plugins-mbm: Adding timer removal to mbm_remove()
Hi Tomasz, In case the modem is disconnected during enabling process, mbm_disconnect() will set up data-reopen_source timer. This timer needs to be removed in mbm_remove() to stop execution of reopen_callback() after hardware disconnection. --- plugins/mbm.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) patch has been applied. However as general rule for prefix of patches to the plugin director we just use the plugin name. So in your case mbm: would be correct. I fixed this up for you. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [RFC PATCH 4/4] Dummy example GPRS context provisioning driver
Hi Jukka, I was not sure if all MVNOs have their own MNC, but in any case some operators use different trade names. Off the top of my hat I know our local Finnish operators Elisa and Sonera use trade names like Kolumbus and TeleFinland, and their name shown in UI needs to be correct. what does the name showing in the UI has to do with the provision data for the GPRS contexts? I am missing your point here. Isn't the 'name' property of a context shown in some UI (when user selects connection to open)? so you wanna use the SPN to set the nice friendly name of the Context. So far we just defaulted to Internet and MMS and did not bother any further. For example ConnMan actually takes that information from the network registration and not from the context. And there might be cases where other context settings like APN is different with different trade names. Is that really the case? Can this be used reliably? Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [RFC PATCH 4/4] Dummy example GPRS context provisioning driver
Hi On Fri, 2011-01-14 at 14:44 +0100, ext Marcel Holtmann wrote: Hi Jukka, I was not sure if all MVNOs have their own MNC, but in any case some operators use different trade names. Off the top of my hat I know our local Finnish operators Elisa and Sonera use trade names like Kolumbus and TeleFinland, and their name shown in UI needs to be correct. what does the name showing in the UI has to do with the provision data for the GPRS contexts? I am missing your point here. Isn't the 'name' property of a context shown in some UI (when user selects connection to open)? so you wanna use the SPN to set the nice friendly name of the Context. So far we just defaulted to Internet and MMS and did not bother any further. Yes, that is how our previous UIs have done it, and I guess our UX designers like it in the future too. For example ConnMan actually takes that information from the network registration and not from the context. And there might be cases where other context settings like APN is different with different trade names. Is that really the case? Can this be used reliably? Quick look at our operator database does indeed confirm that, there are cases where different SPN maps to different APN. --Jukka ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [RFC PATCH 4/4] Dummy example GPRS context provisioning driver
Hi Jukka, I was not sure if all MVNOs have their own MNC, but in any case some operators use different trade names. Off the top of my hat I know our local Finnish operators Elisa and Sonera use trade names like Kolumbus and TeleFinland, and their name shown in UI needs to be correct. what does the name showing in the UI has to do with the provision data for the GPRS contexts? I am missing your point here. Isn't the 'name' property of a context shown in some UI (when user selects connection to open)? so you wanna use the SPN to set the nice friendly name of the Context. So far we just defaulted to Internet and MMS and did not bother any further. Yes, that is how our previous UIs have done it, and I guess our UX designers like it in the future too. I would advise the UI against using the name from the context information and better using the one from the network registration instead. The context gets only provisioned once. So any update of the network name can not be reflected later on by provisioning. It would have to be a manual step. And operators are known to changing their names. When using network registration this would just work fine. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH 1/2] atmodem: move USSD quirk to probe and use it also for STE modems
Fixing issues in USSD quirk: 1) MT USSD are not handled correctly if modem uses IRA character set (change character set to GSM already in probe) 2) Responses from NW to MO USSD are not hadled as internal variable is not updated after cscs= command (Query right after setting) 3) Use the same quirk for STE modems --- drivers/atmodem/ussd.c | 21 - 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/atmodem/ussd.c b/drivers/atmodem/ussd.c index 651b6af..411b1de 100644 --- a/drivers/atmodem/ussd.c +++ b/drivers/atmodem/ussd.c @@ -219,15 +219,6 @@ static void at_ussd_request(struct ofono_ussd *ussd, int dcs, converted, dcs); } - if (data-vendor == OFONO_VENDOR_QUALCOMM_MSM) { - /* Ensure that the modem is using GSM character set. It -* seems it defaults to IRA and then umlauts are not -* properly encoded. The modem returns some weird from -* of Latin-1, but it is not really Latin-1 either. */ - g_at_chat_send(data-chat, AT+CSCS=\GSM\, none_prefix, - NULL, NULL, NULL); - } - if (g_at_chat_send(data-chat, buf, cusd_prefix, cusd_request_cb, cbd, g_free) 0) return; @@ -314,6 +305,18 @@ static int at_ussd_probe(struct ofono_ussd *ussd, unsigned int vendor, ofono_ussd_set_data(ussd, data); + switch (data-vendor) { + case OFONO_VENDOR_QUALCOMM_MSM: + case OFONO_VENDOR_STE: + /* + * Ensure that the modem is using GSM character set. It + * seems it defaults to IRA and then umlauts are not + * properly encoded. The modem returns some weird from + * of Latin-1, but it is not really Latin-1 either. + */ + g_at_chat_send(data-chat, AT+CSCS=\GSM\, none_prefix, + NULL, NULL, NULL); + break; + } + g_at_chat_send(chat, AT+CSCS?, cscs_prefix, read_charset_cb, data, NULL); -- 1.7.0.4 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH 2/2] ste: Enable vendor quirk for USSD
This USSD quirk won't work for MT USSD --- plugins/ste.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/plugins/ste.c b/plugins/ste.c index 7bb7232..3ede210 100644 --- a/plugins/ste.c +++ b/plugins/ste.c @@ -363,7 +363,7 @@ static void ste_post_online(struct ofono_modem *modem) DBG(%p, modem); - ofono_ussd_create(modem, 0, atmodem, data-chat); + ofono_ussd_create(modem, OFONO_VENDOR_STE, atmodem, data-chat); ofono_call_forwarding_create(modem, 0, atmodem, data-chat); ofono_call_settings_create(modem, 0, atmodem, data-chat); ofono_netreg_create(modem, OFONO_VENDOR_MBM, atmodem, data-chat); -- 1.7.0.4 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH 1/2] atmodem: move USSD quirk to probe and use it also for STE modems
Hi Lasse, Fixing issues in USSD quirk: 1) MT USSD are not handled correctly if modem uses IRA character set (change character set to GSM already in probe) 2) Responses from NW to MO USSD are not hadled as internal variable is not updated after cscs= command (Query right after setting) 3) Use the same quirk for STE modems Hi Lasse, --- drivers/atmodem/ussd.c | 21 - 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/atmodem/ussd.c b/drivers/atmodem/ussd.c index 651b6af..411b1de 100644 --- a/drivers/atmodem/ussd.c +++ b/drivers/atmodem/ussd.c @@ -219,15 +219,6 @@ static void at_ussd_request(struct ofono_ussd *ussd, int dcs, converted, dcs); } - if (data-vendor == OFONO_VENDOR_QUALCOMM_MSM) { - /* Ensure that the modem is using GSM character set. It - * seems it defaults to IRA and then umlauts are not - * properly encoded. The modem returns some weird from - * of Latin-1, but it is not really Latin-1 either. */ - g_at_chat_send(data-chat, AT+CSCS=\GSM\, none_prefix, - NULL, NULL, NULL); - } - if (g_at_chat_send(data-chat, buf, cusd_prefix, cusd_request_cb, cbd, g_free) 0) return; @@ -314,6 +305,18 @@ static int at_ussd_probe(struct ofono_ussd *ussd, unsigned int vendor, ofono_ussd_set_data(ussd, data); + switch (data-vendor) { + case OFONO_VENDOR_QUALCOMM_MSM: + case OFONO_VENDOR_STE: + /* + * Ensure that the modem is using GSM character set. It + * seems it defaults to IRA and then umlauts are not + * properly encoded. The modem returns some weird from + * of Latin-1, but it is not really Latin-1 either. + */ + g_at_chat_send(data-chat, AT+CSCS=\GSM\, none_prefix, + NULL, NULL, NULL); + break; + } + g_at_chat_send(chat, AT+CSCS?, cscs_prefix, read_charset_cb, data, NULL); so we don't really wanna do it this way since other atoms like the phonebook can switch the character sets as well. The best is if the STE modem would provide access to the USSD in PDU mode and we can then decode it properly. Using text mode for USSD is not the best idea actually. Same as text mode for SMS is utterly broken ;) Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[offline-atoms PATCH 0/2]
Hi all, Here are patches that make gprs and sim atom online-agnostic. The atoms follow the network registration status and they can be added in post_sim. The intention is to allow GPRS context to be configured and short messages to be queued while in offline. The patches has been tested with mbm and n900 modems (admittedly in December last year). --Pekka ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[offline-atoms PATCH 1/2] Make gprs atom offline-safe.
From: Pekka Pessi pekka.pe...@nokia.com Allow use of GPRS atom both in online and offline (post_sim) states. The GPRS now considers the removal of the netreg atom as implicit detach and registration change to NOT_REGISTERED. --- src/gprs.c | 20 ++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/gprs.c b/src/gprs.c index 0e86bdf..35cc475 100644 --- a/src/gprs.c +++ b/src/gprs.c @@ -1370,10 +1370,27 @@ static void gprs_attach_callback(const struct ofono_error *error, void *data) } } +static void gprs_netreg_removed(struct ofono_gprs *gprs) +{ + gprs-netreg = NULL; + + gprs-flags = ~(GPRS_FLAG_RECHECK | GPRS_FLAG_ATTACHING); + gprs-status_watch = 0; + gprs-netreg_status = NETWORK_REGISTRATION_STATUS_NOT_REGISTERED; + gprs-driver_attached = FALSE; + + gprs_attached_update(gprs); +} + static void gprs_netreg_update(struct ofono_gprs *gprs) { ofono_bool_t attach; + if (gprs-netreg == NULL) { + gprs_netreg_removed(gprs); + return; + } + attach = gprs-netreg_status == NETWORK_REGISTRATION_STATUS_REGISTERED; attach = attach || (gprs-roaming_allowed @@ -2250,8 +2267,7 @@ static void netreg_watch(struct ofono_atom *atom, struct ofono_gprs *gprs = data; if (cond == OFONO_ATOM_WATCH_CONDITION_UNREGISTERED) { - gprs-status_watch = 0; - gprs-netreg = NULL; + gprs_netreg_removed(gprs); return; } -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[offline-atoms PATCH 2/2] Make sms atom offline-safe
From: Pekka Pessi pekka.pe...@nokia.com Allow use of SMS atom both in online and offline (post_sim) states. SMS atom now watches network registration atom and state. Thmessages are queued but not sent if not registered to a network. Errors occurring when a short message is being sent while transition from online to offline or when network coverage is dropped are now handled gracefully. --- src/sms.c | 97 + 1 files changed, 91 insertions(+), 6 deletions(-) diff --git a/src/sms.c b/src/sms.c index 9bb5c93..4d1a929 100644 --- a/src/sms.c +++ b/src/sms.c @@ -80,6 +80,10 @@ struct ofono_sms { guint tx_source; struct ofono_message_waiting *mw; unsigned int mw_watch; + ofono_bool_t registered; + struct ofono_netreg *netreg; + unsigned int netreg_watch; + unsigned int status_watch; struct ofono_sim *sim; GKeyFile *settings; char *imsi; @@ -747,6 +751,11 @@ static void tx_finished(const struct ofono_error *error, int mr, void *data) DBG(tx_finished); if (ok == FALSE) { + /* Retry again when back in online mode */ + /* Note this does not increment retry count */ + if (sms-registered == FALSE) + return; + if (!(entry-flags OFONO_SMS_SUBMIT_FLAG_RETRY)) goto next_q; @@ -810,6 +819,9 @@ next_q: tx_queue_entry_destroy(entry); + if (sms-registered == FALSE) + return; + if (g_queue_peek_head(sms-txq)) { DBG(Scheduling next); sms-tx_source = g_timeout_add(0, tx_next, sms); @@ -833,6 +845,9 @@ static gboolean tx_next(gpointer user_data) if (entry == NULL) return FALSE; + if (sms-registered == FALSE) + return FALSE; + if (g_queue_get_length(sms-txq) 1 || (entry-num_pdus - entry-cur_pdu) 1) send_mms = 1; @@ -843,6 +858,55 @@ static gboolean tx_next(gpointer user_data) return FALSE; } +static void netreg_status_watch(int status, int lac, int ci, int tech, + const char *mcc, const char *mnc, + void *data) +{ + struct ofono_sms *sms = data; + + switch (status) { + case NETWORK_REGISTRATION_STATUS_REGISTERED: + case NETWORK_REGISTRATION_STATUS_ROAMING: + sms-registered = TRUE; + break; + default: + sms-registered = FALSE; + break; + } + + if (sms-registered == FALSE) + return; + + if (sms-tx_source 0) + return; + + if (g_queue_get_length(sms-txq)) + sms-tx_source = g_timeout_add(0, tx_next, sms); +} + +static void netreg_watch(struct ofono_atom *atom, + enum ofono_atom_watch_condition cond, + void *data) +{ + struct ofono_sms *sms = data; + int status; + + if (cond == OFONO_ATOM_WATCH_CONDITION_UNREGISTERED) { + sms-registered = FALSE; + sms-status_watch = 0; + sms-netreg = NULL; + return; + } + + sms-netreg = __ofono_atom_get_data(atom); + sms-status_watch = __ofono_netreg_add_status_watch(sms-netreg, + netreg_status_watch, sms, NULL); + + status = ofono_netreg_get_status(sms-netreg); + netreg_status_watch(status, 0, 0, 0, NULL, NULL, sms); +} + + /** * Generate a UUID from an SMS PDU List * @@ -1630,6 +1694,19 @@ static void sms_unregister(struct ofono_atom *atom) sms-mw = NULL; } + if (sms-status_watch) { + __ofono_netreg_remove_status_watch(sms-netreg, + sms-status_watch); + sms-status_watch = 0; + } + + if (sms-netreg_watch) { + __ofono_modem_remove_atom_watch(modem, sms-netreg_watch); + sms-netreg_watch = 0; + } + + sms-netreg = NULL; + if (sms-messages) { GHashTableIter iter; struct message *m; @@ -1813,7 +1890,7 @@ void ofono_sms_register(struct ofono_sms *sms) DBusConnection *conn = ofono_dbus_get_connection(); struct ofono_modem *modem = __ofono_atom_get_modem(sms-atom); const char *path = __ofono_atom_get_path(sms-atom); - struct ofono_atom *mw_atom; + struct ofono_atom *atom; struct ofono_atom *sim_atom; if (!g_dbus_register_interface(conn, path, @@ -1832,11 +1909,19 @@ void ofono_sms_register(struct ofono_sms *sms) OFONO_ATOM_TYPE_MESSAGE_WAITING, mw_watch, sms, NULL); - mw_atom =
Re: [RFC PATCH 4/4] Dummy example GPRS context provisioning driver
On Friday 14 January 2011 16:10:27 ext Marcel Holtmann, you wrote: Yes, that is how our previous UIs have done it, and I guess our UX designers like it in the future too. I would advise the UI against using the name from the context information and better using the one from the network registration instead. Well that would make sense... Therefore the operators don't do it ;-) For instance my provider shows as Elisa in the network registration but the access points are expected to be shown as Elisa Internet and Elisa MMS WAP if I recall correctly. It only makes sense to have this data in the provisioning plugin. It would be silly to have to provision just the names in a different component. -- Rémi Denis-Courmont Nokia Devices RD, Maemo Software, Helsinki ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [RFC PATCH 4/4] Dummy example GPRS context provisioning driver
Hi Jukka, On 01/14/2011 12:53 AM, Jukka Saunamaki wrote: Hello Denis, On Thu, 2011-01-13 at 09:57 -0600, Denis Kenzior wrote: Some virtual operators are using the same MCC/MNC as their host, or some operators have several different trade names, and these can have different access settings (at least different UI visible name). SPN in SIM typically tells these cases apart. This is why I included reading SPN to that example provisioning. Do you have specific examples? To my knowledge the MVNOs should be provisioning the SIM with a different MNC from the host but the network used (and thus the network's MCC/MNC) are their host's. I was not sure if all MVNOs have their own MNC, but in any case some operators use different trade names. Off the top of my hat I know our local Finnish operators Elisa and Sonera use trade names like Kolumbus and TeleFinland, and their name shown in UI needs to be correct. Being shown on the UI is a bit different from needing this information to provision. oFono already takes care of reading EFspn in the netreg atom and figuring out the proper display name. If you can rely on just the MCC/MNC of the SIM/IMSI for provisioning information, that would greatly simplify your database and your plugin implementation. So I suggest you double check the need of EFspn first. Regards, -Denis ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH] Clarify voicecall driver hold_all_active() semantics.
From: Pekka Pessi pekka.pe...@nokia.com --- include/voicecall.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/include/voicecall.h b/include/voicecall.h index e37d73b..f3c2bf4 100644 --- a/include/voicecall.h +++ b/include/voicecall.h @@ -76,7 +76,8 @@ struct ofono_voicecall_driver { void (*hangup_all)(struct ofono_voicecall *vc, ofono_voicecall_cb_t cb, void *data); /* -* Holds all active and retrieves held or waiting calls, this usually +* Holds all active calls and answers waiting call. If there is +* no waiting calls, retrieves held call. This usually * corresponds to +CHLD=2 */ void (*hold_all_active)(struct ofono_voicecall *vc, -- 1.7.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH] Clarify voicecall driver hold_all_active() semantics.
Hi Pekka, On 01/14/2011 09:16 AM, pekka.pe...@nokia.com wrote: From: Pekka Pessi pekka.pe...@nokia.com --- include/voicecall.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Patch has been applied, thanks. Regards, -Denis ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: Ofono CF states not always correct
Hi Jarko, On 01/14/2011 07:20 AM, Jarko Poutiainen wrote: Hi Denis, On 01/11/2011 05:16 PM, Denis Kenzior wrote: Hi Jarko, So quickly looking at 22.082, for example 1.6.82.2: If Call forwarding on mobile subscriber busy is active, activation of Call forwarding unconditional will be accepted. Call forwarding on mobile subscriber busy will be quiescent during the active period of Call forwarding unconditional. If Call forwarding unconditional is subsequently deactivated, Call forwarding on mobile subscriber busy becomes operative again (unless the interaction with another supplementary service requests that it remains quiescent). To me it sounds like oFono is doing exactly the right thing. Are you sure your modem is behaving properly? Regards, -Denis It seems that I explained this poorly. So modem is behaving as you quoted but ofono is not. I can for example get ofono in a state where ofono replies that no CF is active even though one of them is. e.g. when I do following: ./list-modems ./test-ussd '**61*+358401234567*11#' ./list-modems ./test-ussd '**21*+358401234567*11#' ./list-modems Now ofono claims that both are active ./test-ussd '*#002#' ./list-modems Now ofono correctly states that only VoiceUnconditional is active Both are active and the modem should be reporting both. At least that is how I understood the specifications. ./test-ussd '##21#' ./list-modems Now ofono claims that no call forwarding is set active when VoiceNoReply in fact is. ./test-ussd '*#002#' ./list-modems Now ofono correctly states that VoiceNoReply is active Does this make this any clearer? A bit, but having the AT command logs would help greatly. Regards, -Denis ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: unsolicited multiline result
Hi Denis, On Fri, 2010-12-31 at 19:07 +0200, Tikander Petteri wrote: However, I'm now starting to question how the spec writers ever intended the implementation of unsolicited +CEN reporting to work on the application side. Not to mention other similar ones like +CPOSR. Thanks. Have you got some explanation from the standard writers, what was the idea for these multiple unsolicited codes to be encoded in the way, TS.27007 says? When the string / update is broken up over multiple unsolicited result codes the application has no idea when the update has finished. That's true. There is no terminator ('OK' etc) in the end of the unsolicited response for insuring that all the data has been received. One solution (nasty one) popped in my mind, if no indication of the last result-code is received: usage of timer. So, after receiving some bytes of the unsolicited message, possible remaining bytes could be monitored by starting some timer for a while. If after timeout I/O-buffer is empty, then hopefully the result is ready. But naturally this makes the result-handling a little bit lazy, because the result is not sent to the upper level immediately... What is particularly challenging in the +CEN case is the fact that it uses two different prefixes for such unsolicited reporting. This makes it impossible to reliably update the emergency call list, obtain CPOSR information, etc. I noticed in the oFono-mailing list some earlier discussion of the plans for taking care of Location service API (as well as TODO-task marked to be done). Is it still a valid case, so is it planned to be implemented? Thanks! Br, Petteri ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH] cdmamodem: fix to follow oFono probe rules
Not allowed to call register directly from probe, use g_idle_add instead for now --- drivers/cdmamodem/voicecall.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/cdmamodem/voicecall.c b/drivers/cdmamodem/voicecall.c index a0fa79f..94ec74b 100644 --- a/drivers/cdmamodem/voicecall.c +++ b/drivers/cdmamodem/voicecall.c @@ -109,6 +109,15 @@ static void cdma_hangup(struct ofono_cdma_voicecall *vc, cdma_template(AT+CHV, vc, cdma_hangup_cb, cb, data); } +static gboolean cdma_voicecall_initialized(gpointer user_data) +{ + struct ofono_cdma_voicecall *vc = user_data; + + ofono_cdma_voicecall_register(vc); + + return FALSE; +} + static int cdma_voicecall_probe(struct ofono_cdma_voicecall *vc, unsigned int vendor, void *data) { @@ -123,8 +132,7 @@ static int cdma_voicecall_probe(struct ofono_cdma_voicecall *vc, vd-vendor = vendor; ofono_cdma_voicecall_set_data(vc, vd); - - ofono_cdma_voicecall_register(vc); + g_idle_add(cdma_voicecall_initialized, vc); return 0; } -- 1.7.0.4 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: unsolicited multiline result
Hi Petteri, On 01/14/2011 12:33 PM, Tikander Petteri wrote: Hi Denis, On Fri, 2010-12-31 at 19:07 +0200, Tikander Petteri wrote: However, I'm now starting to question how the spec writers ever intended the implementation of unsolicited +CEN reporting to work on the application side. Not to mention other similar ones like +CPOSR. Thanks. Have you got some explanation from the standard writers, what was the idea for these multiple unsolicited codes to be encoded in the way, TS.27007 says? Not yet. When the string / update is broken up over multiple unsolicited result codes the application has no idea when the update has finished. That's true. There is no terminator ('OK' etc) in the end of the unsolicited response for insuring that all the data has been received. One solution (nasty one) popped in my mind, if no indication of the last result-code is received: usage of timer. So, after receiving some bytes of the unsolicited message, possible remaining bytes could be monitored by starting some timer for a while. If after timeout I/O-buffer is empty, then hopefully the result is ready. But naturally this makes the result-handling a little bit lazy, because the result is not sent to the upper level immediately... The timer is the only solution I have thought of as well. I do not see any other way. However, this solution is not really guaranteed to always work as expected. e.g. due to OS load conditions, other timing quirks, etc. So I'd rather not use it unless there's absolutely no other alternative. What is particularly challenging in the +CEN case is the fact that it uses two different prefixes for such unsolicited reporting. This makes it impossible to reliably update the emergency call list, obtain CPOSR information, etc. I noticed in the oFono-mailing list some earlier discussion of the plans for taking care of Location service API (as well as TODO-task marked to be done). Is it still a valid case, so is it planned to be implemented? I believe so, perhaps one of the STE guys can comment more. Regards, -Denis ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH] cdmamodem: fix to follow oFono probe rules
Hi Dara, On 01/14/2011 02:25 PM, Dara Spieker-Doyle wrote: Not allowed to call register directly from probe, use g_idle_add instead for now --- drivers/cdmamodem/voicecall.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) Patch has been applied, thanks. Regards, -Denis ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCHv2 0/2] Make message state feature independent of the stack
This set of patches enable the org.ofono.Message interface code to be independent of the protocol stack. This will enable both GSM and CDMA SMS stack to reuse the interface code. The changes have been tested with phonesim using send-sms script. Faiyaz Baxamusa (2): doc: Add messagemanager-api and change message-api sms: Introduce message code independent of protocol stack Makefile.am|6 +- ...message-api.txt = cdma-messagemanager-api.txt} |0 doc/message-api.txt| 89 --- doc/messagemanager-api.txt | 88 +++ src/message.c | 230 ++ src/message.h | 67 ++ src/sms.c | 247 +++- 7 files changed, 416 insertions(+), 311 deletions(-) rename doc/{cdma-message-api.txt = cdma-messagemanager-api.txt} (100%) create mode 100644 doc/messagemanager-api.txt create mode 100644 src/message.c create mode 100644 src/message.h ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCHv2 2/2] sms: Introduce message code independent of protocol stack
--- Makefile.am |2 +- src/message.c | 230 + src/message.h | 67 src/sms.c | 247 +++-- 4 files changed, 326 insertions(+), 220 deletions(-) create mode 100644 src/message.c create mode 100644 src/message.h diff --git a/Makefile.am b/Makefile.am index c2e5706..9fe2d30 100644 --- a/Makefile.am +++ b/Makefile.am @@ -349,7 +349,7 @@ src_ofonod_SOURCES = $(gdbus_sources) $(builtin_sources) src/ofono.ver \ src/nettime.c src/stkagent.c src/stkagent.h \ src/simfs.c src/simfs.h src/audio-settings.c \ src/smsagent.c src/smsagent.h src/ctm.c \ - src/cdma-voicecall.c + src/cdma-voicecall.c src/message.h src/message.c src_ofonod_LDADD = $(builtin_libadd) @GLIB_LIBS@ @DBUS_LIBS@ @CAPNG_LIBS@ \ @BLUEZ_LIBS@ -ldl diff --git a/src/message.c b/src/message.c new file mode 100644 index 000..e39265e --- /dev/null +++ b/src/message.c @@ -0,0 +1,230 @@ +/* + * + * oFono - Open Source Telephony + * + * Copyright (C) 2008-2011 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include config.h +#endif + +#include string.h +#include gdbus.h +#include stdio.h + +#include ofono.h +#include message.h + +struct message { + struct ofono_uuid uuid; + enum message_state state; + struct ofono_atom *atom; + void *data; +}; + +static const char *message_state_to_string(enum message_state s) +{ + switch (s) { + case MESSAGE_STATE_PENDING: + return pending; + case MESSAGE_STATE_SENT: + return sent; + case MESSAGE_STATE_FAILED: + return failed; + } + + return NULL; +} + +static DBusMessage *message_get_properties(DBusConnection *conn, + DBusMessage *msg, void *data) +{ + struct message *m = data; + DBusMessage *reply; + DBusMessageIter iter; + DBusMessageIter dict; + + reply = dbus_message_new_method_return(msg); + if (reply == NULL) + return NULL; + + dbus_message_iter_init_append(reply, iter); + + dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY, + OFONO_PROPERTIES_ARRAY_SIGNATURE, + dict); + message_append_properties(m, dict); + dbus_message_iter_close_container(iter, dict); + + return reply; +} + +static GDBusMethodTable message_methods[] = { + { GetProperties, ,a{sv}, message_get_properties }, + { } +}; + +static GDBusSignalTable message_signals[] = { + { PropertyChanged,sv }, + { } +}; + +struct message *message_create(const struct ofono_uuid *uuid, + struct ofono_atom *atom) +{ + struct message *v; + + v = g_try_new0(struct message, 1); + if (v == NULL) + return NULL; + + memcpy(v-uuid, uuid, sizeof(*uuid)); + + v-atom = atom; + + return v; +} + +static void message_destroy(gpointer userdata) +{ + struct message *m = userdata; + + m-data = NULL; + m-atom = NULL; + g_free(m); +} + +gboolean message_dbus_register(struct message *m) +{ + DBusConnection *conn = ofono_dbus_get_connection(); + const char *path = message_path_from_uuid(m-atom, m-uuid); + + if (!g_dbus_register_interface(conn, path, OFONO_MESSAGE_INTERFACE, + message_methods, message_signals, + NULL, m, message_destroy)) { + ofono_error(Could not register Message %s, path); + message_destroy(m); + + return FALSE; + } + + return TRUE; +} + +void message_dbus_unregister(struct message *m) +{ + DBusConnection *conn = ofono_dbus_get_connection(); + const char *path = message_path_from_uuid(m-atom, m-uuid); + + g_dbus_unregister_interface(conn, path, OFONO_MESSAGE_INTERFACE); + + return; +} + +const struct ofono_uuid *message_get_uuid(const struct message *m) +{ + return
[PATCHv2 1/2] doc: Add messagemanager-api and change message-api
--- Makefile.am|4 +- ...message-api.txt = cdma-messagemanager-api.txt} |0 doc/message-api.txt| 89 doc/messagemanager-api.txt | 88 +++ 4 files changed, 90 insertions(+), 91 deletions(-) rename doc/{cdma-message-api.txt = cdma-messagemanager-api.txt} (100%) create mode 100644 doc/messagemanager-api.txt diff --git a/Makefile.am b/Makefile.am index ce4799e..c2e5706 100644 --- a/Makefile.am +++ b/Makefile.am @@ -388,11 +388,11 @@ doc_files = doc/overview.txt doc/ofono-paper.txt doc/release-faq.txt \ doc/pushnotification-api.txt \ doc/smartmessaging-api.txt \ doc/call-volume-api.txt doc/cell-broadcast-api.txt \ - doc/message-api.txt doc/message-waiting-api.txt \ + doc/messagemanager-api.txt doc/message-waiting-api.txt \ doc/phonebook-api.txt doc/radio-settings-api.txt \ doc/sim-api.txt doc/stk-api.txt \ doc/audio-settings-api.txt doc/text-telephony-api.txt \ - doc/calypso-modem.txt + doc/calypso-modem.txt doc/message-api.txt test_scripts = test/backtrace \ diff --git a/doc/cdma-message-api.txt b/doc/cdma-messagemanager-api.txt similarity index 100% rename from doc/cdma-message-api.txt rename to doc/cdma-messagemanager-api.txt diff --git a/doc/message-api.txt b/doc/message-api.txt index f7ab22a..1c68aee 100644 --- a/doc/message-api.txt +++ b/doc/message-api.txt @@ -1,92 +1,3 @@ -Message Manager hierarchy -=== - -Serviceorg.ofono -Interface org.ofono.MessageManager -Object path[variable prefix]/{modem0,modem1,...} - -Methodsdict GetProperties() - - Returns properties for the manager object. See - the properties section for available properties. - - Possible Errors: [service].Error.InvalidArguments - - array{object,dict} GetMessages() - - Get an array of message object paths and properties - that represents the currently pending messages. - - This method call should only be used once when an - application starts up. Further message additions - and removal shall be monitored via MessageAdded and - MessageRemoved signals. - - void SetProperty(string name, variant value) - - Changes the value of the specified property. Only - properties that are listed as readwrite are - changeable. On success a PropertyChanged signal - will be emitted. - - Possible Errors: [service].Error.InvalidArguments -[service].Error.DoesNotExist - - object SendMessage(string to, string text) - - Send the message in text to the number in to. If the - message could be queued successfully, this method - returns an object path to the created Message object. - -SignalsPropertyChanged(string name, variant value) - - This signal indicates a changed value of the given - property. - - ImmediateMessage(string message, dict info) - - New immediate (class 0) SMS received. Info has Sender, - LocalSentTime, and SentTime information. Sender - address is given in string format. LocalSentTime and - SentTime are given in string form using ISO8601 format. - - IncomingMessage(string message, dict info) - - New incoming text SMS received. Info has Sender, - LocalSentTime, and SentTime information. - - MessageAdded(object path, dict properties) - - This signal is emitted whenever a new Message object - has been created. - - MessageRemoved(object path) - - This signal is emitted whenever a Message object - has been removed, e.g. when it reaches a final state. - -Properties string ServiceCenterAddress - - Contains the number of the SMS service center. - - boolean UseDeliveryReports - - This property controls whether SMS Status Reports, - sometimes better known as Delivery Reports are to be - used. If enabled, all outgoing SMS messages will be - flagged to request a status report from the SMSC. - - string Bearer
Re: [PATCH] gatserver: Add ATS6 command handler#2 - blank line removed, - keep int type because prototyping issue.
Hi Olivier, gatchat/gatserver.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) so I have the problem now that if I just use git am to apply your patch, the commit message seen in git log looks wrong. Check for yourself what happens here. It is the best way to see how git handles these. If you have a second version of the patch modify the Subject line to say [PATCH v2]. Check the M5 coding style rule for commit messages. You need a clear subject and short subject. If you have more details put them into a commit body part. For the change log or notes to the reviewer (which should not be part of the commit message), you need to put them between --- and the diffstat. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [RFC PATCH 4/4] Dummy example GPRS context provisioning driver
Hi Remi, Yes, that is how our previous UIs have done it, and I guess our UX designers like it in the future too. I would advise the UI against using the name from the context information and better using the one from the network registration instead. Well that would make sense... Therefore the operators don't do it ;-) For instance my provider shows as Elisa in the network registration but the access points are expected to be shown as Elisa Internet and Elisa MMS WAP if I recall correctly. It only makes sense to have this data in the provisioning plugin. It would be silly to have to provision just the names in a different component. just to make this clear, oFono takes care of potential operator renames and displays them accordingly, but the provision names would stay the same. So if Elisa renames themselves into Gwendula, the context names would still say Elisa Internet etc. Has anybody thought about this part? Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono