node-ble
node-ble copied to clipboard
How to create a peripheral?
Thank you so much for this project!
I was wondering if it is possible to create a ble peripheral that can advertise some static data?
Something similar to bleno's example.
bleno.startAdvertising(name, serviceUuids[, callback(error)]);
// or
bleno.startAdvertisingIBeacon(uuid, major, minor, measuredPower[, callback(error)]);
Hi @alexcastillo, this capability it isn't still available, but might be added in a future version.
Good to know, @chrvadala.
Thank you for the update, and keep up the good work!
Ive got a project WIP that may help this along, happy to share as I go.
the project is an 'Alexa Gadget' based on raspberry pi, with Node.js . The gadget will be a peripheral to an Alexa dot , communicating over bluetooth as per https://developer.amazon.com/en-US/docs/alexa/alexa-gadgets-toolkit/understand-alexa-gadgets-toolkit.html .
The work is based on mostly python examples, im converting to JS using dbus-next. eg
https://punchthrough.com/creating-a-ble-peripheral-with-bluez/ ,
https://github.com/dbusjs/node-dbus-next/blob/959c0b1f2453346c17b509d1870820913a32b8a6/test/integration/configured-service.test.js and https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test/example-advertisement
Will publish on github eventually. Here is notes (above) on advertising with dbus-next and bluez. Working on the server GATT service publish next. Im having to learn alot as I go on the whole stack here (literally) so its taking a while :).
@SimonGAndrews,
This is awesome! Thank you so much for sharing.
I'll be happy to be one of your first testers once your publish your server GATT service.
Please keep me posted.