From df8540c0cd1e8cf3fe1a1de8f0594ecca0eac41d Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 2 Jan 2009 23:53:25 +0100 Subject: [PATCH] Add detection support for Nozomi based hardware --- src/connman.rules | 2 ++ src/udev.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/connman.rules b/src/connman.rules index 8a935ce..84b3b4b 100644 --- a/src/connman.rules +++ b/src/connman.rules @@ -1,6 +1,8 @@ SUBSYSTEM=="net", DRIVERS=="hso", ENV{CONNMAN_TYPE}="hso" +SUBSYSTEM=="tty", KERNEL=="noz[0-9]*", ENV{CONNMAN_TYPE}="nozomi" + SUBSYSTEM=="tty", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1003", \ ENV{CONNMAN_TYPE}="huawei" diff --git a/src/udev.c b/src/udev.c index 623962a..95faf60 100644 --- a/src/udev.c +++ b/src/udev.c @@ -100,10 +100,13 @@ static void add_device(struct udev_device *udev_device) if (type == NULL || interface == NULL) return; - if (g_str_equal(interface, "ttyUSB0") == FALSE) + if (g_str_equal(interface, "ttyUSB0") == FALSE && + g_str_equal(interface, "noz0") == FALSE) return; - if (g_str_equal(type, "huawei") == TRUE) + if (g_str_equal(type, "nozomi") == TRUE) + devtype = CONNMAN_DEVICE_TYPE_NOZOMI; + else if (g_str_equal(type, "huawei") == TRUE) devtype = CONNMAN_DEVICE_TYPE_HUAWEI; else if (g_str_equal(type, "novatel") == TRUE) devtype = CONNMAN_DEVICE_TYPE_NOVATEL; -- 1.7.9.5