[PATCH] telit: support RS232 modems
Dan Williams
dcbw at redhat.com
Mon Mar 13 16:33:33 UTC 2017
On Sun, 2017-03-12 at 20:47 +0100, Aleksander Morgado wrote:
> 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
> ---
>
> Hey hey,
>
> This patch enables support for RS232 modems in the Telit plugin; this
> is, modems that are connected to a system via a RS232 port, or via a
> USB<->RS232 adapter.
>
> Comments?
Should this be paired with a patch adding Gobi capability to the telit
driver, so that we don't capture Gobi-type devices as AT-only? Or is
that not a problem?
(eg, per our discussion about just using vendor ID instead of udev
tags; this is the same result just different approach, no?)
Dan
> ---
> plugins/telit/mm-plugin-telit.c | 14 ++++++++------
> 1 file 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));
> }
>
> --
> 2.12.0
> _______________________________________________
> ModemManager-devel mailing list
> ModemManager-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
More information about the ModemManager-devel
mailing list