<div dir="ltr">If it can be invoked via DBus - what is the harm to only do the scan for the greylisted (in this case webusb) modems when the user actually wants to search for a modem (like a printer) - and leave the poor devices alone otherwise?  In headless systems, it will not be the same problem as they will most probably be custom made anyway.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 11, 2017 at 3:32 PM, Dan Williams <span dir="ltr"><<a href="mailto:dcbw@redhat.com" target="_blank">dcbw@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, <a href="tel:2017-01-11" value="+4520170111">2017-01-11</a> at 14:21 +0100, Christer Weinigel wrote:<br>
> On 2017-01-10 19:55, Lars Knudsen wrote:<br>
> > On Tue, Jan 10, 2017 at 7:08 PM, Dan Williams <<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a><br>
> > <mailto:<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>>> wrote:<br>
> >     And we're quite happy to keep blacklisting specific VID/PID<br>
> > combos we<br>
> >     know are not modems. Another possible solution is to greylist<br>
> > devices<br>
> >     that happen to have webusb descriptors, such that they won't<br>
> > get auto-<br>
> >     probed, but could be probed on-demand via D-Bus.  But I'd<br>
> > rather that<br>
> >     happen via udev rules than MM trying to walk USB device<br>
> > attributes and<br>
> >     parsing webusb descriptors.<br>
> ><br>
> > Actually, that sounds like a very good compromise.  I remember my<br>
> > own<br>
> > struggles 3-4 years ago when I had to get a device working properly<br>
> > on<br>
> > ChromeOS and Ubuntu, where the firmware had to handle that the<br>
> > first ~16<br>
> > seconds it would *sometimes* get sent strange AT commands (the<br>
> > probing)<br>
> > all while the system thought it could already start speaking with<br>
> > the<br>
> > device over e.g. chrome.serial.  Eventually you (modemmanager) were<br>
> > kind<br>
> > enough to get our VID/PID listed and ChromeOS was quick to pick it<br>
> > up<br>
> > (~5-6 months to get in stable) and ubuntu so kind to upgrade to the<br>
> > version of modemmanager including our blacklisting approx 2.5 years<br>
> > later (sigh) ;)<br>
><br>
> Weird question: should modem manager really autoprobe _every_ serial<br>
> device nowdays?  99% of the devices I connect to my laptop are not<br>
> modems.  They are serial ports on development platforms, RS485<br>
> interfaces, Arduinos with a FTDI, CP210x or CH341 USB-UART bridge,<br>
> and<br>
> so on.  Modems with a physical serial port are almost nonexistent<br>
> today.<br>
>  For me it's a pain in the back to have to update the blacklist of<br>
> things modem manger shouldn't touch.<br>
<br>
</div></div>MM does already whitelist platform serial devices (eg, i8250 UART) and<br>
already greylists USB<->serial adapters like FTDI and CP210x.<br>
<br>
Unfortunately, you'd be surprised how many modems actually *do* get<br>
hooked up with USB<->serial converters like FTDI and CP210x.  Modem<br>
manufacturers often build these chips into devices so the modem looks<br>
like USB but uses a generic VID/PID and a generic driver (FTDI).<br>
<br>
If you have updates to the blacklist, we'd happily take them.<br>
<span class=""><br>
> Wouldn't it be better to whitelist known ḿodems and have modem<br>
> manager<br>
> ignore everything else?  Devices which are so new that modem manager<br>
> don't know about them can be configured manually.<br>
<br>
</span>I ran a list of explicit modem VID/PID pairs in kernel drivers (like<br>
option, qmi_wwan, sierra, hso, etc) 2 years ago and there were >1000<br>
known WWAN modems.<br>
<br>
That >1000 does *not* count attribute-matched devices like CDC ACM<br>
devices, CDC WDM/ether, generic serial bridge modems (FTDI/CP210x), or<br>
USB interface class/subclass/protocol matching which many Huawei<br>
devices now use instead.  Whitelisting is simply not really an option,<br>
unfortunately, as too many new modem devices actually do come out every<br>
year.  Thankfully, many these days are MBIM (thanks to Windows 8+) or<br>
QMI, but the embedded world still does a lot of serially-bridged<br>
devices.<br>
<span class="HOEnZb"><font color="#888888"><br>
Dan<br>
</font></span><span class="im HOEnZb"><br>
> At least to me that seems like a much more sane default.<br>
><br>
>   /Christer<br>
</span><div class="HOEnZb"><div class="h5">> ______________________________<wbr>_________________<br>
> ModemManager-devel mailing list<br>
> <a href="mailto:ModemManager-devel@lists.freedesktop.org">ModemManager-devel@lists.<wbr>freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/modemmanager-<wbr>devel</a><br>
</div></div></blockquote></div><br></div>