-
Notifications
You must be signed in to change notification settings - Fork 2
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
VIVI-5527 parse service data #1
Conversation
andrewjpritchard
commented
Feb 7, 2021
- Parse service data given from modified version of BLEServer.exe
- The modified version of BLEServer.exe can be found at https://github.com/viviedu/web-bluetooth-polyfill-1
VIVI-5527 - BLEServer is an executable from the `web-bluetooth-polyfill` repository - It has been modified to return the raw AD structures - This patch retrieves the relevant service data from BLEServer, formats it and returns it - Additionally, it falls back to `@abandonware/noble` which is the up-to-date version of `noble`
bindings.js
Outdated
"uuid": this._toHex(adStructure.data[1]) + this._toHex(adStructure.data[0]), | ||
"data": Buffer.from(adStructure.data.slice(2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quotes are redundant here, right?
bindings.js
Outdated
@@ -190,6 +192,17 @@ class WinrtBindings extends events.EventEmitter { | |||
} | |||
} | |||
|
|||
// This will only retrive service data with 16 bit UUIDs. If you need |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
retrive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not sure how you figured this out...