[BRLTTY] braille input with retainDots=1 not working

marquats at studi.informatik.uni-stuttgart.de marquats at studi.informatik.uni-stuttgart.de
Mon Oct 18 14:42:54 EDT 2010


> Please always detail precisely *one* example of what you did and
> that didn't work, else it takes us quite some time to find out
> what is not working and you wanted to work.

> Note: if you want to get dot patterns as such, for now you need
> to modify the brltty source: in Programs/brlapi_server.c


It seems I had forgotten to set retainDots = 1, when I compiled with
MinGW. Now I tried to compile with retainDots = 1, but it didn't work, I
got an error message when compiling.

I went back to Cygwin. Here I have set retainDots = 1, but I couldn't
receive all dot patterns, as I have mailed already. Now I run my test
program again, to get a more complete documentation.
All steps (I use Windows XP):

1. installed Cygwin, unpacked brltty-4.2.tar.gz and copied folder
brltty-4.2 to C:\Cygwin\home\Thomas\

2. changed retainDots to 1 in file brlapi.server.c

3. opened the Cygwin shell and run "./configure" and "make install"
without command line options.

4. in C:\Cygwin\etc\brltty.conf I made the following settings:
braille-driver    ht
braille-device    serial:ttyS2
text-table        de
contraction-table de-basis
screen-driver     wn

5. compiled test program (attached file main.cpp) with Visual C++.

6. attached the Handytech braille star 40 to an USB plug and run
brltty -e -l debug > debug.log 2>&1

7. started test program and entered some braille characters


In the file log.txt is what my program has received from the braille
input. I also attached the debug.log written by brltty in the same run.

My program starts a second thread which calls brlapi_readKey (1, &key);
within a loop and writes all result to log.txt, in hexadecimal and binary.
The main thread is to enter and write the dots I want to press. I entered
the dots first, say 134, and "134:" is written into log.txt by the main
thread. Then I pressed the keys 1, 3 and 4 together on the braille
terminal, and the second thread writes the result(s) of brlapi_readKey to
log.txt.

I tried all characters with one dot and some with two or more dots. From
the attached file log.txt one can see that the characters with one dot
seem to be received correctly, but not all of those with two dots, and
none of those with >2 dots I have tried.

Seemingly every press gives a return of brlapi_readKey (1, &key) with key
= 00000000 20000000(hex), and releasing the keys gives one more return
which contains the entered character's dots in the lowest byte (but
somehow encrypted: 1 -> 01  2 -> 1e  3 -> 0b  4 -> 02)

Sometimes the last result telling about the dots is missing and all one
gets is 00000000 20000000.


Greets, Thomas Marquardt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug.log
Type: application/octet-stream
Size: 18299 bytes
Desc: not available
URL: <http://mielke.cc/pipermail/brltty/attachments/20101018/e66d1fd4/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: main.cpp
URL: <http://mielke.cc/pipermail/brltty/attachments/20101018/e66d1fd4/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: log.txt
URL: <http://mielke.cc/pipermail/brltty/attachments/20101018/e66d1fd4/attachment.txt>


More information about the BRLTTY mailing list