[PATCH][RFC][ModemManager] udev rules: port to hwdb where applicable



Udev recently gained a hardware database, which is an efficent replacement for
the kind of rules shipped with modemmanager.

This patch ports all the relevant udev rules to hwdb format, which should
significantly speed up the processing of usb add events.

I also fixed up some bugs in the existing udev rule files found in the process.

Only rudimentary testing done as I don't have the right hardware, so testing and
comments very much appreciated!

The hwdb files were generated from the udev rules using the following search and
replace's in vim:

:%s/ATTRS{idVendor}=="\(\x\{4}\)", ENV{\(\w*\)}="\(\w*\)"/usb:v\U\1\E*\r \2=\3/g
:%s/ATTRS{idVendor}=="\(\x\{4}\)", ATTRS{idProduct}=="\(\x\{4}\)", 
ENV{\(\w*\)}="\(\w*\)"/usb:v\U\1\Ep\U\2\E*\r \3=\4/g
:%s/ATTRS{idVendor}=="\(\x\{4}\)", ATTRS{idProduct}=="\(\x\{4}\)", ENV{.MM_USBIFNUM}=="\(\x\{2}\)", 
ENV{\(\w*\)}="\(\w*\)"/usb:v\U\1\Ep\U\2\Ed*dc*dsc*d
p*ic*isc*ip*in\U\3\E\r \4=\5/g

and for plugins/huawei:

:%s/SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="\(\x\{2}\)", ATTRS{bInterfaceSubClass}=="\(\x\{2}\)", 
ATTRS{bInterfaceProtocol}=="\(\x\{2}\)", ENV{\(\w
*\)}="\(\w*\)"/usb:v12D1p*d*dc\U\1\Edsc\U\2\Edp\U\3\E\r \4=\5

(and some manual editing)
---
 configure.ac                                      |   1 +
 plugins/Makefile.am                               |  39 +++
 plugins/huawei/20-mm-huawei-net-port-types.hwdb   |  21 ++
 plugins/huawei/77-mm-huawei-net-port-types.rules  |   4 +-
 plugins/longcheer/20-mm-longcheer-port-types.hwdb | 350 +++++++++++++++++++++
 plugins/mbm/20-mm-ericsson-mbm.hwdb               | 166 ++++++++++
 plugins/nokia/20-mm-nokia-port-types.hwdb         |  42 +++
 plugins/simtech/20-mm-simtech-port-types.hwdb     |  43 +++
 plugins/telit/20-mm-telit-port-types.hwdb         |  70 +++++
 plugins/x22x/20-mm-x22x-port-types.hwdb           |  87 ++++++
 plugins/zte/20-mm-zte-port-types.hwdb             | 355 ++++++++++++++++++++++
 plugins/zte/77-mm-zte-port-types-2.rules          |   9 +
 plugins/zte/77-mm-zte-port-types.rules            |   3 -
 src/20-mm-usb-device-blacklist.hwdb               | 132 ++++++++
 src/20-mm-usb-serial-adapters-greylist.hwdb       |  40 +++
 src/77-mm-usb-device-blacklist.rules              |   4 +-
 src/Makefile.am                                   |  15 +-
 17 files changed, 1372 insertions(+), 9 deletions(-)
 create mode 100644 plugins/huawei/20-mm-huawei-net-port-types.hwdb
 create mode 100644 plugins/longcheer/20-mm-longcheer-port-types.hwdb
 create mode 100644 plugins/mbm/20-mm-ericsson-mbm.hwdb
 create mode 100644 plugins/nokia/20-mm-nokia-port-types.hwdb
 create mode 100644 plugins/simtech/20-mm-simtech-port-types.hwdb
 create mode 100644 plugins/telit/20-mm-telit-port-types.hwdb
 create mode 100644 plugins/x22x/20-mm-x22x-port-types.hwdb
 create mode 100644 plugins/zte/20-mm-zte-port-types.hwdb
 create mode 100644 plugins/zte/77-mm-zte-port-types-2.rules
 create mode 100644 src/20-mm-usb-device-blacklist.hwdb
 create mode 100644 src/20-mm-usb-serial-adapters-greylist.hwdb

diff --git a/configure.ac b/configure.ac
index 7237c45..a70e31f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -127,6 +127,7 @@ else
     UDEV_BASE_DIR="/lib/udev"
 fi
 AC_SUBST(UDEV_BASE_DIR)
+AM_CONDITIONAL(WITH_HWDB, [$PKG_CONFIG --atleast-version=196 udev])
 
 # systemd system unit directory
 AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [where systemd service 
files are]),
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 83f1fae..96c8af4 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -30,6 +30,8 @@ endif
 # UDev rules
 udevrulesdir = $(UDEV_BASE_DIR)/rules.d
 udevrules_DATA =
+hwdbdir = $(UDEV_BASE_DIR)/hwdb.d
+hwdb_DATA =
 
 # Unit tests
 noinst_PROGRAMS =
@@ -117,7 +119,11 @@ libmm_plugin_huawei_la_SOURCES = \
 libmm_plugin_huawei_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS)
 libmm_plugin_huawei_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
 
+if WITH_HWDB
+hwdb_DATA += huawei/20-mm-huawei-net-port-types.hwdb
+else
 udevrules_DATA += huawei/77-mm-huawei-net-port-types.rules
+endif
 
 noinst_PROGRAMS += test-modem-helpers-huawei
 test_modem_helpers_huawei_SOURCES = \
