[BRLTTY] Connection to b':0' failed. Is BRLTTY really running?

Finn Pedersen finnpedersenfrance at gmail.com
Thu Nov 10 08:50:02 EST 2022


Dear fellow brl friends,

I have written a small game in python on a raspberry pi and it works
just fine with a Focus Blue 40 (4th gen) from Freedom Scientific, but
when I run the same program with these newer braille displays it fails
to connect.

- Brailliant BI 20X and 40X
- BrailleNote Touch
- APH Mantis Q40
- Focus Blue 40 (5th generation)

I connect to the devices with a USB cable.

It is the brlapi.Connection() that fails.

My error handling gives this response on the Raspberry Pi.

Connection failed: Connection to b':0' failed. Is BRLTTY really running?
error: couldn't connect to b':0' with key
b'keyfile:/etc/brlapi.key+polkit': b'connect: Connection refused'
(brlerrno 11, libcerrno 111, gaierrno 0)


Full program (Python)
https://github.com/finnpedersenkazes/braille-python/blob/main/example03a.py


When no device is connected I get this

File Descriptor: 5
Server Host: b':0'
Authorization Schemes: b'none'
Driver Name: b'NoBraille'

When the Focus Blue 40 (4th gen) is connected I get this

File Descriptor: 3
Server Host: b':0'
Authorization Schemes: b'none'
Driver Name: b'FreedomScientific'
Model Identifier: b'focus40'
Display Width: 40
Display Height: 1


On Ubuntu the message is a bit different. I have checked that there is
a brlapi.key file in the etc folder.

Initialization: Before Connection
Connection failed: Connection to b':0' failed. Is BRLTTY really running?
error: couldn't connect to b':0' with key
b'keyfile:/etc/brlapi.key+polkit': connect: No such file or directory
(brlerrno 11, libcerrno 2, gaierrno 0)
Is BRLTTY really running?
error.brlerrno: 11
error.libcerrno: 2


When I Google for 'keyfile:/etc/brlapi.key+polkit', I am pointed in
the direction of the brltty.conf file in the etc folder.
I must admit that I have no idea what polkit is or what to do about
it. I have looked at the brltty.conf file.
I have located this line and I have tried to uncomment it. It does not
solve the problem.

#api-parameters Auth=keyfile:/etc/brlapi.key # Require authentication key

There is a brlapi.key file in the /etc folder.

I doubt it is my program or the devices that is the problem.
I suspect that there is some aspect of the BRLTTY configuration that I
don't understand.
I also suspected the USB cable, but I have tried different cables with
the same result.
I should be running on the latest versions of everything. Ubuntu
22.04. Python 3.10.6

Any advice or help will be appreciated.

Kind regards,
Finn Pedersen


More information about the BRLTTY mailing list