[PATCH] gprs: fix allocation of context id
by Martin Hundebøll
After the convertion to l_uintset, the creation of new contexts fails
due to a range error being returned from l_uintset_find_unused().
The error happens because the uinset is created with a min-value of 1,
but the start-value passed to l_uintset_find_unused() is initialized as
0.
Fix this by passing a start-value just past the last allocated context
id.
---
src/gprs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gprs.c b/src/gprs.c
index 7e9e5161..582e3207 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -2329,7 +2329,7 @@ static void provision_context(const struct ofono_gprs_provision_data *ap,
strlen(ap->message_center) > MAX_MESSAGE_CENTER_LENGTH)
return;
- id = l_uintset_find_unused(gprs->used_pids, gprs->last_context_id);
+ id = l_uintset_find_unused(gprs->used_pids, gprs->last_context_id + 1);
if (id > l_uintset_get_max(gprs->used_pids))
return;
--
2.20.1
2 years
Re: Motorola motmdm support
by Pavel Machek
Hi!
> > > But that seems to fix a different issue from what you're seeing.
> >
> > Yes, I can easily work around the problem like this:
> >
> > It needs huge fixme there, but if you could include it... "always
> > ready" is better than "never ready".
>
> OK I'll take a look when I get a chance. I think all we need
> to do there is check that cdata->write_offset < cdata->write_buf_sz.
Makes sense. And you probably need to wake up userspace when buffer
was full and free space appears.
> > Have you figured out how the incoming calls are supposed to work? I'm
> > getting this on incoming call:
...
> > ofonod[2534]: Voice: < ~+CIEV=1,4,0\n\r
> > ignoring line
> > ofonod[2534]: Voice: < ~+CLIP="+420xxxxxxxxx",1,1,"",0,"",0\n\r
> > ignoring line
> > I probably could use +CLIP as "there's incoming call", but I don't see
> > anything useful when I hang up and phone should stop ringing.
>
> Parsing the number(s) from +CIEV should tell that, see what
> I added to motmdm_read_state().
+CIEV is documented as "indicator event". I can make ofono parse that,
but it will be ... slightly hacky.
Is there "RING" or something like that going on any of the interfaces?
BTW does 5.0-rc1 boot for you?
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
2 years
PPP broken by 6fc119d9eaee5f9cc37a5a7198d1c55ef98fd645
by Philippe De Swert
Hi,
Seems commit 6fc119d9eaee5f9cc37a5a7198d1c55ef98fd645 broke PPP for
me in 1.27 (updating from 1.24) After reverting the commit (without
removing the header file include to not break compilation) PPP was
back to working for me.
The comments for a88662d23c45f49d9af5a508d4d0a778950b2420 made me
suspect it is this part of the patch that broke it:
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c
index df9cd0ef..3fe38217 100644
--- a/gatchat/ppp_lcp.c
+++ b/gatchat/ppp_lcp.c
@@ -279,6 +279,9 @@ static enum rcr_result lcp_rcr(struct pppcp_data *pppcp,
*new_len = 4;
return RCR_NAK;
+
+ case G_AT_PPP_AUTH_METHOD_NONE:
+ return RCR_REJECT;
}
break;
}
As I got the following log when it was not working:
ofonod[1069]: Setup: > AT+CGDCONT=1,"IP","internet"\r
ofonod[1069]: Setup: < \r\nO
ofonod[1069]: Setup: < K\r\n
ofonod[1069]: ../ofono-1.27/drivers/atmodem/gprs-context.c:at_cgdcont_cb() ok 1
ofonod[1069]: Setup: > ATD*99***1#\r
ofonod[1069]: Setup: < \r\nC
ofonod[1069]: Setup: < ONNECT 150
ofonod[1069]: Setup: < 000000\r
ofonod[1069]: ../ofono-1.27/drivers/atmodem/gprs-context.c:at_cgdata_cb() ok 1
ofonod[1069]: ../ofono-1.27/drivers/atmodem/gprs-context.c:setup_ppp()
ofonod[1069]: PPP: lcp: pppcp_generate_event: current state 0:INITIAL
ofonod[1069]: PPP: event: 0 (Up), action: 2, new_state: 2 (CLOSED)
ofonod[1069]: PPP: lcp: pppcp_generate_event: current state 2:CLOSED
ofonod[1069]: PPP: event: 2 (Open), action: 1026, new_state: 6 (REQSENT)
ofonod[1069]: PPP: lcp: pppcp_initialize_restart_count: current state 2:CLOSED
ofonod[1069]: PPP: lcp: pppcp_send_configure_request: current state 2:CLOSED
ofonod[1069]: PPP: ../ofono-1.27/gatchat/gatppp.c:ppp_enter_phase() 1
ofonod[1069]: PPP: lcp: pppcp_process_configure_request: current state 6:REQSENT
ofonod[1069]: PPP: lcp: pppcp_generate_event: current state 6:REQSENT
ofonod[1069]: PPP: event: 7 (RCR-), action: 4006, new_state: 6 (REQSENT)
ofonod[1069]: PPP: lcp: pppcp_send_configure_nak: current state 6:REQSENT
ofonod[1069]: PPP: lcp: pppcp_process_configure_ack: current state 6:REQSENT
ofonod[1069]: PPP: lcp: pppcp_generate_event: current state 6:REQSENT
ofonod[1069]: PPP: event: 8 (RCA), action: 27, new_state: 7 (ACKRCVD)
ofonod[1069]: PPP: lcp: pppcp_initialize_restart_count: current state 6:REQSENT
ofonod[1069]: PPP: lcp: pppcp_process_configure_request: current state 7:ACKRCVD
ofonod[1069]: PPP: lcp: pppcp_generate_event: current state 7:ACKRCVD
ofonod[1069]: PPP: event: 7 (RCR-), action: 4007, new_state: 7 (ACKRCVD)
....
And it kept looping with those RCR-...
After reverting:
ofonod[1034]: Setup: > AT+CGDCONT=1,"IP","internet"\r
ofonod[1034]: Setup: < \r\nO
ofonod[1034]: Setup: < K\r\n
ofonod[1034]: ../ofono-1.27/drivers/atmodem/gprs-context.c:at_cgdcont_cb() ok 1
ofonod[1034]: Setup: > ATD*99***1#\r
ofonod[1034]: Setup: < \r\nC
ofonod[1034]: Setup: < ONNECT 15
ofonod[1034]: Setup: < 0000000\r
ofonod[1034]: ../ofono-1.27/drivers/atmodem/gprs-context.c:at_cgdata_cb() ok 1
ofonod[1034]: ../ofono-1.27/drivers/atmodem/gprs-context.c:setup_ppp()
ofonod[1034]: PPP: lcp: pppcp_generate_event: current state 0:INITIAL
ofonod[1034]: PPP: event: 0 (Up), action: 2, new_state: 2 (CLOSED)
ofonod[1034]: PPP: lcp: pppcp_generate_event: current state 2:CLOSED
ofonod[1034]: PPP: event: 2 (Open), action: 1026, new_state: 6 (REQSENT)
ofonod[1034]: PPP: lcp: pppcp_initialize_restart_count: current state 2:CLOSED
ofonod[1034]: PPP: lcp: pppcp_send_configure_request: current state 2:CLOSED
ofonod[1034]: PPP: ../ofono-1.27/gatchat/gatppp.c:ppp_enter_phase() 1
ofonod[1034]: PPP: lcp: pppcp_process_configure_request: current state 6:REQSENT
ofonod[1034]: PPP: lcp: pppcp_generate_event: current state 6:REQSENT
ofonod[1034]: PPP: event: 6 (RCR+), action: 2008, new_state: 8 (ACKSENT)
ofonod[1034]: PPP: lcp: pppcp_send_configure_ack: current state 6:REQSENT
ofonod[1034]: PPP: lcp: pppcp_process_configure_ack: current state 8:ACKSENT
ofonod[1034]: PPP: lcp: pppcp_generate_event: current state 8:ACKSENT
ofonod[1034]: PPP: event: 8 (RCA), action: 129, new_state: 9 (OPENED)
ofonod[1034]: PPP: lcp: pppcp_initialize_restart_count: current state 8:ACKSENT
ofonod[1034]: PPP: ../ofono-1.27/gatchat/gatppp.c:ppp_enter_phase() 2
ofonod[1034]: PPP: ../ofono-1.27/gatchat/gatppp.c:ppp_enter_phase() 3
ofonod[1034]: PPP: ipcp: pppcp_generate_event: current state 0:INITIAL
ofonod[1034]: PPP: event: 2 (Open), action: 401, new_state: 1 (STARTING)
ofonod[1034]: PPP: ipcp: pppcp_generate_event: current state 1:STARTING
ofonod[1034]: PPP: event: 0 (Up), action: 1026, new_state: 6 (REQSENT)
ofonod[1034]: PPP: ipcp: pppcp_initialize_restart_count: current state
1:STARTING
ofonod[1034]: PPP: ipcp: pppcp_send_configure_request: current state 1:STARTING
ofonod[1034]: PPP: ipcp: pppcp_process_configure_request: current
state 6:REQSENT
ofonod[1034]: PPP: ipcp: pppcp_generate_event: current state 6:REQSENT
ofonod[1034]: PPP: event: 6 (RCR+), action: 2008, new_state: 8 (ACKSENT)
ofonod[1034]: PPP: ipcp: pppcp_send_configure_ack: current state 6:REQSENT
ofonod[1034]: PPP: ipcp: pppcp_process_configure_reject: current state 8:ACKSENT
ofonod[1034]: PPP: ipcp: pppcp_generate_event: current state 8:ACKSENT
ofonod[1034]: PPP: event: 9 (RCN), action: 1028, new_state: 8 (ACKSENT)
ofonod[1034]: PPP: ipcp: pppcp_initialize_restart_count: current state 8:ACKSENT
ofonod[1034]: PPP: ipcp: pppcp_send_configure_request: current state 8:ACKSENT
ofonod[1034]: PPP: ipcp: pppcp_process_configure_nak: current state 8:ACKSENT
ofonod[1034]: PPP: ipcp: pppcp_generate_event: current state 8:ACKSENT
ofonod[1034]: PPP: event: 9 (RCN), action: 1028, new_state: 8 (ACKSENT)
ofonod[1034]: PPP: ipcp: pppcp_initialize_restart_count: current state 8:ACKSENT
ofonod[1034]: PPP: ipcp: pppcp_send_configure_request: current state 8:ACKSENT
ofonod[1034]: PPP: ipcp: pppcp_process_configure_ack: current state 8:ACKSENT
ofonod[1034]: PPP: ipcp: pppcp_generate_event: current state 8:ACKSENT
ofonod[1034]: PPP: event: 8 (RCA), action: 129, new_state: 9 (OPENED)
ofonod[1034]: PPP: ipcp: pppcp_initialize_restart_count: current state 8:ACKSENT
ofonod[1034]: PPP: ../ofono-1.27/gatchat/gatppp.c:ppp_enter_phase() 4
ofonod[1034]: ../ofono-1.27/drivers/atmodem/gprs-context.c:ppp_connect()
ofonod[1034]: IP: *.*.*.*
ofonod[1034]: DNS: *.*.*.* *.*.*.*
ofonod[1034]: ../ofono-1.27/src/gprs.c:pri_activate_callback() 0x13fbad0
ofonod[1034]: ../ofono-1.27/plugins/udevng.c:add_serial_device()
Device is missing required OFONO_DRIVER property
ofonod[1034]: ../ofono-1.27/plugins/udevng.c:check_modem_list()
We can see no RCR- coming and it works now. (IP and DNS anonymized)
Hope this is enough info to fix this issue.
Regards,
Philippe
2 years
[PATCHv2] gprs: fix allocation of context id
by Martin Hundebøll
After the convertion to l_uintset, the creation of new contexts fails
due to a range error being returned from l_uintset_find_unused().
The error happens because the uinset is created with a min-value of 1,
but the start-value passed to l_uintset_find_unused() is initialized as
0.
Fix this by using the minimum id when last used id is not yet
initialized.
---
src/gprs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/gprs.c b/src/gprs.c
index 58a998ca..92820e60 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -2334,7 +2334,11 @@ static void provision_context(const struct ofono_gprs_provision_data *ap,
strlen(ap->message_center) > MAX_MESSAGE_CENTER_LENGTH)
return;
- id = l_uintset_find_unused(gprs->used_pids, gprs->last_context_id);
+ if (!gprs->last_context_id)
+ id = l_uintset_get_min(gprs->used_pids);
+ else
+ id = l_uintset_find_unused(gprs->used_pids,
+ gprs->last_context_id);
if (id > l_uintset_get_max(gprs->used_pids))
return;
--
2.20.1
2 years
[PATCH] sim: Sim PIN1 cache upon modem reset/crash
by Nandini Rebello
Adding SIM PIN caching feature to oFono. oFono now caches the SIM PIN1 type
against the ICCID throughout its lifetime in a link list and enters
implicitly upon modem reset/crash.
Violates 3GPP spec 21.111, section 5.3 - User Data stored in ME. Helps
in user experience by not barring out cellular services unless pin is entered
manually.
Handles cases of incorrect pin and sim pin changed externally.
Clears all cached PINs incase modem disabled manually and selectively when
sim is removed.
Adding to all modems by default.
---
src/sim.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 128 insertions(+)
diff --git a/src/sim.c b/src/sim.c
index 886f291..dd28484 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -143,6 +143,11 @@ struct ofono_sim {
bool wait_initialized : 1;
};
+struct cached_pin {
+ char *id;
+ char *pin;
+};
+
struct msisdn_set_request {
struct ofono_sim *sim;
int pending;
@@ -178,6 +183,8 @@ static void sim_own_numbers_update(struct ofono_sim *sim);
static GSList *g_drivers = NULL;
+static GSList *cached_pins = NULL;
+
static const char *sim_passwd_name(enum ofono_sim_password_type type)
{
return passwd_name[type];
@@ -475,6 +482,78 @@ done:
return reply;
}
+static struct cached_pin *pin_cache_lookup(const char *iccid)
+{
+ struct cached_pin *c;
+ GSList *l;
+
+ if (cached_pins == NULL)
+ return NULL;
+
+ for (l = cached_pins; l; l = l->next) {
+ c = l->data;
+
+ if (g_strcmp0(iccid, c->id) == 0)
+ return c;
+ }
+
+ return NULL;
+}
+
+static gboolean pin_cache_update(const char *iccid, const char *pin)
+{
+ struct cached_pin *pin_cached = pin_cache_lookup(iccid);
+ struct cached_pin *cpins;
+
+ if (pin_cached != NULL) {
+ g_free(pin_cached->pin);
+ pin_cached->pin = g_strdup(pin);
+ return TRUE;
+ }
+
+ cpins = g_new0(struct cached_pin, 1);
+
+ if (cpins == NULL)
+ return FALSE;
+
+ cpins->id = g_strdup(iccid);
+ cpins->pin = g_strdup(pin);
+ cached_pins = g_slist_prepend(cached_pins, cpins);
+
+ return TRUE;
+}
+
+static void pin_cache_remove(const char *iccid)
+{
+ struct cached_pin *pin_cached = pin_cache_lookup(iccid);
+
+ if (pin_cached == NULL)
+ return;
+
+ cached_pins = g_slist_remove(cached_pins, pin_cached);
+}
+
+static void pin_cache_enter_cb(const struct ofono_error *error, void *data)
+{
+ struct ofono_sim *sim = data;
+
+ /* If PIN entry fails, then remove cached PIN*/
+ if (sim->initialized || error->type != OFONO_ERROR_TYPE_NO_ERROR) {
+ pin_cache_remove(sim->iccid);
+ goto recheck;
+ }
+
+ if (sim->pin_type == OFONO_SIM_PASSWORD_SIM_PIN ||
+ sim->pin_type == OFONO_SIM_PASSWORD_SIM_PUK) {
+ sim->wait_initialized = true;
+ DBG("Waiting for ofono_sim_initialized_notify");
+ return;
+ }
+
+recheck:
+ __ofono_sim_recheck_pin(sim);
+}
+
static void sim_pin_retries_query_cb(const struct ofono_error *error,
int retries[OFONO_SIM_PASSWORD_INVALID],
void *data)
@@ -683,6 +762,13 @@ static void sim_locked_cb(struct ofono_sim *sim, gboolean locked)
OFONO_SIM_MANAGER_INTERFACE,
"LockedPins", DBUS_TYPE_STRING,
&locked_pins);
+
+ /*Cache pin only for SIM PIN type*/
+ if (g_strcmp0(typestr, "pin") == 0) {
+ if (!pin_cache_update(sim->iccid, pin))
+ ofono_error("Failed to cache PIN.");
+ }
+
g_strfreev(locked_pins);
sim_pin_retries_check(sim);
@@ -778,6 +864,14 @@ static DBusMessage *sim_unlock_pin(DBusConnection *conn, DBusMessage *msg,
static void sim_change_pin_cb(const struct ofono_error *error, void *data)
{
struct ofono_sim *sim = data;
+ const char *typestr;
+ const char *old;
+ const char *new;
+
+ dbus_message_get_args(sim->pending, NULL, DBUS_TYPE_STRING, &typestr,
+ DBUS_TYPE_STRING, &old,
+ DBUS_TYPE_STRING, &new,
+ DBUS_TYPE_INVALID);
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
__ofono_dbus_pending_reply(&sim->pending,
@@ -788,6 +882,12 @@ static void sim_change_pin_cb(const struct ofono_error *error, void *data)
return;
}
+ /*Cache pin only for SIM PIN type*/
+ if (g_strcmp0(typestr, "pin") == 0) {
+ if (!pin_cache_update(sim->iccid, new))
+ ofono_error("Failed to cache PIN.");
+ }
+
__ofono_dbus_pending_reply(&sim->pending,
dbus_message_new_method_return(sim->pending));
@@ -839,8 +939,14 @@ static DBusMessage *sim_change_pin(DBusConnection *conn, DBusMessage *msg,
static void sim_enter_pin_cb(const struct ofono_error *error, void *data)
{
struct ofono_sim *sim = data;
+ const char *typestr;
+ const char *pin;
DBusMessage *reply;
+ dbus_message_get_args(sim->pending, NULL, DBUS_TYPE_STRING, &typestr,
+ DBUS_TYPE_STRING, &pin,
+ DBUS_TYPE_INVALID);
+
if (error->type != OFONO_ERROR_TYPE_NO_ERROR)
reply = __ofono_error_failed(sim->pending);
else
@@ -852,6 +958,12 @@ static void sim_enter_pin_cb(const struct ofono_error *error, void *data)
if (sim->initialized || error->type != OFONO_ERROR_TYPE_NO_ERROR)
goto recheck;
+ /*Cache pin only for SIM PIN type*/
+ if (g_strcmp0(typestr, "pin") == 0) {
+ if (!pin_cache_update(sim->iccid, pin))
+ ofono_error("Failed to cache PIN.");
+ }
+
if (sim->pin_type == OFONO_SIM_PASSWORD_SIM_PIN ||
sim->pin_type == OFONO_SIM_PASSWORD_SIM_PUK) {
sim->wait_initialized = true;
@@ -2751,6 +2863,8 @@ void ofono_sim_inserted_notify(struct ofono_sim *sim, ofono_bool_t inserted)
sim->pin_retries[OFONO_SIM_PASSWORD_SIM_PIN2] = -1;
sim->pin_retries[OFONO_SIM_PASSWORD_SIM_PUK2] = -1;
+ pin_cache_remove(sim->iccid);
+
sim_free_state(sim);
}
}
@@ -3024,6 +3138,7 @@ static void sim_pin_query_cb(const struct ofono_error *error,
struct ofono_sim *sim = data;
DBusConnection *conn = ofono_dbus_get_connection();
const char *path = __ofono_atom_get_path(sim->atom);
+ struct cached_pin *cpins = pin_cache_lookup(sim->iccid);
const char *pin_name;
char **locked_pins;
gboolean lock_changed;
@@ -3068,6 +3183,10 @@ static void sim_pin_query_cb(const struct ofono_error *error,
&pin_name);
}
+ if (g_strcmp0(pin_name, "pin") == 0 && cpins != NULL)
+ sim->driver->send_passwd(sim, cpins->pin,
+ pin_cache_enter_cb, sim);
+
switch (pin_type) {
case OFONO_SIM_PASSWORD_NONE:
case OFONO_SIM_PASSWORD_SIM_PIN2:
@@ -3301,6 +3420,15 @@ void ofono_sim_register(struct ofono_sim *sim)
__ofono_atom_register(sim->atom, sim_unregister);
}
+void ofono_sim_clear_cached_pins(void)
+{
+ if (cached_pins == NULL)
+ return;
+
+ g_slist_free_full(cached_pins, g_free);
+ cached_pins = NULL;
+}
+
void ofono_sim_remove(struct ofono_sim *sim)
{
__ofono_atom_free(sim->atom);
--
2.7.4
2 years
[PATCH] Fix voice call initialization problem
by khaled romdhani
when the voice call driver is probing, I noticed sometimes
a CME Error with the code = 4 (operation not supported)
related to AT commands "AT+CSSN=1,1" and "AT^SLCC=1".
In the current voice call implementation for Gemalto modems
the ofono_voicecall_create() is called on the gemalto_pre_sim().
The sim is not totaly readed by the module, it is not yet
online which is causing a sporadic problem at driver
intialization also when launching some outgoing/incoming calls.
This change moves the ofono_voicecall_create() to the
gemalto_post_online() to be sure that sim is well registred
and online.
---
plugins/gemalto.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/plugins/gemalto.c b/plugins/gemalto.c
index 2f84258..eb782a7 100644
--- a/plugins/gemalto.c
+++ b/plugins/gemalto.c
@@ -573,9 +573,6 @@ static void gemalto_pre_sim(struct ofono_modem *modem)
ofono_devinfo_create(modem, 0, "atmodem", data->app);
ofono_location_reporting_create(modem, 0, "gemaltomodem", data->app);
- ofono_modem_set_integer(modem, "GemaltoVtsQuotes", 1);
- ofono_voicecall_create(modem, 0, "gemaltomodem", data->app);
-
data->sim = ofono_sim_create(modem, OFONO_VENDOR_GEMALTO, "atmodem",
data->app);
@@ -604,11 +601,6 @@ static void gemalto_post_sim(struct ofono_modem *modem)
ofono_ussd_create(modem, 0, "atmodem", data->app);
- ofono_call_forwarding_create(modem, 0, "atmodem", data->app);
- ofono_call_settings_create(modem, 0, "atmodem", data->app);
- ofono_call_meter_create(modem, 0, "atmodem", data->app);
- ofono_call_barring_create(modem, 0, "atmodem", data->app);
-
if (!g_strcmp0(model, GEMALTO_MODEL_ALS3_PLS8x))
ofono_lte_create(modem, OFONO_VENDOR_GEMALTO,
"atmodem", data->app);
@@ -621,6 +613,14 @@ static void gemalto_post_online(struct ofono_modem *modem)
DBG("%p", modem);
ofono_netreg_create(modem, OFONO_VENDOR_GEMALTO, "atmodem", data->app);
+
+ ofono_modem_set_integer(modem, "GemaltoVtsQuotes", 1);
+ ofono_voicecall_create(modem, 0, "gemaltomodem", data->app);
+
+ ofono_call_forwarding_create(modem, 0, "atmodem", data->app);
+ ofono_call_settings_create(modem, 0, "atmodem", data->app);
+ ofono_call_meter_create(modem, 0, "atmodem", data->app);
+ ofono_call_barring_create(modem, 0, "atmodem", data->app);
}
static struct ofono_modem_driver gemalto_driver = {
--
1.9.1
2 years
sd-bus
by Giacinto Cifelli
Dear all,
would it be interesting to port ofono from GDBus, which comes with the
huge GLib dependency, to sd-bus?
It is a lot of work, but the main question is whether we can assume
that systemd is deployed enough to allow the switch.
thank you for your feedback.
Best regards,
Giacinto
2 years
[PATCH] plugins/udevng.c : Add support for cinterion PXS8 ACM mode
by BOUBAKER Bassem
This module can be enumerated in 2 modes. The first is ttyUSB* (currently supported by ofono).
The second mode is that interfaces appears as ttyACM* . This implies enumeration using different pid.
---
plugins/udevng.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/plugins/udevng.c b/plugins/udevng.c
index ff6e1fc..68d1748 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -1685,6 +1685,7 @@ static struct {
{ "gemalto", "option", "1e2d", "0053" },
{ "gemalto", "cdc_wdm", "1e2d", "0053" },
{ "gemalto", "qmi_wwan", "1e2d", "0053" },
+ { "gemalto", "cdc_acm", "1e2d", "0054" },
{ "gemalto", "cdc_acm", "1e2d", "0061" },
{ "gemalto", "cdc_ether", "1e2d", "0061" },
{ "telit", "cdc_ncm", "1bc7", "0036" },
--
2.7.4
2 years
Re: sd-bus
by Marcel Holtmann
Hi Giacinto,
> > would it be interesting to port ofono from GDBus, which comes with the
> > huge GLib dependency, to sd-bus?
> > It is a lot of work, but the main question is whether we can assume
> > that systemd is deployed enough to allow the switch.
>
> actually ELL provides its own D-Bus support. So the switch should towards ELL D-Bus and not sd-bus. oFono already links against ELL and at some point that should be its only dependency. We also want to remove the GLib dependency as well. Newer projects like iwd for example solely use ELL.
>
> thank you for this information. I didn't notice the dbus in ELL, at least not in the part currently in ofono.
> Is this another implementation than glib or a part of it, or is it a wrapper for the libdbus?
it is a from-scratch and clean implementation of the D-Bus protocol. You currently don’t see it since the build magic in oFono only copies ELL pieces that it currently needs. However it is simple change in Makefile.am to also include ELL D-Bus.
Regards
Marcel
2 years
[PATCH] modem: add support to clear cached pins.
by Nandini Rebello
Adding support to clear cached pins when modem is disabled.
---
src/modem.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/modem.c b/src/modem.c
index bc46275..590d85b 100644
--- a/src/modem.c
+++ b/src/modem.c
@@ -1243,6 +1243,8 @@ void ofono_modem_set_powered(struct ofono_modem *modem, ofono_bool_t powered)
set_online(modem, FALSE);
modem_change_state(modem, MODEM_STATE_POWER_OFF);
+
+ ofono_sim_clear_cached_pins();
}
out:
--
2.7.4
2 years