@@ -142,7 +148,12 @@ libmm_plugin_mbm_la_SOURCES = \
        mbm/mm-sim-mbm.h
 libmm_plugin_mbm_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS)
 libmm_plugin_mbm_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
+
+if WITH_HWDB
+hwdb_DATA += mbm/20-mm-ericsson-mbm.hwdb
+else
 udevrules_DATA += mbm/77-mm-ericsson-mbm.rules
+endif
 
 # Option
 libmm_plugin_option_la_SOURCES = \
@@ -211,7 +222,12 @@ libmm_plugin_nokia_icera_la_SOURCES = \
 libmm_plugin_nokia_icera_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS)
 libmm_plugin_nokia_icera_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
 libmm_plugin_nokia_icera_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS)
+
+if WITH_HWDB
+hwdb_DATA += nokia/20-mm-nokia-port-types.hwdb
+else
 udevrules_DATA += nokia/77-mm-nokia-port-types.rules
+endif
 
 # Zte
 libmm_plugin_zte_la_SOURCES = \
@@ -226,7 +242,13 @@ libmm_plugin_zte_la_SOURCES = \
 libmm_plugin_zte_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(ICERA_COMMON_COMPILER_FLAGS)
 libmm_plugin_zte_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
 libmm_plugin_zte_la_LIBADD = $(ICERA_COMMON_LIBADD_FLAGS)
+udevrules_DATA += zte/77-mm-zte-port-types-2.rules
+
+if WITH_HWDB
+hwdb_DATA += zte/20-mm-zte-port-types.hwdb
+else
 udevrules_DATA += zte/77-mm-zte-port-types.rules
+endif
 
 # Longcheer (and rebranded dongles)
 libmm_plugin_longcheer_la_SOURCES = \
@@ -236,7 +258,12 @@ libmm_plugin_longcheer_la_SOURCES = \
        longcheer/mm-broadband-modem-longcheer.c
 libmm_plugin_longcheer_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS)
 libmm_plugin_longcheer_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
+
+if WITH_HWDB
+hwdb_DATA += longcheer/20-mm-longcheer-port-types.hwdb
+else
 udevrules_DATA += longcheer/77-mm-longcheer-port-types.rules
+endif
 
 # AnyData CDMA
 libmm_plugin_anydata_la_SOURCES = \
@@ -264,7 +291,12 @@ libmm_plugin_simtech_la_SOURCES = \
        simtech/mm-broadband-modem-simtech.c
 libmm_plugin_simtech_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS)
 libmm_plugin_simtech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
+
+if WITH_HWDB
+hwdb_DATA += simtech/20-mm-simtech-port-types.hwdb
+else
 udevrules_DATA += simtech/77-mm-simtech-port-types.rules
+endif
 
 # Alcatel/TCT/JRD x220D and possibly others
 libmm_plugin_x22x_la_SOURCES = \
@@ -274,7 +306,12 @@ libmm_plugin_x22x_la_SOURCES = \
        x22x/mm-broadband-modem-x22x.c
 libmm_plugin_x22x_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS)
 libmm_plugin_x22x_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
+
+if WITH_HWDB
+hwdb_DATA += x22x/20-mm-x22x-port-types.hwdb
+else
 udevrules_DATA += x22x/77-mm-x22x-port-types.rules
+endif
 
 # Pantech
 libmm_plugin_pantech_la_SOURCES = \
@@ -374,6 +411,8 @@ libmm_plugin_telit_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
 # Additional files to include in the distribution
 EXTRA_DIST += \
        $(udevrules_DATA)
+EXTRA_DIST += \
+       $(hwdb_DATA)
 
 # Unit tests
 TEST_PROGS += $(noinst_PROGRAMS)
diff --git a/plugins/huawei/20-mm-huawei-net-port-types.hwdb b/plugins/huawei/20-mm-huawei-net-port-types.hwdb
new file mode 100644
index 0000000..aa31894
--- /dev/null
+++ b/plugins/huawei/20-mm-huawei-net-port-types.hwdb
@@ -0,0 +1,21 @@
+# do not edit this file, it will be overwritten on update
+
+# Mark the modem and at port flags for ModemManager
+usb:v12D1p*d*dcFFdsc01dp01
+ ID_MM_HUAWEI_MODEM_PORT=1
+
+usb:v12D1p*d*dcFFdsc01dp02
+ ID_MM_HUAWEI_AT_PORT=1
+
+usb:v12D1p*d*dcFFdsc02dp01
+ ID_MM_HUAWEI_MODEM_PORT=1
+
+usb:v12D1p*d*dcFFdsc02dp02
+ ID_MM_HUAWEI_AT_PORT=1
+
+# Only the standard ECM or NCM port can support dial-up with AT NDISDUP through AT port
+usb:v12D1p*d*dc02dsc06dp00
+ ID_MM_HUAWEI_NDISDUP_SUPPORTED=1
+
+usb:v12D1p*d*dc02dsc0Ddp00
+ ID_MM_HUAWEI_NDISDUP_SUPPORTED=1
diff --git a/plugins/huawei/77-mm-huawei-net-port-types.rules 
b/plugins/huawei/77-mm-huawei-net-port-types.rules
index db0edce..6ee469e 100644
--- a/plugins/huawei/77-mm-huawei-net-port-types.rules
+++ b/plugins/huawei/77-mm-huawei-net-port-types.rules
@@ -10,7 +10,7 @@ SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="ff", ATTRS{bInterfaceSubClass}=="02"
 SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="ff", ATTRS{bInterfaceSubClass}=="02", 
