summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2013-11-11 16:01:51 -0600
committerDenis Kenzior <denkenz@gmail.com>2013-11-25 10:55:59 -0600
commit06598ef47c58408a9c21890f8ff344fede565724 (patch)
tree73d5b1e17fa30a7093d0839b3e7bea8ae9f6cf8a /plugins
parent6e52f03f641af1611c74af7578b7be1c49019faf (diff)
downloadofono-06598ef47c58408a9c21890f8ff344fede565724.tar.bz2
udevng: Add he910 detection logic
Diffstat (limited to 'plugins')
-rw-r--r--plugins/udevng.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/plugins/udevng.c b/plugins/udevng.c
index afb02ca2..d41c6a82 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -634,6 +634,38 @@ static gboolean setup_telit(struct modem_info *modem)
return TRUE;
}
+static gboolean setup_he910(struct modem_info *modem)
+{
+ const char *mdm = NULL, *aux = NULL;
+ GSList *list;
+
+ DBG("%s", modem->syspath);
+
+ for (list = modem->devices; list; list = list->next) {
+ struct device_info *info = list->data;
+
+ DBG("%s %s %s %s", info->devnode, info->interface,
+ info->number, info->label);
+
+ if (g_strcmp0(info->interface, "2/2/1") == 0) {
+ if (g_strcmp0(info->number, "00") == 0)
+ mdm = info->devnode;
+ else if (g_strcmp0(info->number, "06") == 0)
+ aux = info->devnode;
+ }
+ }
+
+ if (aux == NULL || mdm == NULL)
+ return FALSE;
+
+ DBG("modem=%s aux=%s", mdm, aux);
+
+ ofono_modem_set_string(modem->modem, "Modem", mdm);
+ ofono_modem_set_string(modem->modem, "Aux", aux);
+
+ return TRUE;
+}
+
static gboolean setup_simcom(struct modem_info *modem)
{
const char *mdm = NULL, *aux = NULL, *gps = NULL, *diag = NULL;
@@ -778,6 +810,7 @@ static struct {
{ "novatel", setup_novatel },
{ "nokia", setup_nokia },
{ "telit", setup_telit },
+ { "he910", setup_he910 },
{ "simcom", setup_simcom },
{ "zte", setup_zte },
{ "icera", setup_icera },
@@ -988,6 +1021,7 @@ static struct {
{ "simcom", "option", "05c6", "9000" },
{ "telit", "usbserial", "1bc7" },
{ "telit", "option", "1bc7" },
+ { "he910", "cdc_acm", "1bc7", "0021" },
{ "nokia", "option", "0421", "060e" },
{ "nokia", "option", "0421", "0623" },
{ "samsung", "option", "04e8", "6889" },