[PATCH] telit: support RS232 modems

Aleksander Morgado aleksander at aleksander.es
Thu Mar 16 21:29:53 UTC 2017


On Sun, Mar 12, 2017 at 8:47 PM, Aleksander Morgado
<aleksander at aleksander.es> 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?
>

Pushed to git master.

> ---
>  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



-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list