Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth 4.0 compat (command 0x2019) #8

Closed
CharlieJiangXXX opened this issue Dec 15, 2021 · 1 comment
Closed

Bluetooth 4.0 compat (command 0x2019) #8

CharlieJiangXXX opened this issue Dec 15, 2021 · 1 comment
Projects

Comments

@CharlieJiangXXX
Copy link
Member

CharlieJiangXXX commented Dec 15, 2021

Bluetooth compatibility with 4.0 devices (e.g. mouses, keyboards) has been problematic for 3rd party bluetooth devices ever since IntelBluetoothFirmware had been first developed. Now we finally have a breakthrough. Discussing with @zxystd, I was able to locate bugs in the Apple code that are causing this issue - patching a function called FindQueuedRequest could "solve" this issue, but the real issue is that Apple neglected to add certain operations specific to opcode 0x2019 (LE Start Encryption) in SendHCIRequestFormatted, the function that handles HCI requests most of the times as its name clearly shows. Its counterpart that sends raw packets, however, does deal with this special opCode and thus native Broadcom Bluetooth devices don't have this compatibility flaw as they use SendRawHCICommand instead with 0x2019. Therefore, I have attempted to patch SendHCIRequestFormatted to do the same operations as SendRawHCICommand. The validity of this approach is to be verified.

@CharlieJiangXXX CharlieJiangXXX created this issue from a note in v1.0.0 (To Do) Dec 15, 2021
@CharlieJiangXXX
Copy link
Member Author

With the latest commit, we can now connect to Bluetooth 4.0 devices!

@CharlieJiangXXX CharlieJiangXXX moved this from To Do to In Progress in v1.0.0 Dec 22, 2021
@CharlieJiangXXX CharlieJiangXXX moved this from In Progress to Done in v1.0.0 Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant