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

GATT Service Changed Characteristic #127

Open
brycejacobs opened this issue Sep 14, 2015 · 7 comments
Open

GATT Service Changed Characteristic #127

brycejacobs opened this issue Sep 14, 2015 · 7 comments

Comments

@brycejacobs
Copy link

Would there be any willingness to accept a PR that adds support for the Service Changed Characteristic?
(Ref Vol 3. Part G. 7.1)

I've started some initial work on a fork of mine, basically modifying the gatt.js and abstracting some functions. I've only started work on Linux, and can look into Mac compatibility as well if this would be wanted. It would use the same characteristic (uuid - 1801) as before, just need to modify the value when we have some services that have changed.

The goal would be to add the following prototype functions in gatt.js:

  • addService
  • removeService

This would enable attribute caching on the central side of things, and enable services to be taken out without causing problems when there is a connection.

I'm looking to help out if at all possible, to support the project and use it for our needs.

cc/ @sandeepmistry
Thanks,
Bryce

@brycejacobs
Copy link
Author

Ref #128

@sandeepmistry
Copy link
Collaborator

@popasquat89 for sure, it would be great to have this feature! However, I'm trying to keep the API for both OS X and Linux in sync, so it would be great to have both in at the same time.

@brycejacobs
Copy link
Author

I'll try to make some time today to patch the Mac bindings as well!

@brycejacobs
Copy link
Author

@sandeepmistry What's your process for discovering xpc core bluetooth message id's? I'm specifically interested in the XPC message id for the removeService (assuming it's different from removeAllServices, which is this.sendCBMsg(12, null)).

I can't find a reference to the message id's anywhere on the internet, so I'm assuming there has to be some way of doing it by sniffing them out.

Link Reference:
https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CBPeripheralManager_Class/#//apple_ref/occ/instm/CBPeripheralManager/removeService:

I'm also curious if they automatically update the Service Changed Characteristic. Thinking out loud here, let me know if you have any insight. Getting late here, going to finish this up tomorrow.

Thanks,
Bryce

@sandeepmistry
Copy link
Collaborator

@popasquat89 to sniff out see: https://github.com/sandeepmistry/osx-ble-peripheral/blob/master/BLEPeripheral/BPAppDelegate.m#L83

and comment the // #define XPC_SPY 1 line.

I'll probably be swapping out the XPC layer with node-core-bluetooth at a later date, but I just started on it.

@brycejacobs
Copy link
Author

@sandeepmistry Take a look when you have a chance, updated with Mac compatibility and squashed down the commit.

Let me know if you need anything.

@rzr
Copy link

rzr commented Nov 4, 2020

Please check if this ticket is still relevant for this release:

https://www.npmjs.com/package/@abandonware/bleno/v/0.5.1-3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants