var ibeacon = require("ble_ibeacon");
var uuid = "2F3E43C7-8400-44B5-B385-1E6BB411A3BE";
function uuidStringToArray(uuid) {
uuid = uuid.replace(/-/g, ""); // remove dashes
let uuidArray = [];
for (let i = 0; i < uuid.length; i += 2) {
uuidArray.push(parseInt(uuid.substring(i, i + 2), 16));
}
return uuidArray;
}
NRF.setAdvertising([
ibeacon.get({
uuid : uuidStringToArray(uuid),
major : 2,
minor : 1,
rssi : -59
}),
{name: "PuckHub"}
], {interval:200});
I'm having trouble advertising a custom name and iBeacon information on my puck.js. do you have any suggestions for me? the iBeacon information works but the name does not change...
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm having trouble advertising a custom name and iBeacon information on my puck.js. do you have any suggestions for me? the iBeacon information works but the name does not change...