Configure Puck.js as an iBeacon #1990
Replies: 8 comments
-
Posted at 2017-01-05 by @gfwilliams As I understand it, the maximum data you can send in a Bluetooth advertising packet is something like 31 bytes - that's 47. However you're on the right track. Copying the middle bit of the data (with a change to the flags as we don't support normal Bluetooth modes) should work:
However I don't have an BLE-capable iDevice here to test this with. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-05 by LongJogger Thanks Gordon, for your fast reply. I also tried to just use the middle part of the example, but didn't realize that I have to change the flags. Your code above works perfectly! Thanks again, for your help. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-06 by @gfwilliams Great! Thanks for letting me know! Is it just the iBeacon proximity uuid that you have to change for your own devices? It would probably make sense for me to turn it into a module, like has been done for the eddystone one |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-06 by LongJogger An own iBeacon module would be great and definitely add value also for other users. Changeable input parameters for an iBeacon module would be:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-06 by @gfwilliams Please can you try this then?
If so I'll make that into a module |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-06 by LongJogger I had two issues during testing:
But, with some small adjustments below, I got your code running. The device is then successfully recognized as an iBeacon.
Perhaps you have a better idea how to pass the Uint8Array to the NRF.setAdvertising function. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-06 by @gfwilliams Thanks - sorry, should have tested! I'll tweak setAdvertising to take uint8array in 1v91, but what you've done there looks fine. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by @gfwilliams Just to add, this is now a module: http://www.espruino.com/Puck.js+iBeacon |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-01-05 by LongJogger
Has anyone already managed to turn Puck.js into an Apple iBeacon?
So far, I used these information from Stackoverflow:
http://stackoverflow.com/questions/18906988/what-is-the-ibeacon-bluetooth-profile
and the NRF.setAdvertising function to test with the following code:
When sending the code to Puck.js, I get the following error message:
Any ideas? Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions