blessed-bluez
blessed-bluez copied to clipboard
Discoverable device, any hint?
Hi there, I have seen issue #20 and the library does not support discoverable devices as is.
I am playing a bit with the library and I have a use where I'd like to use as a relay (between a rowing machine and its mobile app).
Provided you think it is doable, I am keen on trying to implement add the "server" features.
It would be great though if you could give me a few hints on where to start / how to proceed. And if you had a bit of guidance on how to architecture the thing so that it fits nicely in your design, that would be awesome.
Thanks in advance,
it is certainly possible!
I don't have the time to do it but would welcome such an addition. My Bluez_Inc library support creating a peripheral so you could have a look at that.
Here is what you roughly need to do:
- Publish your services and characteristics on the Dbus. Have a look at the Agent implementation to see how you publish object on the .
- Create an advertisement object on the Dbus.
- Create a Bluez 'application', see bluez documentation
- handle incoming read/write/notify requests