Closed evhan55 closed 5 years ago
Some services returned seem to be in this list: https://www.bluetooth.com/specifications/gatt/services
and some services returned are custom to the hardware.
I have tested this with the microbit on both Mac and Windows:
Mac returns this array of services:
[
"180A",
"F005"
]
Windows returns this array of services:
[
"00001800-0000-1000-8000-00805f9b34fb",
"00001801-0000-1000-8000-00805f9b34fb",
"0000180a-0000-1000-8000-00805f9b34fb",
"0000f005-0000-1000-8000-00805f9b34fb"
]
Let me know if this is a big stone in your shoe, but would it be possible to also get Advertisement Data now that we're at it? I can see that being useful. For LEGO devices, and hopefully other vendors, that's where we can check hardware and firmware versions, so it would be great to be able to for example let users know they need a firmware update to use a particular extension. If useful we can talk about this at the next extension huddle? @evhan55 @cwillisf
@knandersen I am not so well versed in these things, but if it's possible to add and Chris agrees then I don't mind trying to add it. Happy to talk about it at huddle.
I think it's best if service UUIDs get "canonicalized" (turned into the full 128-bit UUID string using the canonicalUUID
algorithm) before returning them. That would also cause the response to be the same on both platforms.
Also, I think adding advertisement data would be great, but I think it should be in a separate PR.
@cwillisf I have lost track of this PR's branch from my own branch somehow and can't seem to get them linked again, is it ok with you if I make a new PR with this same code and close this PR?
This PR needs to be closed because branch tracking got lost across forks after the LLK/scratch-link repo changed permissions.
Re-opening this PR under the same name here: https://github.com/LLK/scratch-link/pull/123
Resolves
104: BLE 'getServices' possibly not implemented
Proposed Changes