Hi,

using enterTtyModeWithPath instead actually fixed the issue and I thank you very much for your good intuition.
It now works mostly as expected in any case on the raspberry pi.
I do get one InterruptedIOException on waitForPacket immediately thrown once on the first call of readKeyWithTimeOut. Although this does not actually affect the program and reading keys is not an issue regardless,
this did not happen with just using enterTtyMode.

To not leave the initial problem unclear, I'll detail it out further.
I run my program on the pi after startup, so brltty is already ready.
I expected the program to take control of an attached display, enter tty-mode and write something on it. Connecting and entering tty-mode returned me the correct results. No error values and the display was correctly identified by model, etc. Calling Connection.Write or .ReadKey did not return any errors either. The real display was completely unaffected though and either displayed "Screen not in text mode" or the console (tty0) login screen if the braille display was attached before the pi was started up. I could use the display to navigate a tty, while it was supposed to be seized by brlapi.

The one case where it worked correctly for me was when I used the graphical user interface of the pi, so a proper desktop environment with an attached desktop, to log into the system, open a pseudo terminal,
and run the program like that.
Finally I should mention that I always entered ttymode on tty0, since using default (-1) did not work out for me.

I suppose I haven't properly understood yet how the real display is addressed
through the tty it is attached to by brltty.

Again I thank you for the fast replies. I am certainly no longer stuck on this main problem now.
Best, Julian

Am 27.03.2025 um 09:41 schrieb Sébastien Hinderer:
Hello,

My intuition is that libbrlapi is unable to figure out on which tty it is
running I would suggest to enter in tth mode with enterTtyModeWithPath,
likely with an empty path to make sure the displayed content will be
passed to the device in any case.

Please let us know whether this is able to unblock you or not.
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://brltty.app/mailman/listinfo/brltty
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://brltty.app/mailman/listinfo/brltty

Reply via email to