Aleksander Morgado writes ("Re: Bug#877024: modemmanager should ask before 
messing with serial ports"):
> The solution you're suggesting involves changes not only in
> ModemManager, but in the whole stack... I personally don't like that,
> I don't want to ask users "is this a modem" especially when they're
> not plugging in one.

Well, there are two scenarios if a usb tty device appears.

A. It's a modem (or a 3G/4G stick that pretends to be a modem)

  Current behaviour: it gets autoprobed, and hopefully is useable
  right away with modemmanager.

  Possible safe behaviour: message pops up somehow inviting user
  to say whether it is a modem; user has to say "yes it is"
  and then the modem works.

  Raw intended behaviour of my patch, without further improvement:
  user has to explicitly tell modemmanager to probe this port.

B. It's a braille display, milling machine, rpi, gps, telescope,
   hadron collider, ...

  Current behaviour: modemmanager opens it the serial port and
  sends gibberish to the device, causing lossage.

  Possible safe behaviour: message pops up somehow inviting user
  to say whether it is a modem.  User curses "daft desktop stuff"
  and clicks "no".

  Raw intended behaviour of my patch, without further improvement:
  User is not bothered at all.

Even "possible safe behaviour" is IMO clearly an improvement
in case B.  It is much worse to interfere with a device without
asking, than to erroneously pester the user about it.

Obviously ideally the machine would remember the answer so that if the
same user plugs in the same device later, it all Just Works.  So
hopefully the user only has to answer the question once.

> If I had to suggest how to do this, probably removing the
> "ID_MM_CANDIDATE" from "tty" subsystems devices would do it:
> https://cgit.freedesktop.org/ModemManager/ModemManager/tree/src/80-mm-candidate.rules

Thanks very much for the pointer.  I will investigate.

> But not advocating for that option! :)

Understood.  I really appreciate your constructive approach.

Ian.

Reply via email to