[BRLTTY] [PATCH] don't steal abused USB ids
Dave Mielke
dave at mielke.cc
Mon May 14 14:07:05 EDT 2018
[quoted lines by Stanislav Brabec on 2018/05/14 at 19:23 +0200]
>> This turns out to be a matter of opinion. The users of braille devices with
>> those identifiers wouldn't like it very much if their devices weren't detected.
>
>I am aware of this problem. But there is also a reverse side of the
>problem: brltty is a part of default installation of many Linux
>distributions (including all SUSE and openSUSE products). These rules
>break many computers equipped with devices like USB-serial converters,
>GPSes, AVR ISP programmers, Arduinos etc.
I understand, and am not trying to ignore it.
>Auto detection should be supported by the manufacturers first in the order.
>Some UART bridge vendors even have a special program to support unique USB id
>for commercial products based on their devices.
I completely agree, but, sadly, there are those, including braille device
manufacturers, who don't.
>But we have to live with such a broken devices.
Yes. It's particularly annoying when it's a braille device as being able to
autodetect it is, in my opinion, critical.
>Can you detect these devices by the serial communication somehow?
In general, yes, but I don't like the idea because that can confuse, if not
entirely brick, a device. And, as you might guess, braille devices are not only
very important but also very expensive.
>If not, we are lost and there is no automatic solution at all.
Maybe not. It's just that we haven't thought of it yet. That's how I face these
issues, anyway. Let's keep discussing it, and, as I always do, encourage anyone
else who has a possible idea to speak up.
>brltty is not only part of the default installation. It is even part of
>the installer.
It took years (and that's an understatement) to get to this point, and it's an
excellent point to have reached so we must find a solution.
>None of typical UART devices has to be supported by the installer.
>
>Installer can relatively safely suppose that any USB UART bridge is a
>Braille device. (With the above mentioned exception.)
Mightn't it be possible, if not fairly probable, that a system with a lot of
those devices already connected to it is being reinstalled? I suppose, though,
that what you mean is that it'd be okay to assume a braille device since those
other devices, even if connected, wouldn't be useful when installing.
>1. Distribute udev rules without generic USB UART ids.
Well, as I think we should start doing, we should include both files and each
distribution can decide which one it'd like to distribute. We could also
include a comment at the top of each that clearly describes why one may or may
not wish to use it.
>2. Installer will suppose Braille device.
I assume you mean that the installer would use the rules that include all of
the devices (not just the non-generic ones).
>3. In the beginning of the installation something like
>brltty-uart-detect will be called. If any UART device is detected as
>Braille device, it will generate e. g. /etc/udev/rules.d/68-brltty.rules
>with proper rules.
Would it be sufficient if the number is high enough to be after the rules for
the other devices? We currently recommend 90. I don't know if distributions are
using it or picking their own number. I also don't know if 90 is high enough.
>If we reach the worst case (no way to detect Braille device at all),
>then brltty-uart-detect has to be interactive: ask user to reply,
>whether it is a Braille device. In case of no response, it will be
>considered as not Braille device.
This would be a problem because a braille user wouldn't be able to read the
prompt until his braille device is working.
>Serial communication with an unknown serial device is a bit unsafe.
>Example: Serial UPS connected to USB UART Bridge. Some old UPS devices
>have a single letter commands, including Power Off. If you send the
>letter, computer will immediately turn off.
Yes. As mentioned above, I don't like serial probing.
>The above mentioned solution will still make impossible to use Arduino,
>some GPS devices and generic USB to serial converters by blind people.
>To solve this problem, it would be needed to limit the driver to a
>particular USB port.
How would a user specify the port, and how would we find out which port the
device is on?
>The (rejected) patch is not sufficient. Kernel still hooks to this
>device. Here is an example of my GPS Qstarz BT-1000P with openSUSE
>Leap 15.0:
So the kernel isn't using enough information for the other devices to be sure
either?
> looking at device '/devices/virtual/input/input10':
> KERNEL=="input10"
> SUBSYSTEM=="input"
> DRIVER==""
> ATTR{name}=="BRLTTY 5.6 Linux Screen Driver Keyboard"
> ATTR{phys}=="pid-11913/brltty/10"
> ATTR{properties}=="0"
> ATTR{uniq}==""
This is a device that brltty creates with uinput. How can we create it
differently so that it won't cause a problem?
--
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke | 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: Dave at Mielke.cc | Ottawa, Ontario | Twitter: @Dave_Mielke
Phone: +1 613 726 0014 | Canada K2A 1H7 |
More information about the BRLTTY
mailing list