forked from noble/bleno
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix hci support on linux kernel 6.9+
Prior to this fix, The stateChanged powered_on event will not arrive for bleno with an error called from setFilter (EINVAL, Invalid argument). The buffer for the socket filter was 14 bytes and is a constant value of the same length. However, AF_BLUETOOTH setsockopt kernel handler validates the len of the struct hci_filter and expects it to be bit aligned, zero padding (16 bytes), see abandonware/node-bluetooth-hci-socket#60 (comment) for more detail Additionally, change hardcoded literal '2902' in gatt peripheral initialisation for notify to use a constant string rather than string literal.
- Loading branch information
1 parent
4d93683
commit 4d72805
Showing
2 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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