Most recent activity
-
-
Hi... Can Puck.js receives message from iBeacon (on iPhone0? Can someone please help evaluate the following code?
function Bond(){ NRF.requestDevice({ filters: [{ services: ['e20a39f4-73f5-4bc4-a12f-17d1ad07a961'] }] }).then(function(d) { console.log("found device", d); device = d; return new Promise(function(resolve) { setTimeout(resolve, 1000); console.log("delayed for 1000ms..."); }); }).then(function() { console.log("end delay"); return device.gatt.connect(); **// Disconnects from Web IDE here** }).then(function(g) { gatt = g; console.log("connected"); return new Promise(function(resolve) { setTimeout(resolve, 10000); console.log("delayed for 10000ms..."); }); }).then(function() { console.log("end delay"); return gatt.startBonding(1); }).then(function() { console.log("bonded", gatt.getSecurityStatus()); gatt.disconnect(); }).catch(function(e) { console.log("ERROR",e); }); }
Output:
>Bond() =undefined found device BluetoothDevice { "id": "48:f0:b4:af:22:60", "rssi": -42, "data": new Uint8Array([2, 1, 26, 17, 7, 97, 169, 7, 173, 209, 23, 47, 161, 196, 75, 245, 115, 244, 57, 10, 226, 7, 255, 76, 0, 16, 2, 11, 64]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([16, 2, 11, 64]).buffer, "services": [ "e20a39f4-73f5-4bc4-a12f-17d1ad07a961" ] } delayed for 1000ms... end delay **<Disconnect from Web IDE>**
Since I wrote the iOS App to advertise message via iBeacon, I will try to verify and if it works, I'll post it here. Thanks for the link that was very useful. :-)
Btw, what are these data? [2, 1, 26, 17, 7, 97, 169, 7, 173, 209, 23, 47, 161, 196, 75, 245, 115, 244, 57, 10, 226, 7, 255] preceding 76?