diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2017-03-07 12:37:42 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-03-16 22:29:05 +0100 |
commit | 8664b2a38ac71428a5bbc3d89fbef3f68aea6430 (patch) | |
tree | 55f211c1a399d2f93a9e126ce63df08dcddc5e09 | |
parent | 60be293fa57a3d3f6db1d1ae064d42af320f84e0 (diff) |
telit: support RS232 modems
Adding the vendor string match allows us to support RS232 devices in
the Telit plugin: the USB vendor id check may now be ignored and
instead we probe for the vendor string via AT commands, which works
even if the device is behind a USB<->RS232 adapter.
https://bugs.freedesktop.org/show_bug.cgi?id=100171
-rw-r--r-- | plugins/telit/mm-plugin-telit.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/telit/mm-plugin-telit.c b/plugins/telit/mm-plugin-telit.c index caf3ef01..ec3c024f 100644 --- a/plugins/telit/mm-plugin-telit.c +++ b/plugins/telit/mm-plugin-telit.c @@ -59,6 +59,7 @@ mm_plugin_create (void) static const gchar *subsystems[] = { "tty", NULL }; /* Vendors: Telit */ static const guint16 vendor_ids[] = { 0x1bc7, 0 }; + static const gchar *vendor_strings[] = { "telit", NULL }; /* Only handle TELIT tagged devices here. */ static const gchar *udev_tags[] = { "ID_MM_TELIT_TAGGED", @@ -72,12 +73,13 @@ mm_plugin_create (void) return MM_PLUGIN ( g_object_new (MM_TYPE_PLUGIN_TELIT, - MM_PLUGIN_NAME, "Telit", - MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems, - MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids, - MM_PLUGIN_ALLOWED_AT, TRUE, - MM_PLUGIN_ALLOWED_UDEV_TAGS, udev_tags, - MM_PLUGIN_CUSTOM_INIT, &custom_init, + MM_PLUGIN_NAME, "Telit", + MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems, + MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids, + MM_PLUGIN_ALLOWED_VENDOR_STRINGS, vendor_strings, + MM_PLUGIN_ALLOWED_AT, TRUE, + MM_PLUGIN_ALLOWED_UDEV_TAGS, udev_tags, + MM_PLUGIN_CUSTOM_INIT, &custom_init, NULL)); } |