ATTRS{bInterfaceProtocol}=="02", ENV{ID_MM_HUAWEI_AT_PORT}="1"
 
 # Only the standard ECM or NCM port can support dial-up with AT NDISDUP through AT port
-SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="02", 
ATTRS{bInterfaceSubClass}=="06",ATTRS{bInterfaceProtocol}=="00", ENV{ID_MM_HUAWEI_NDISDUP_SUPPORTED}="1"
-SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="02", 
ATTRS{bInterfaceSubClass}=="0d",ATTRS{bInterfaceProtocol}=="00", ENV{ID_MM_HUAWEI_NDISDUP_SUPPORTED}="1"
+SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="02", ATTRS{bInterfaceSubClass}=="06", 
ATTRS{bInterfaceProtocol}=="00", ENV{ID_MM_HUAWEI_NDISDUP_SUPPORTED}="1"
+SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="02", ATTRS{bInterfaceSubClass}=="0d", 
ATTRS{bInterfaceProtocol}=="00", ENV{ID_MM_HUAWEI_NDISDUP_SUPPORTED}="1"
 
 LABEL="mm_huawei_port_types_end"
diff --git a/plugins/longcheer/20-mm-longcheer-port-types.hwdb 
b/plugins/longcheer/20-mm-longcheer-port-types.hwdb
new file mode 100644
index 0000000..6035fe0
--- /dev/null
+++ b/plugins/longcheer/20-mm-longcheer-port-types.hwdb
@@ -0,0 +1,350 @@
+# do not edit this file, it will be overwritten on update
+
+# Longcheer makes modules that other companies rebrand, like:
+#
+# Alcatel One Touch X020
+# Alcatel One Touch X030
+# MobiData MBD-200HU
+# ST Mobile Connect HSUPA USB Modem
+#
+# Most of these values were scraped from various Longcheer-based Windows
+# driver .inf files.  cmmdm.inf lists the actual data (ie PPP) ports, while
+# cmser.inf lists the aux ports that may be either AT-capable or not but
+# cannot be used for PPP.
+
+usb:v1C9Ep3197d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep3197d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep3197*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep6000d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep6000d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep6000*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep6060d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep6060d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep6060*
+ ID_MM_LONGCHEER_TAGGED=1
+
+# Alcatel One Touch X020
+usb:v1C9Ep6061d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep6061d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep6061*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep7001d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep7001d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep7001d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep7001*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep7002d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep7002d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep7002d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep7002d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep7002*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep7101d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep7101d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep7101d*dc*dsc*dp*ic*isc*ip*in05
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep7101*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep7102d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep7102d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep7102d*dc*dsc*dp*ic*isc*ip*in05
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep7102d*dc*dsc*dp*ic*isc*ip*in06
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep7102*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep8000d*dc*dsc*dp*ic*isc*ip*in05
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep8000d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep8000d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep8000*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep8001d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep8001d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep8001d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep8001*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep8002d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep8002d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep8002d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep8002*
+ ID_MM_LONGCHEER_TAGGED=1
+
+# ChinaBird PL68
+usb:v1C9Ep9000d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9000d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9000*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep9001d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9001d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9001d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9001*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep9002d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9002d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9002d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9002*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep9003d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9003d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9003d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9003d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9003*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep9004d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9004d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9004*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep9005d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9005d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9005*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep9010d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9010d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9010d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9010*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep9012d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9012d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9012d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9012*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep9020d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9020d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9020d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9020*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep9022d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9022d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9022d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9022*
+ ID_MM_LONGCHEER_TAGGED=1
+
+# Zoom products
+usb:v1C9Ep9602d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9602d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9602d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9602*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep9603d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9603d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9603d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9603*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep9604d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9604d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9604d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9604*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep9605d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9605d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9605d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9605d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9605*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep9606d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9606d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9606d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9606d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9606*
+ ID_MM_LONGCHEER_TAGGED=1
+
+usb:v1C9Ep9607d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1C9Ep9607d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9607d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9607d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9607d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1C9Ep9607*
+ ID_MM_LONGCHEER_TAGGED=1
+
+# Alcatel One Touch X060s
+usb:v1BBBp0000d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_LONGCHEER_PORT_TYPE_MODEM=1
+
+usb:v1BBBp0000d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_LONGCHEER_PORT_TYPE_AUX=1
+
+usb:v1BBBp0000*
+ ID_MM_LONGCHEER_TAGGED=1
diff --git a/plugins/mbm/20-mm-ericsson-mbm.hwdb b/plugins/mbm/20-mm-ericsson-mbm.hwdb
new file mode 100644
index 0000000..8d49129
--- /dev/null
+++ b/plugins/mbm/20-mm-ericsson-mbm.hwdb
@@ -0,0 +1,166 @@
+# do not edit this file, it will be overwritten on update
+
+# Ericsson F3507g
+usb:v0BDBp1900*
+ ID_MM_ERICSSON_MBM=1
+
+usb:v0BDBp1902*
+ ID_MM_ERICSSON_MBM=1
+
+# Ericsson F3607gw
+usb:v0BDBp1904*
+ ID_MM_ERICSSON_MBM=1
+
+usb:v0BDBp1905*
+ ID_MM_ERICSSON_MBM=1
+
+usb:v0BDBp1906*
+ ID_MM_ERICSSON_MBM=1
+
+# Ericsson F3307
+usb:v0BDBp190A*
+ ID_MM_ERICSSON_MBM=1
+
+usb:v0BDBp1909*
+ ID_MM_ERICSSON_MBM=1
+
+# Ericsson F3307 R2
+usb:v0BDBp1914*
+ ID_MM_ERICSSON_MBM=1
+
+# Ericsson C3607w
+usb:v0BDBp1049*
+ ID_MM_ERICSSON_MBM=1
+
+# Ericsson C3607w v2
+usb:v0BDBp190B*
+ ID_MM_ERICSSON_MBM=1
+
+# Ericsson F5521gw
+usb:v0BDBp190D*
+ ID_MM_ERICSSON_MBM=1
+
+usb:v0BDBp1911*
+ ID_MM_ERICSSON_MBM=1
+
+# Ericsson H5321gw
+usb:v0BDBp1919*
+ ID_MM_ERICSSON_MBM=1
+
+# Ericsson H5321w
+usb:v0BDBp191D*
+ ID_MM_ERICSSON_MBM=1
+
+# Ericsson F5321gw
+usb:v0BDBp1917*
+ ID_MM_ERICSSON_MBM=1
+
+# Ericsson F5321w
+usb:v0BDBp191B*
+ ID_MM_ERICSSON_MBM=1
+
+# Ericsson C5621gw
+usb:v0BDBp191F*
+ ID_MM_ERICSSON_MBM=1
+
+# Ericsson C5621w
+usb:v0BDBp1921*
+ ID_MM_ERICSSON_MBM=1
+
+# Ericsson H5321gw
+usb:v0BDBp1926*
+ ID_MM_ERICSSON_MBM=1
+
+# Ericsson C3304w
+usb:v0BDBp1928*
+ ID_MM_ERICSSON_MBM=1
+
+# Sony-Ericsson MD300
+usb:v0FCEpD0CF*
+ ID_MM_ERICSSON_MBM=1
+
+# Sony-Ericsson MD400
+usb:v0FCEpD0E1*
+ ID_MM_ERICSSON_MBM=1
+
+# Sony-Ericsson MD400G
+usb:v0FCEpD103*
+ ID_MM_ERICSSON_MBM=1
+
+# Dell 5560
+usb:v413Cp818E*
+ ID_MM_ERICSSON_MBM=1
+
+# Dell 5550
+usb:v413Cp818D*
+ ID_MM_ERICSSON_MBM=1
+
+# Dell 5530 HSDPA
+usb:v413Cp8147*
+ ID_MM_ERICSSON_MBM=1
+
+# Dell F3607gw
+usb:v413Cp8183*
+ ID_MM_ERICSSON_MBM=1
+
+usb:v413Cp8184*
+ ID_MM_ERICSSON_MBM=1
+
+# Dell F3307
+usb:v413Cp818B*
+ ID_MM_ERICSSON_MBM=1
+
+usb:v413Cp818C*
+ ID_MM_ERICSSON_MBM=1
+
+# HP hs2330 Mobile Broadband Module
+usb:v03F0p271D*
+ ID_MM_ERICSSON_MBM=1
+
+# HP hs2320 Mobile Broadband Module
+usb:v03F0p261D*
+ ID_MM_ERICSSON_MBM=1
+
+# HP hs2340 Mobile Broadband Module
+usb:v03F0p3A1D*
+ ID_MM_ERICSSON_MBM=1
+
+# HP hs2350 Mobile Broadband Module
+usb:v03F0p3D1D*
+ ID_MM_ERICSSON_MBM=1
+
+# HP lc2000 Mobile Broadband Module
+usb:v03F0p301D*
+ ID_MM_ERICSSON_MBM=1
+
+# HP lc2010 Mobile Broadband Module
+usb:v03F0p2F1D*
+ ID_MM_ERICSSON_MBM=1
+
+# Toshiba
+usb:v0930p130B*
+ ID_MM_ERICSSON_MBM=1
+
+# Toshiba F3607gw
+usb:v0930p130C*
+ ID_MM_ERICSSON_MBM=1
+
+usb:v0930p1311*
+ ID_MM_ERICSSON_MBM=1
+
+# Toshiba F3307
+usb:v0930p1315*
+ ID_MM_ERICSSON_MBM=1
+
+usb:v0930p1316*
+ ID_MM_ERICSSON_MBM=1
+
+usb:v0930p1317*
+ ID_MM_ERICSSON_MBM=1
+
+# Toshiba F5521gw
+usb:v0930p1313*
+ ID_MM_ERICSSON_MBM=1
+
+usb:v0930p1314*
+ ID_MM_ERICSSON_MBM=1
diff --git a/plugins/nokia/20-mm-nokia-port-types.hwdb b/plugins/nokia/20-mm-nokia-port-types.hwdb
new file mode 100644
index 0000000..e330ba0
--- /dev/null
+++ b/plugins/nokia/20-mm-nokia-port-types.hwdb
@@ -0,0 +1,42 @@
+# do not edit this file, it will be overwritten on update
+
+# For Nokia Internet Sticks (CS-xx) the modem/PPP port appears to always be USB interface 1
+
+usb:v0421p060Dd*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_NOKIA_PORT_TYPE_MODEM=1
+
+usb:v0421p0611d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_NOKIA_PORT_TYPE_MODEM=1
+
+usb:v0421p061Ad*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_NOKIA_PORT_TYPE_MODEM=1
+
+usb:v0421p061Bd*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_NOKIA_PORT_TYPE_MODEM=1
+
+usb:v0421p061Fd*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_NOKIA_PORT_TYPE_MODEM=1
+
+usb:v0421p0619d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_NOKIA_PORT_TYPE_MODEM=1
+
+usb:v0421p0620d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_NOKIA_PORT_TYPE_MODEM=1
+
+usb:v0421p0623d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_NOKIA_PORT_TYPE_MODEM=1
+
+usb:v0421p0624d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_NOKIA_PORT_TYPE_MODEM=1
+
+usb:v0421p0625d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_NOKIA_PORT_TYPE_MODEM=1
+
+usb:v0421p062Ad*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_NOKIA_PORT_TYPE_MODEM=1
+
+usb:v0421p062Ed*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_NOKIA_PORT_TYPE_MODEM=1
+
+usb:v0421p062Fd*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_NOKIA_PORT_TYPE_MODEM=1
diff --git a/plugins/simtech/20-mm-simtech-port-types.hwdb b/plugins/simtech/20-mm-simtech-port-types.hwdb
new file mode 100644
index 0000000..69b1552
--- /dev/null
+++ b/plugins/simtech/20-mm-simtech-port-types.hwdb
@@ -0,0 +1,43 @@
+# do not edit this file, it will be overwritten on update
+
+# Simtech makes modules that other companies rebrand, like:
+#
+# A-LINK 3GU
+# SCT UM300
+#
+# Most of these values were scraped from various SimTech-based Windows
+# driver .inf files.  *mdm.inf lists the main command ports, while
+# *ser.inf lists the aux ports that may be used for PPP.
+
+# A-LINK 3GU
+usb:v1E0EpCEFEd*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_SIMTECH_PORT_TYPE_MODEM=1
+
+usb:v1E0EpCEFEd*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_SIMTECH_PORT_TYPE_AUX=1
+
+usb:v1E0EpCEFEd*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_SIMTECH_PORT_TYPE_AUX=1
+
+usb:v1E0EpCEFE*
+ ID_MM_SIMTECH_TAGGED=1
+
+# Prolink PH-300
+usb:v1E0Ep9100d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_SIMTECH_PORT_TYPE_MODEM=1
+
+usb:v1E0Ep9100d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_SIMTECH_PORT_TYPE_AUX=1
+
+usb:v1E0Ep9100*
+ ID_MM_SIMTECH_TAGGED=1
+
+# SCT UM300
+usb:v1E0Ep9200d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_SIMTECH_PORT_TYPE_MODEM=1
+
+usb:v1E0Ep9200d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_SIMTECH_PORT_TYPE_AUX=1
+
+usb:v1E0Ep9200*
+ ID_MM_SIMTECH_TAGGED=1
diff --git a/plugins/telit/20-mm-telit-port-types.hwdb b/plugins/telit/20-mm-telit-port-types.hwdb
new file mode 100644
index 0000000..a98d5b0
--- /dev/null
+++ b/plugins/telit/20-mm-telit-port-types.hwdb
@@ -0,0 +1,70 @@
+# do not edit this file, it will be overwritten on update
+
+# UC864-E, UC864-E-AUTO, UC864-K, UC864-WD, UC864-WDU
+usb:v1BC7p1003d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_TELIT_PORT_TYPE_MODEM=1
+
+usb:v1BC7p1003d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_TELIT_PORT_TYPE_AUX=1
+
+usb:v1BC7p1003*
+ ID_MM_TELIT_TAGGED=1
+
+# UC864-G
+usb:v1BC7p1004d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_TELIT_PORT_TYPE_MODEM=1
+
+usb:v1BC7p1004d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_TELIT_PORT_TYPE_NMEA=1
+
+usb:v1BC7p1004d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_TELIT_PORT_TYPE_AUX=1
+
+usb:v1BC7p1004*
+ ID_MM_TELIT_TAGGED=1
+
+# CC864-DUAL
+usb:v1BC7p1005d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_TELIT_PORT_TYPE_MODEM=1
+
+usb:v1BC7p1005d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_TELIT_PORT_TYPE_NMEA=1
+
+usb:v1BC7p1005d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_TELIT_PORT_TYPE_AUX=1
+
+usb:v1BC7p1005*
+ ID_MM_TELIT_TAGGED=1
+
+# CC864-SINGLE, CC864-KPS
+usb:v1BC7p1006d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_TELIT_PORT_TYPE_MODEM=1
+
+usb:v1BC7p1006d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_TELIT_PORT_TYPE_AUX=1
+
+usb:v1BC7p1006*
+ ID_MM_TELIT_TAGGED=1
+
+# DE910-DUAL
+usb:v1BC7p1010d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_TELIT_PORT_TYPE_NMEA=1
+
+usb:v1BC7p1010d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_TELIT_PORT_TYPE_AUX=1
+
+usb:v1BC7p1010d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_TELIT_PORT_TYPE_MODEM=1
+
+usb:v1BC7p1010*
+ ID_MM_TELIT_TAGGED=1
+
+# CE910-DUAL
+usb:v1BC7p1011d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_TELIT_PORT_TYPE_MODEM=1
+
+usb:v1BC7p1011*
+ ID_MM_TELIT_TAGGED=1
+
+# NOTE: Qualcomm Gobi-based devices like the LE920 should not be handled
+# by this plugin, but by the Gobi plugin.
diff --git a/plugins/x22x/20-mm-x22x-port-types.hwdb b/plugins/x22x/20-mm-x22x-port-types.hwdb
new file mode 100644
index 0000000..8417505
--- /dev/null
+++ b/plugins/x22x/20-mm-x22x-port-types.hwdb
@@ -0,0 +1,87 @@
+# do not edit this file, it will be overwritten on update
+
+# Alcatel One Touch X220D
+# Alcatel One Touch X200
+#
+# These values were scraped from the X220D's Windows .inf files.  jrdmdm.inf
+# lists the actual command and data (ie PPP) ports, while jrdser.inf lists the
+# aux ports that may be either AT-capable or not but cannot be used for PPP.
+
+# Generic JRD devices ---------------------------
+
+# Alcatel X200
+usb:v1BBBp0000d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_X22X_PORT_TYPE_MODEM=1
+
+usb:v1BBBp0000d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_X22X_PORT_TYPE_AUX=1
+
+usb:v1BBBp0000d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_X22X_PORT_TYPE_AUX=1
+
+usb:v1BBBp0000d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_X22X_PORT_TYPE_AUX=1
+
+usb:v1BBBp0000*
+ ID_MM_X22X_TAGGED=1
+
+usb:v1BBBp0017d*dc*dsc*dp*ic*isc*ip*in05
+ ID_MM_X22X_PORT_TYPE_MODEM=1
+
+usb:v1BBBp0017d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_X22X_PORT_TYPE_AUX=1
+
+usb:v1BBBp0017d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_X22X_PORT_TYPE_AUX=1
+
+usb:v1BBBp0017d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_X22X_PORT_TYPE_AUX=1
+
+usb:v1BBBp0017d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_X22X_PORT_TYPE_AUX=1
+
+usb:v1BBBp0017*
+ ID_MM_X22X_TAGGED=1
+
+# Archos G9
+usb:v1BBBp00B7d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_X22X_PORT_TYPE_MODEM=1
+
+usb:v1BBBp00B7d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_X22X_PORT_TYPE_AUX=1
+
+usb:v1BBBp00B7d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_X22X_PORT_TYPE_NMEA=1
+
+usb:v1BBBp00B7d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_X22X_PORT_TYPE_VOICE=1
+
+usb:v1BBBp00B7d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_X22X_PORT_TYPE_AUX=1
+
+usb:v1BBBp00B7*
+ ID_MM_X22X_TAGGED=1
+
+# Olivetti devices ---------------------------
+
+# Olicard 200
+usb:v0B3CpC005d*dc*dsc*dp*ic*isc*ip*in05
+ ID_MM_X22X_PORT_TYPE_MODEM=1
+
+usb:v0B3CpC005d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_X22X_PORT_TYPE_AUX=1
+
+usb:v0B3CpC005d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_X22X_PORT_TYPE_AUX=1
+
+usb:v0B3CpC005d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_X22X_PORT_TYPE_AUX=1
+
+usb:v0B3CpC005d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_X22X_PORT_TYPE_AUX=1
+
+usb:v0B3CpC005d*dc*dsc*dp*ic*isc*ip*in06
+ ID_MM_X22X_PORT_TYPE_AUX=1
+
+usb:v0B3CpC005*
+ ID_MM_X22X_TAGGED=1
diff --git a/plugins/zte/20-mm-zte-port-types.hwdb b/plugins/zte/20-mm-zte-port-types.hwdb
new file mode 100644
index 0000000..1af16dc
--- /dev/null
+++ b/plugins/zte/20-mm-zte-port-types.hwdb
@@ -0,0 +1,355 @@
+# do not edit this file, it will be overwritten on update
+
+usb:v19D2p0001d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0001d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0002d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0002d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0003d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0003d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0004d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0004d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0005d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0005d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0006d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0006d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0007d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0007d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0008d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0008d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0009d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0009d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p000Ad*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p000Ad*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0012d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0012d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0015d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0015d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0016d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0016d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0017d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0017d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0018d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0018d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0019d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0019d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0021d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0021d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0024d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0024d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0025d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0025d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0030d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0030d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0031d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0031d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0033d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0033d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0037d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0037d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0039d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0039d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0042d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0042d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0043d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0043d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0048d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0048d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0049d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0049d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0052d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0052d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0054d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0054d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0055d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0055d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0057d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0057d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0058d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0058d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0061d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0061d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0063d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0063d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0064d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0064d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0066d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0066d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0078d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0078d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0082d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0082d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0091d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0091d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0104d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0104d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0106d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0106d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0108d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0108d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0113d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0113d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0117d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0117d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0118d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0118d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0121d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0121d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0122d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0122d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0123d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0123d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0124d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0124d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0125d*dc*dsc*dp*ic*isc*ip*in05
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0125d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0126d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0126d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p0128d*dc*dsc*dp*ic*isc*ip*in04
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p0128d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p1007d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p1007d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p1008d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p1008d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p1010d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p1010d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p1515d*dc*dsc*dp*ic*isc*ip*in00
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p1515d*dc*dsc*dp*ic*isc*ip*in02
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p2002d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p2002d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
+
+usb:v19D2p2003d*dc*dsc*dp*ic*isc*ip*in03
+ ID_MM_ZTE_PORT_TYPE_MODEM=1
+
+usb:v19D2p2003d*dc*dsc*dp*ic*isc*ip*in01
+ ID_MM_ZTE_PORT_TYPE_AUX=1
diff --git a/plugins/zte/77-mm-zte-port-types-2.rules b/plugins/zte/77-mm-zte-port-types-2.rules
new file mode 100644
index 0000000..6a2ecc1
--- /dev/null
+++ b/plugins/zte/77-mm-zte-port-types-2.rules
@@ -0,0 +1,9 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION!="add|change", GOTO="mm_zte_port_types_end"
+SUBSYSTEM!="tty", GOTO="mm_zte_port_types_end"
+
+# Icera-based devices that use DHCP, not AT%IPDPADDR
+ATTRS{product}=="K3805-z", ENV{ID_MM_ZTE_ICERA_DHCP}="1"
+
+LABEL="mm_zte_port_types_end"
diff --git a/plugins/zte/77-mm-zte-port-types.rules b/plugins/zte/77-mm-zte-port-types.rules
index 5e2284b..8c65aec 100644
--- a/plugins/zte/77-mm-zte-port-types.rules
+++ b/plugins/zte/77-mm-zte-port-types.rules
@@ -186,7 +186,4 @@ ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="2002", ENV{.MM_USBIFNUM}=="01", ENV{
 ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="2003", ENV{.MM_USBIFNUM}=="03", 
ENV{ID_MM_ZTE_PORT_TYPE_MODEM}="1"
 ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="2003", ENV{.MM_USBIFNUM}=="01", ENV{ID_MM_ZTE_PORT_TYPE_AUX}="1"
 
-# Icera-based devices that use DHCP, not AT%IPDPADDR
-ATTRS{product}=="K3805-z", ENV{ID_MM_ZTE_ICERA_DHCP}="1"
-
 LABEL="mm_zte_port_types_end"
diff --git a/src/20-mm-usb-device-blacklist.hwdb b/src/20-mm-usb-device-blacklist.hwdb
new file mode 100644
index 0000000..8bb79de
--- /dev/null
+++ b/src/20-mm-usb-device-blacklist.hwdb
@@ -0,0 +1,132 @@
+# do not edit this file, it will be overwritten on update
+
+# APC UPS devices
+usb:v051D*
+ ID_MM_DEVICE_IGNORE=1
+
+# Sweex 1000VA
+usb:v0925p1234*
+ ID_MM_DEVICE_IGNORE=1
+
+# Agiler UPS
+usb:v05B8p0000*
+ ID_MM_DEVICE_IGNORE=1
+
+# Krauler UP-M500VA
+usb:v0001p0000*
+ ID_MM_DEVICE_IGNORE=1
+
+# Ablerex 625L USB
+usb:vFFFFp0000*
+ ID_MM_DEVICE_IGNORE=1
+
+# Belkin F6C1200-UNV
+usb:v0665p5161*
+ ID_MM_DEVICE_IGNORE=1
+
+# Various Liebert and Phoenixtec Power devices
+usb:v06DA*
+ ID_MM_DEVICE_IGNORE=1
+
+# Unitek Alpha 1200Sx
+usb:v0F03p0001*
+ ID_MM_DEVICE_IGNORE=1
+
+# Various Tripplite devices
+usb:v09AE*
+ ID_MM_DEVICE_IGNORE=1
+
+# Various MGE Office Protection Systems devices
+usb:v0463p0001*
+ ID_MM_DEVICE_IGNORE=1
+
+usb:v0463pFFFF*
+ ID_MM_DEVICE_IGNORE=1
+
+# CyberPower 900AVR/BC900D
+usb:v0764p0005*
+ ID_MM_DEVICE_IGNORE=1
+
+# CyberPower CP1200AVR/BC1200D
+usb:v0764p0501*
+ ID_MM_DEVICE_IGNORE=1
+
+# Various Belkin devices
+usb:v050Dp0980*
+ ID_MM_DEVICE_IGNORE=1
+
+usb:v050Dp0900*
+ ID_MM_DEVICE_IGNORE=1
+
+usb:v050Dp0910*
+ ID_MM_DEVICE_IGNORE=1
+
+usb:v050Dp0912*
+ ID_MM_DEVICE_IGNORE=1
+
+usb:v050Dp0551*
+ ID_MM_DEVICE_IGNORE=1
+
+usb:v050Dp0751*
+ ID_MM_DEVICE_IGNORE=1
+
+usb:v050Dp0375*
+ ID_MM_DEVICE_IGNORE=1
+
+usb:v050Dp1100*
+ ID_MM_DEVICE_IGNORE=1
+
+# HP R/T 2200 INTL (like SMART2200RMXL2U)
+usb:v03F0p1F0A*
+ ID_MM_DEVICE_IGNORE=1
+
+# Powerware devices
+usb:v0592p0002*
+ ID_MM_DEVICE_IGNORE=1
+
+# Palm Treo 700/900/etc
+# Shouldn't be probed themselves, but you can install programs like
+# "MobileStream USB Modem" which changes the USB PID of the device to something
+# that isn't blacklisted.
+usb:v0830p0061*
+ ID_MM_DEVICE_IGNORE=1
+
+# GlobalScaleTechnologies SheevaPlug
+usb:v9E88p9E8F*
+ ID_MM_DEVICE_IGNORE=1
+
+# Atmel Corp at91sam SAMBA bootloader
+usb:v03EBp6124*
+ ID_MM_DEVICE_IGNORE=1
+
+# Dangerous Prototypes Bus Pirate v4
+usb:v04D8pFB00*
+ ID_MM_DEVICE_IGNORE=1
+
+# All devices from the Swiss Federal Institute of Technology
+usb:v0617*
+ ID_MM_DEVICE_IGNORE=1
+
+# West Mountain Radio devices
+usb:v10C4p814A*
+ ID_MM_DEVICE_IGNORE=1
+
+usb:v10C4p814B*
+ ID_MM_DEVICE_IGNORE=1
+
+usb:v2405p0003*
+ ID_MM_DEVICE_IGNORE=1
+
+# Arduinos
+usb:v2341*
+ ID_MM_DEVICE_IGNORE=1
+
+usb:v1B4Fp9207*
+ ID_MM_DEVICE_IGNORE=1
+
+usb:v1B4Fp9208*
+ ID_MM_DEVICE_IGNORE=1
+
+# Altair U-Boot device
+usb:v0216p0051*
+ ID_MM_DEVICE_IGNORE=1
diff --git a/src/20-mm-usb-serial-adapters-greylist.hwdb b/src/20-mm-usb-serial-adapters-greylist.hwdb
new file mode 100644
index 0000000..9de305a
--- /dev/null
+++ b/src/20-mm-usb-serial-adapters-greylist.hwdb
@@ -0,0 +1,40 @@
+# do not edit this file, it will be overwritten on update
+
+# Belkin F5U183 Serial Adapter
+usb:v050Dp0103*
+ ID_MM_DEVICE_MANUAL_SCAN_ONLY=1
+
+# FTDI-based serial adapters
+#   FTDI does USB to serial converter ICs; and it's very likely that they'll
+#   never do modems themselves, so it should be safe to add a rule only based
+#   on the vendor Id.
+usb:v0403*
+ ID_MM_DEVICE_MANUAL_SCAN_ONLY=1
+
+# ATEN Intl UC-232A (Prolific)
+usb:v0557p2008*
+ ID_MM_DEVICE_MANUAL_SCAN_ONLY=1
+
+# Prolific USB to Serial adapter
+usb:v067Bp2303*
+ ID_MM_DEVICE_MANUAL_SCAN_ONLY=1
+
+# Magic Control Technology Corp adapters
+usb:v0711*
+ ID_MM_DEVICE_MANUAL_SCAN_ONLY=1
+
+# Cygnal Integrated Products, Inc. CP210x
+usb:v10C4pEA60*
+ ID_MM_DEVICE_MANUAL_SCAN_ONLY=1
+
+# QinHeng Electronics HL-340
+usb:v1A86p7523*
+ ID_MM_DEVICE_MANUAL_SCAN_ONLY=1
+
+# Atmel Corp. LUFA USB to Serial Adapter Project (Arduino)
+usb:v03EBp204B*
+ ID_MM_DEVICE_MANUAL_SCAN_ONLY=1
+
+# Netchip Technology, Inc. Linux-USB Serial Gadget (CDC ACM mode)
+usb:v0525pA4A7*
+ ID_MM_DEVICE_MANUAL_SCAN_ONLY=1
diff --git a/src/77-mm-usb-device-blacklist.rules b/src/77-mm-usb-device-blacklist.rules
index 30355b1..783c351 100644
--- a/src/77-mm-usb-device-blacklist.rules
+++ b/src/77-mm-usb-device-blacklist.rules
@@ -69,7 +69,7 @@ ATTRS{idVendor}=="9e88", ATTRS{idProduct}=="9e8f", ENV{ID_MM_DEVICE_IGNORE}="1"
 ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", ENV{ID_MM_DEVICE_IGNORE}="1"
 
 # Dangerous Prototypes Bus Pirate v4
-ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="fb00" ENV{ID_MM_DEVICE_IGNORE}="1"
+ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="fb00", ENV{ID_MM_DEVICE_IGNORE}="1"
 
 # All devices from the Swiss Federal Institute of Technology
 ATTRS{idVendor}=="0617", ENV{ID_MM_DEVICE_IGNORE}="1"
@@ -85,6 +85,6 @@ ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9207", ENV{ID_MM_DEVICE_IGNORE}="1"
 ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9208", ENV{ID_MM_DEVICE_IGNORE}="1"
 
 # Altair U-Boot device
-ATTRS{idVendor}=="0216", ATTRS{idProduct}=="0051" ENV{ID_MM_DEVICE_IGNORE}="1"
+ATTRS{idVendor}=="0216", ATTRS{idProduct}=="0051", ENV{ID_MM_DEVICE_IGNORE}="1"
 
 LABEL="mm_usb_device_blacklist_end"
diff --git a/src/Makefile.am b/src/Makefile.am
index 4531a99..4147593 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,11 +2,21 @@ SUBDIRS=. tests
 
 udevrulesdir = $(UDEV_BASE_DIR)/rules.d
 udevrules_DATA = \
-       77-mm-usb-device-blacklist.rules \
        77-mm-pcmcia-device-blacklist.rules \
        77-mm-platform-serial-whitelist.rules \
-       77-mm-usb-serial-adapters-greylist.rules \
        80-mm-candidate.rules
+hwdbdir = $(UDEV_BASE_DIR)/hwdb.d
+hwdb_DATA =
+
+if WITH_HWDB
+hwdb_DATA += \
+       20-mm-usb-device-blacklist.hwdb \
+       20-mm-usb-serial-adapters-greylist.hwdb
+else
+udevrules_DATA += \
+       77-mm-usb-device-blacklist.rules \
+       77-mm-usb-serial-adapters-greylist.rules
+endif
 
 noinst_LTLIBRARIES = libmodem-helpers.la libserial.la
 
@@ -272,6 +282,7 @@ endif
 
 EXTRA_DIST = \
        $(udevrules_DATA) \
+       $(hwdb_DATA) \
        mm-marshal.list
 
 CLEANFILES = \
-- 
1.8.3.3




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]