[PATCH] build: Update glib version in configure.ac
function g_mkstemp_full in src/storage.c requires glib version 2.22 or higher --- configure.ac |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 6aeab7c..c0f4217 100644 --- a/configure.ac +++ b/configure.ac @@ -67,8 +67,8 @@ AC_CHECK_LIB(c, signalfd, dummy=yes, AC_CHECK_LIB(dl, dlopen, dummy=yes, AC_MSG_ERROR(dynamic linking loader is required)) -PKG_CHECK_MODULES(GLIB, glib-2.0 = 2.16, dummy=yes, - AC_MSG_ERROR(GLib = 2.16 is required)) +PKG_CHECK_MODULES(GLIB, glib-2.0 = 2.22, dummy=yes, + AC_MSG_ERROR(GLib = 2.22 is required)) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) -- 1.5.6.5 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH] build: Update glib version in configure.ac
Hi Marcel, you are right. I've just corrected that and resubmitted the patch, please review. Best regards, George --- Ursprungligt brev Ärende: Re: [PATCH] build: Update glib version in configure.ac Från: Marcel Holtmann mar...@holtmann.org Datum: Fr, 2010-11-19, 08:01 am Till: ofono@ofono.org -- Hi George, function g_mkstemp_full in src/storage.c requires glib version 2.22 or higher --- configure.ac |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) patch looks good, but your subject line has a ^I character in it and I prefer not to figure out what git does with it. So please fix this first. Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH] TODO: add owner to Frequency Band Selection task
--- TODO |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/TODO b/TODO index bf2305b..2247e46 100644 --- a/TODO +++ b/TODO @@ -437,6 +437,7 @@ Miscellaneous - Frequency Band Selection. Add frequency band selection capability to the RadioSettings atom. + Owner: Lucas De Marchi lucas.demar...@profusion.mobi This feature is not discussed in 27.007, thus manufacturer specific commands are required. -- 1.7.3.2 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH -v3 1/3] Add ofono_modem_reset()
Some modems can screw up everything and then we will need to do a silent reset of the modem. This patch take the modem back to the OFFLINE state. --- include/modem.h |2 ++ src/modem.c | 44 +++- 2 files changed, 45 insertions(+), 1 deletions(-) diff --git a/include/modem.h b/include/modem.h index 7b13ee0..a92eb88 100644 --- a/include/modem.h +++ b/include/modem.h @@ -46,6 +46,8 @@ int ofono_modem_register(struct ofono_modem *modem); ofono_bool_t ofono_modem_is_registered(struct ofono_modem *modem); void ofono_modem_remove(struct ofono_modem *modem); +void ofono_modem_reset(struct ofono_modem *modem); + void ofono_modem_set_powered(struct ofono_modem *modem, ofono_bool_t powered); ofono_bool_t ofono_modem_get_powered(struct ofono_modem *modem); diff --git a/src/modem.c b/src/modem.c index 6d346c3..e57f8fc 100644 --- a/src/modem.c +++ b/src/modem.c @@ -70,6 +70,7 @@ struct ofono_modem { guint interface_update; ofono_bool_tpowered; ofono_bool_tpowered_pending; + ofono_bool_treset; guint timeout; ofono_bool_tonline; GHashTable *properties; @@ -433,6 +434,8 @@ static void sim_state_watch(enum ofono_sim_state new_state, void *user) if (modem-driver-set_online == NULL) modem_change_state(modem, MODEM_STATE_ONLINE); + modem-reset = FALSE; + break; } } @@ -784,7 +787,8 @@ void ofono_modem_set_powered(struct ofono_modem *modem, ofono_bool_t powered) return; } - ofono_dbus_signal_property_changed(conn, modem-path, + if (!modem-reset) + ofono_dbus_signal_property_changed(conn, modem-path, OFONO_MODEM_INTERFACE, Powered, DBUS_TYPE_BOOLEAN, dbus_powered); @@ -799,6 +803,17 @@ void ofono_modem_set_powered(struct ofono_modem *modem, ofono_bool_t powered) } else modem_change_state(modem, MODEM_STATE_POWER_OFF); + if (modem-reset !powering_down) { + if (!modem-powered) { + int err = set_powered(modem, TRUE); + + if (err == -EINPROGRESS) + return; + + modem_change_state(modem, MODEM_STATE_PRE_SIM); + } + } + out: if (powering_down powered == FALSE) { modems_remaining -= 1; @@ -806,6 +821,7 @@ out: if (modems_remaining == 0) __ofono_exit(); } + } ofono_bool_t ofono_modem_get_powered(struct ofono_modem *modem) @@ -1565,6 +1581,32 @@ void ofono_modem_remove(struct ofono_modem *modem) g_free(modem); } +static gboolean __reset_modem(void *data) +{ + struct ofono_modem *modem = data; + int err; + + modem-reset = TRUE; + + err = set_powered(modem, FALSE); + if (err == -EINPROGRESS) + return FALSE; + + err = set_powered(modem, TRUE); + if (err == -EINPROGRESS) + return FALSE; + + modem_change_state(modem, MODEM_STATE_PRE_SIM); + return FALSE; +} + +void ofono_modem_reset(struct ofono_modem *modem) +{ + DBG(%p, modem); + + g_idle_add(__reset_modem, modem); +} + int ofono_modem_driver_register(const struct ofono_modem_driver *d) { DBG(driver: %p, name: %s, d, d-name); -- 1.7.3.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH -v3 2/3] phonesim: Add modem reset trigger
--- plugins/phonesim.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/plugins/phonesim.c b/plugins/phonesim.c index d2faf42..7426da6 100644 --- a/plugins/phonesim.c +++ b/plugins/phonesim.c @@ -237,6 +237,13 @@ static void cfun_set_on_cb(gboolean ok, GAtResult *result, gpointer user_data) ofono_modem_set_powered(modem, ok); } +static void crst_notify(GAtResult *result, gpointer user_data) +{ + struct ofono_modem *modem = user_data; + + ofono_modem_reset(modem); +} + static void phonesim_disconnected(gpointer user_data) { struct ofono_modem *modem = user_data; @@ -389,6 +396,9 @@ static int phonesim_enable(struct ofono_modem *modem) g_at_chat_send(data-chat, AT+CSCS=\GSM\, none_prefix, NULL, NULL, NULL); + g_at_chat_register(data-chat, +CRST:, + crst_notify, FALSE, modem, NULL); + return 0; } -- 1.7.3.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH -v3 3/3] modem: add support to restore state when resetting the modem
--- src/modem.c | 74 -- 1 files changed, 41 insertions(+), 33 deletions(-) diff --git a/src/modem.c b/src/modem.c index e57f8fc..704de29 100644 --- a/src/modem.c +++ b/src/modem.c @@ -61,6 +61,7 @@ enum modem_state { struct ofono_modem { char*path; enum modem_statemodem_state; + enum modem_stateold_state; GSList *atoms; struct ofono_watchlist *atom_watches; GSList *interface_list; @@ -375,7 +376,7 @@ static void modem_change_state(struct ofono_modem *modem, if (old_state == new_state) return; - if (new_online != modem-online) { + if (new_online != modem-online !modem-reset) { DBusConnection *conn = ofono_dbus_get_connection(); modem-online = new_online; ofono_dbus_signal_property_changed(conn, modem-path, @@ -414,48 +415,26 @@ static void modem_change_state(struct ofono_modem *modem, } } -static void sim_state_watch(enum ofono_sim_state new_state, void *user) -{ - struct ofono_modem *modem = user; - - switch (new_state) { - case OFONO_SIM_STATE_NOT_PRESENT: - modem_change_state(modem, MODEM_STATE_PRE_SIM); - break; - case OFONO_SIM_STATE_INSERTED: - break; - case OFONO_SIM_STATE_READY: - modem_change_state(modem, MODEM_STATE_OFFLINE); - - /* -* If we don't have the set_online method, also proceed -* straight to the online state -*/ - if (modem-driver-set_online == NULL) - modem_change_state(modem, MODEM_STATE_ONLINE); - - modem-reset = FALSE; - - break; - } -} - static void online_cb(const struct ofono_error *error, void *data) { struct ofono_modem *modem = data; DBusMessage *reply; if (error-type == OFONO_ERROR_TYPE_NO_ERROR - modem-modem_state == MODEM_STATE_OFFLINE) + modem-modem_state == MODEM_STATE_OFFLINE) { + modem_change_state(modem, MODEM_STATE_ONLINE); + + if (modem-reset) { + modem-reset = FALSE; + return; + } + reply = dbus_message_new_method_return(modem-pending); - else + } else { reply = __ofono_error_failed(modem-pending); + } __ofono_dbus_pending_reply(modem-pending, reply); - - if (error-type == OFONO_ERROR_TYPE_NO_ERROR - modem-modem_state == MODEM_STATE_OFFLINE) - modem_change_state(modem, MODEM_STATE_ONLINE); } static void offline_cb(const struct ofono_error *error, void *data) @@ -475,6 +454,34 @@ static void offline_cb(const struct ofono_error *error, void *data) modem_change_state(modem, MODEM_STATE_OFFLINE); } +static void sim_state_watch(enum ofono_sim_state new_state, void *user) +{ + struct ofono_modem *modem = user; + + switch (new_state) { + case OFONO_SIM_STATE_NOT_PRESENT: + modem_change_state(modem, MODEM_STATE_PRE_SIM); + break; + case OFONO_SIM_STATE_INSERTED: + break; + case OFONO_SIM_STATE_READY: + modem_change_state(modem, MODEM_STATE_OFFLINE); + + /* +* If we don't have the set_online method, also proceed +* straight to the online state +*/ + if (modem-driver-set_online == NULL) + modem_change_state(modem, MODEM_STATE_ONLINE); + else if (modem-old_state MODEM_STATE_OFFLINE) + modem-driver-set_online(modem, 1, online_cb, modem); + else + modem-reset = FALSE; + + break; + } +} + static DBusMessage *set_property_online(struct ofono_modem *modem, DBusMessage *msg, DBusMessageIter *var) @@ -1586,6 +1593,7 @@ static gboolean __reset_modem(void *data) struct ofono_modem *modem = data; int err; + modem-old_state = modem-modem_state; modem-reset = TRUE; err = set_powered(modem, FALSE); -- 1.7.3.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH 2/3] Add __ofono_error_access_denied()
--- src/dbus.c |6 ++ src/ofono.h |1 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/dbus.c b/src/dbus.c index 8a685aa..d7ad564 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -342,6 +342,12 @@ DBusMessage *__ofono_error_canceled(DBusMessage *msg) Operation has been canceled); } +DBusMessage *__ofono_error_access_denied(DBusMessage *msg) +{ + return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE .AccessDenied, + Operation not permitted); +} + void __ofono_dbus_pending_reply(DBusMessage **msg, DBusMessage *reply) { DBusConnection *conn = ofono_dbus_get_connection(); diff --git a/src/ofono.h b/src/ofono.h index 4d76d20..a24dc34 100644 --- a/src/ofono.h +++ b/src/ofono.h @@ -57,6 +57,7 @@ DBusMessage *__ofono_error_in_use(DBusMessage *msg); DBusMessage *__ofono_error_not_attached(DBusMessage *msg); DBusMessage *__ofono_error_attach_in_progress(DBusMessage *msg); DBusMessage *__ofono_error_canceled(DBusMessage *msg); +DBusMessage *__ofono_error_access_denied(DBusMessage *msg); void __ofono_dbus_pending_reply(DBusMessage **msg, DBusMessage *reply); -- 1.7.3.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH] Add test script for the Lockdown property
--- test/lockdown-modem | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) create mode 100755 test/lockdown-modem diff --git a/test/lockdown-modem b/test/lockdown-modem new file mode 100755 index 000..73f2199 --- /dev/null +++ b/test/lockdown-modem @@ -0,0 +1,25 @@ +#!/usr/bin/python + +import dbus +import sys + +bus = dbus.SystemBus() + +if len(sys.argv) == 2: + path = sys.argv[1] +else: + manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + modems = manager.GetModems() + path = modems[0][0] + +print Locking and disconnecting modem %s... % path +modem = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.Modem') + +modem.SetProperty(Lockdown, dbus.Boolean(1)) + +print press ENTER to power up and unlock the modem %s % path +sys.stdin.readline() + +modem.SetProperty(Lockdown, dbus.Boolean(0)) -- 1.7.3.1 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH 1/3] Add TTY (hearing impaired) support
Hi, Gustavo On Fri, Nov 19, 2010 at 8:18 PM, Gustavo F. Padovan pado...@profusion.mobi wrote: +Properties boolean Powered [readwrite] From what I remember in the discussion in the IRC, this should be Enabled and not Powered. Dennis told me to send the patch with Powered, so we can agree here what is the best name. Seems that Marcel prefers Powered though. Lucas De Marchi ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
RE: [PATCH] doc: Add Location Services API
Conformance testing per 3GPP 34.109s5.4.1.3 requires that RESET UE POSITIONING STORED INFO is handled. Similar for 3GPP RESET MS POSITIONING STORED INFO per 3GPP 44.014s12. As far as I can see there is no provision for that in commands / XML defined by 27.007. Would it make sense to add a ResetStoredInfo signal to the DBUS API for implementation in a modem specific way? Cheers, Waldo -Original Message- From: ofono-boun...@ofono.org [mailto:ofono-boun...@ofono.org] On Behalf Of Sjur Brændeland Sent: Thursday, November 11, 2010 11:45 AM To: simon.lethbri...@stericsson.com; ofono@ofono.org Cc: sjur.brandel...@stericsson.com Subject: [PATCH] doc: Add Location Services API From: Sjur Brændeland sjur.brandel...@stericsson.com As requested, this is our initial proposal for a minimal API in order to support E911, based on the 27.007 defined AT commands. We've discussed internally different names for this API: AGNSSManager or AssistedGlobalNavigationSatelliteSystem, but ended up with the simpler LocationServicesManager. Looking forward to your comments on this API. Regards, Simon Lethbridge and Sjur Brændeland --- doc/location-services-api.txt | 56 + 1 files changed, 56 insertions(+), 0 deletions(-) create mode 100644 doc/location-services-api.txt diff --git a/doc/location-services-api.txt b/doc/location-services-api.txt new file mode 100644 index 000..18ef230 --- /dev/null +++ b/doc/location-services-api.txt @@ -0,0 +1,56 @@ +LocationServicesManager hierarchy += + +Serviceorg.ofono +Interface org.ofono.LocationServicesManager +Object path[variable prefix]/{modem0,modem1,...} + +Methodsdict GetProperties() + + Returns properties for the modem object. See + the properties section for available properties. + + Possible Errors: [service].Error.InvalidArguments + + void SetProperty(string name, variant value) + + Changes the value of the specified property. Only + properties that are listed as read-write are + changeable. On success a PropertyChanged signal + will be emitted. + + Possible Errors: [service].Error.InvalidArguments +[service].Error.DoesNotExist + + void SendPositioningControl(string xml_element) + + Send an XML element conforming to the XML DTD for pos + as defined in 3GPP 27.007 Table 8.55-2. This xml is + used for transferring data associated with positioning + requests received via control plane from the network. + This includes assistance data requests and the results + of positioning procedures. This method maps directly to + the 3GPP 27.007 AT+CPOS command. + + +SignalsPropertyChanged(string name, variant value) + + This signal indicates a changed value of the given + property. + + PositioningRequest(string xml_element) + + Receive an XML element conforming to the XML DTD for + pos in 3GPP 27.007. This xml is used for transferring + data associated with positioning requests received, via + control plane, from the network. This includes + measurement requests and assistance data. This signal + maps directly to the 3GPP defined +CPOSR unsolicited + result code. + +Properties boolean NetworkInitiatedProceduresEnabled [readwrite] + + If NetworkInitiatedProceduresEnabled is False, then + no Position Requests from the network are accepted. + The modem is not enabled for positioning requests + from the networks view point. -- 1.6.3.3 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
RE: [PATCH] doc: Add Location Services API
[Resend without the bottom quote - Damn you Outlook] Conformance testing per 3GPP 34.109s5.4.1.3 requires that RESET UE POSITIONING STORED INFO is handled. Similar for 3GPP RESET MS POSITIONING STORED INFO per 3GPP 44.014s12. As far as I can see there is no provision for that in commands / XML defined by 27.007. Would it make sense to add a ResetStoredInfo signal to the DBUS API for implementation in a modem specific way? Cheers, Waldo ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono