We've just been granted a BLE Manufacturer ID of 0x0590 by the Bluetooth SIG!
1v94 of Espruino doesn't support encoding/decoding of manufacturer data, but I have added it to the latest builds.
You can do:
manufacturerData: [ array of your data ]
and if you do NRF.findDevices(print) you'll get something like this for any Puck.js devices advertising manufacturer data:
"id": "aa:bb:cc:dd:ee:ff", // address
"rssi": -89, // signal strength
"data": new Uint8Array([ ... ]).buffer, // ArrayBuffer of returned data
"manufacturer" : 0x0590,
"manufacturerData" : [ array of your data ],
"name": "DeviceName" // the advertised device name
While this isn't too different to services, it is a totally legitimate way of advertising custom data - since for 16 bit services you're supposed to only use the ones that are approved by the Bluetooth SIG. As long as you use 0590 for the Manufacturer ID you can now broadcast whatever you want :)
congrats @Gordon. another example that Espruino/PuckJS is a great product !
ps a thumbs up feature would be nice to have in the forum ;)
:) yes - there was actually a StackOverflow style Q&A thing in the works too, but sadly I'm not sure when that's going to go live - work on the forums has slowed a bit since microcosm (the people running it) ran out of funding :(
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem