If the modem is disabled by default, then it is not set online,
and does not have the connection manager interface. Then we can't
enable it because the device is not created and registered
---
 plugins/ofono.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/plugins/ofono.c b/plugins/ofono.c
index 61d3eff..4ee44a9 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -1952,6 +1952,9 @@ static gboolean modem_changed(DBusConnection *connection, 
DBusMessage *message,
                                sim_get_properties(modem);
                                return TRUE;
                        }
+
+                       if (ready_to_create_device(modem) == TRUE)
+                               create_device(modem);
                }
 
                if (connection_manager_init(modem) == FALSE) {
@@ -1960,7 +1963,8 @@ static gboolean modem_changed(DBusConnection *connection, 
DBusMessage *message,
                                                modem->context->path);
                        }
 
-                       if (modem->device != NULL)
+                       if (!has_interface(modem->interfaces, OFONO_API_SIM)
+                                               && modem->device != NULL)
                                destroy_device(modem);
 
                        return TRUE;
-- 
1.7.2.2

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to