Repository navigation
Connect to any Bluetooth Braille display that uses HID, whatever its name - #180
Merged
Merged
Conversation
On Android 15 and later, a Bluetooth device that offers HID is listed as a possible braille display even when its name isn't one Backtalk knows, and connecting through BrailleDisplayController checks that it is one. Only the services Bluetooth already knows about are checked. The HID braille driver also required braille input and output to be in the same report. It now allows separate input and output reports, as the HID braille standard does; the BT Braille 40, for example, sends its keys in report 1 and takes its cells in report 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Android 15 and later, Backtalk connects to Braille displays that use the HID Braille standard over Bluetooth, through
BrailleDisplayController. Two things kept displays that follow the standard from working, and both are fixed here in a general way, rather than by adding names. This is especially important to support the BTSpeak and BTBraille on Android.Displays whose names Backtalk doesn't know weren't listed
Connectioneeronly listed, and only reconnected to, devices whose names matchSupportedDevicesHelper, so new HID displays and Braille terminal applications never appeared. Now a Bluetooth device that offers HID (0x1124or HID over GATT,0x1812) is listed too, whatever its name, on Android versions where Backtalk connects through HID.BrailleDisplayControllerchecks that the device really is a Braille display, so a keyboard picked by mistake just fails to connect, as any failed connection does.getUuids()) are checked, never a new SDP query per device, and the check needsBLUETOOTH_CONNECT.The HID driver wanted one report for keys and cells
The HID Braille driver (
Drivers/Braille/HID/braille.c) failed with "Found multiple report IDs that include Braille usages" unless the Braille input and output were in the same report. The HID Braille standard allows separate ones, and the BT Braille 40, for example, sends its keys in report 1 and takes its cells in report 2. The driver now keeps the input and output report IDs separately, counts input bits per report ID so that the keys are found at the right bits whatever other reports the descriptor has, and writes cells with the output report ID. Braille input spread over several reports, or output over several, is still refused, as before.Testing
On a Galaxy S26 Ultra (Android 17) with a BT Braille 40, which Backtalk didn't list before: it's listed, connects, shows Braille, and every key works, including Braille keys and space, the routing keys, and the six keys that send the D-pad, panning and rocker usages. It also reconnects on its own once it has connected. Phone and watch builds, unit tests and lint pass.
This also adds a "Braille displays" heading to differences.md, as #179 does, so whichever of the two is merged second needs a small rebase.