node-ble icon indicating copy to clipboard operation
node-ble copied to clipboard

How to create a peripheral?

Open alexcastillo opened this issue 4 years ago • 4 comments

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)]);

alexcastillo avatar Dec 29 '20 21:12 alexcastillo

Hi @alexcastillo, this capability it isn't still available, but might be added in a future version.

chrvadala avatar Dec 31 '20 11:12 chrvadala

Good to know, @chrvadala.

Thank you for the update, and keep up the good work!

alexcastillo avatar Jan 04 '21 21:01 alexcastillo

AdvertCreation01

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 avatar Jan 05 '21 11:01 SimonGAndrews

@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.

alexcastillo avatar Jan 22 '21 23:01 alexcastillo