Re: [BRLTTY] Focus Blue 5th gen and multiple bluetooth connections

2023-10-14 Thread Sébastien Hinderer
Many thanks Dave for having taken the time to write such cristal-clear
explanations. I find them really helpful and illuminating.

Seb.
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@brltty.app
For general information, go to: http://brltty.app/mailman/listinfo/brltty


Re: [BRLTTY] Focus Blue 5th gen and multiple bluetooth connections

2023-10-13 Thread Dave Mielke
[quoted lines by Aura Kelloniemi on 2023/10/14 at 00:13 +0300]

>Would you mind explaining what the issue was? As I Said, I'm not very familiar
>with bluetooth, and would like to understand this issue in case I encounter
>something similar in the future.

The layer of Bluetooth that we're using is TCP/IP-like in that it offers a 
number of channels which provide reliable byte streams in both directions. 
There are 31 of these channels which you can think of as port-like. Each of 
these channels, if in use, imllements a profile, which is roughly analogous to 
a service. A profile provides a capability that you'd use a Bluetooth device 
for. For example, there's HSP (headset profile), HFP (handslfree profile), and, 
the one we're talking about, SPP (serial port profile).

In TCP/IP, a given service is provided on a well-known port. In Bluetooth, 
however, a given profile can be provided on any channel. Also, there can be 
several instances (each entirely separate) of the same profile with each being 
provided on its own channel. There's a feature called SDP (service discovery 
protocol) with which you can ask a Bluetooth device for the channel numbers 
that provide a given profile - for example, which channels on this device 
provide the serial port profile.

A lot of older braille devices simply offered the serial profile on channel 1. 
This was the case for Freedom Scientific devices. In those days, therefore, we 
just hard-coded that channel number as it saved significant time on connect. It 
seems that your Focus is using four different channels, one for each serial 
connection, with channel 1 still being used for the first one.

That's why brltty's fs driver, still relying on that hard-coding of channel 1, 
was always trying to connect to the first one. And that, in turn, was why an 
attempt at a second connection would return that the resource was in use. With 
service discovery now having been enbled, the driver first asks the device 
which channel provides the serial port profile. It seems that each of the four 
connections is publishing a different channel number for that. These days, by 
the way, that hard-coded channel number is still used but only if the device 
doesn't implement SDP or if the driver doesn't enable service discovery.

-- 
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke| 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: d...@mielke.cc  | Ottawa, Ontario   | Twitter: @Dave_Mielke
Phone: +1 613 726 0014 | Canada  K2A 1H7   |
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@brltty.app
For general information, go to: http://brltty.app/mailman/listinfo/brltty


Re: [BRLTTY] Focus Blue 5th gen and multiple bluetooth connections

2023-10-13 Thread Aura Kelloniemi
On 2023-10-13 at 16:06 -0400, Dave Mielke  wrote:
 > [quoted lines by Aura Kelloniemi on 2023/10/13 at 21:52 +0300]
 > >This seems to fix the issue. Now I'm able to connect to Focus Blue with two
 > >devices simultaneously. Thank you!

 > Thanks. The change has now been committed and will be in 6.7.

Would you mind explaining what the issue was? As I Said, I'm not very familiar
with bluetooth, and would like to understand this issue in case I encounter
something similar in the future.

-- 
Aura
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@brltty.app
For general information, go to: http://brltty.app/mailman/listinfo/brltty


Re: [BRLTTY] Focus Blue 5th gen and multiple bluetooth connections

2023-10-13 Thread Dave Mielke
[quoted lines by Aura Kelloniemi on 2023/10/13 at 21:52 +0300]

>Oh, that sounds tough. I wish you feel better now.

Yes, but there's a way to go.

>This seems to fix the issue. Now I'm able to connect to Focus Blue with two
>devices simultaneously. Thank you!

Thanks. The change has now been committed and will be in 6.7.

-- 
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke| 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: d...@mielke.cc  | Ottawa, Ontario   | Twitter: @Dave_Mielke
Phone: +1 613 726 0014 | Canada  K2A 1H7   |
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@brltty.app
For general information, go to: http://brltty.app/mailman/listinfo/brltty


Re: [BRLTTY] Focus Blue 5th gen and multiple bluetooth connections

2023-10-13 Thread Aura Kelloniemi
Hi,

 > >Does anybody know about the details of the bluetooth protocol used by Focus 
 > >Blue 5th gen? Dave? Is it possible that different hosts should connect to a 
 > >different bluetooth channel?

 > I'm sorry for answering so late. Been away (in the hospital, actually) for
 > a while.

Oh, that sounds tough. I wish you feel better now.

 > Add this line just under it:
 >descriptor.bluetooth.DdiscoverChannel = 1;
 > Then rebuild and see if the problem goes away.

This seems to fix the issue. Now I'm able to connect to Focus Blue with two
devices simultaneously. Thank you!

-- 
Aura
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@brltty.app
For general information, go to: http://brltty.app/mailman/listinfo/brltty


Re: [BRLTTY] Focus Blue 5th gen and multiple bluetooth connections

2023-10-13 Thread Dave Mielke
[quoted lines by Aura Kelloniemi on 2023/08/18 at 19:22 +0300]

>Does anybody know about the details of the bluetooth protocol used by Focus 
>Blue 5th gen? Dave? Is it possible that different hosts should connect to a 
>different bluetooth channel?

I'm sorry for answering so late. Been away (in the hospital, actually) for a 
while.

I think I know what the problem might be. Are you able to build your own 
brltty? Assuming the answer is yes:

Go to Drivers/Braille/FreedomScientific, edit braille.c, and look for this line:

   688: descriptor.bluetooth.channelNumber = 1;

Add this line just under it:

   descriptor.bluetooth.DdiscoverChannel = 1;

Then rebuild and see if the problem goes away.

-- 
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke| 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: d...@mielke.cc  | Ottawa, Ontario   | Twitter: @Dave_Mielke
Phone: +1 613 726 0014 | Canada  K2A 1H7   |
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@brltty.app
For general information, go to: http://brltty.app/mailman/listinfo/brltty


Re: [BRLTTY] Focus Blue 5th gen and multiple bluetooth connections

2023-08-18 Thread Aura Kelloniemi
On Wed, Aug 16, 2023 at 08:22:40AM +0300, Aura Kelloniemi wrote:
 > Focus Blue 5th generation should support four simultaneous bluetooth 
 > connections, but I have not been able to get that feature to work. I have 
 > only tried with BRLTTY as I don't have any other software that would talk to 
 > my display.
[--]
 > Does anybody have a solution to this problem?

It seems the answer is no. Does anybody know about the details of the bluetooth 
protocol used by Focus Blue 5th gen? Dave? Is it possible that different hosts 
should connect to a different bluetooth channel?

I'm not very familiar with bluetooth/serial programming. Any ideas on what I 
could do to debug the issue?

-- 
Aura
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@brltty.app
For general information, go to: http://brltty.app/mailman/listinfo/brltty