[BRLTTY] Contrib: Brltty and usb-serial hotplugging

Rudolf Weeber rudolf at faveve.uni-stuttgart.de
Wed Jul 13 11:05:51 EDT 2005


Hi,
On Wed, Jul 13, 2005 at 09:31:40AM -0400, Dave Mielke wrote:
> [quoted lines by Rudolf Weeber on 2005/07/13 at 11:41 +0200]
> 
> >I figured out, how to set up hotplug to automatically load and kill
> >brltty with a brailledisplay, that is attached via a usb-serial adapter.
> >
[...]
> 
> Thank you. It really looks quite simple.
> 
> Can you check if there's an environment variable available to the script which
> contains the path to the device which has been assigned to the serial adapter? 
> Perhaps it's $DEVICE, which I see used in other scripts. Would you be able to 
> temporarily add the command "env >/tmp/env.log" to your script, run it once, 
> and then send me the result?
The environment is attached; But unfortunately, there is no device
variable. I think, that the device is not assigned by hotplug, but by
the udev daemon. To use this script, you just have to tell brltty to use
/dev/ttyUSB0
This is usually not a problem, because other usb-serial devices are very
rare.

An other thing I tried without success is, to watch the usbserial module
instead of the module for the speciffic adapter. That does not work,
because usbserial is loaded as a depedency for the adapter module. So
hotplug does not look for any scripts there.

A completely different aproach would be to try to hook into udev, and
start brltty when udev creates the device node. But I don't know udev at
all, and have no idea, wether that is possible.

Here is the environment:

SUBSYSTEM=usb
DEVPATH=/devices/pci0000:00/0000:00:02.0/usb1/1-9/1-9:1.0
REMOVER=/var/run/usb/%proc%bus%usb%001%005
PATH=/bin:/sbin:/usr/sbin:/usr/bin
ACTION=add
_=/usr/bin/env
MODALIAS=usb:v067Bp2303d0202dc00dsc00dp00icFFisc00ip00
PWD=/etc/hotplug
UDEV_LOG=1
MANAGED_EVENT=1
UDEVD_EVENT=1
SHLVL=2
HOME=/
DEVICE=/proc/bus/usb/001/005
INTERFACE=255/0/0
PRODUCT=67b/2303/202
TYPE=usb
PHYSDEVBUS=usb
SEQNUM=1096

Greetings, Rudolf


More information about the BRLTTY mailing list