[BRLTTY] Getting my braille driver for the FCHAD working.

timothyhobbs at seznam.cz timothyhobbs at seznam.cz
Thu Oct 11 16:19:57 EDT 2012


Dear Mike,
first off,  I never received your response(It is not in my inbox, nor in any
spam folder).  I started to get suspicious after a few days about whether my
mail had reached the list or not, as Samuel and you have always been very 
quick to respond.  So I looked at some online archives, and found your 
response to my message.

Thank you for responding!  I do appreciate your advice.

Setting the length to 0 is useful because it allows me to be in a state of 
consistency on my side.  I wait for an initialization packet from the device
and before I receive that initialization packet the size of the buffer is 
undefined.  Within my protocol the size of the buffer could theoretically 
change at any time.  Is brltty capable of handling this?  It could be worked
around, but Samuel wanted me to write a protocol which would be universal 
rather than being specific to my device.  I made the protocol as flexible as
possible.  If this is not currently possible, than I will have to put the 
better protocol on hold for about a year, as deadlines on my thesis work 
unfortunately take precedence over actually doing things correctly.

After having read your message, I realized that the reason my messages were 
not being displayed was quite simple.  I must include a \n at the end of the
message for the message to be flushed onto the screen.

I tried changing my printf s to the format:

  logMessage(LOG_INFO,"Line 457\n");




No messages were displayed on my screen. Could you please enlighten me as to
the proper syntax/runtime flags I must use in order to see these log 
messages?




Regardless, now that I have seen the trouble with flushing buffers I will be
able to continue debugging for some time on my own :) .





Regarding the saving of the brl pointer, I have now fixed that, in that I 
reset thisBrl in every function that takes * brl as an argument gets run.  
However keeping that as a global makes the code much easier to read than if 
I were to pass it as an argument all over the place.  I do take your advice 
very seriously and read your messages multiple times.  However, Samuel had 
also responded to my message and told me "It is essentially constant 
throughout the runtime of brltty."  So I worked under the assumption that he
was correct.




Regarding the EOF, thanks for pointing that out!  I have now fixed it.  I 
now return 1 every time.  I'm not sure what brltty supposes to do in the 
case of a failure.





For now that is all,




Timothy





---------- Původní zpráva ----------
Od: timothyhobbs at seznam.cz
Datum: 10. 10. 2012
Předmět: Getting my braille driver for the FCHAD working.
"
Hello all especially Samuel,

I have again been working on my driver.

I have it uploaded here: https://github.com/timthelion/UOBP.git
(https://github.com/timthelion/UOBP.git)

https://github.com/timthelion/UOBP(https://github.com/timthelion/UOBP)

Right now, I have code that builds, but it doesn't run.  In fact it crashes 
before brl_construct gets run with SIGFPE.  Here is the output:

[root at timothy brltty-4.4]# ./run-brltty -b ob -d /dev/ttyUSB0 -n -e
BRLTTY 4.4 rev Unversioned directory [http://mielke.cc/brltty/
(http://mielke.cc/brltty/)]
brltty: AtSpi2 Screen Driver:
brltty: BrlAPI Server: release 0.5.7
brltty: cannot open file: /home/timothy/works/2012/braille/UOBP/brltty-4.4/
Programs/../Tables/brl-ob-all.txt: Adresář nebo soubor neexistuje
brltty: cannot open help file: /home/timothy/works/2012/braille/UOBP/brltty-
4.4/Programs/../Tables/brl-ob-all.txt
brltty: UOBP Braille Driver: version 0.0
brltty: NoSpeech Speech Driver:
Výjimka v pohyblivé řádové čárce (SIGFPE)
[root at timothy brltty-4.4]# 

I think that:

https://github.com/timthelion/UOBP/blob/master/brltty-4.4/Drivers/Braille/
UOBP/uobp_braille.c#L448
(https://github.com/timthelion/UOBP/blob/master/brltty-4.4/Drivers/Braille/UOBP/uobp_braille.c#L448)

Is of interest in this case.  But I cannot figure out why I don't see any 
output along the lines of "Line 451"....

Does anyone(aka Samuel) have any ideas how to debug this?

Thanks a bunch.

Tim

"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mielke.cc/pipermail/brltty/attachments/20121011/7a0c474c/attachment.html>


More information about the BRLTTY mailing list