LongJogger
Member since Jan 2017 • Last active Jun 2017Most recent activity
-
An own iBeacon module would be great and definitely add value also for other users.
Changeable input parameters for an iBeacon module would be:
- UUID => Bytes 9 - 24
- Major: integer value between 0 and 65535 => Bytes 25 - 26
- Minor: integer value between 0 and 65535 => Bytes 27- 28
- Calibrated TX Power: integer value between 0 and 255 => Byte 29
- UUID => Bytes 9 - 24
-
-
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:var g = [0xd6, 0xbe, 0x89, 0x8e, 0x40, 0x24, 0x05, 0xa2, 0x17, 0x6e, 0x3d, 0x71, 0x02, 0x01, 0x1a, 0x1a, 0xff, 0x4c, 0x00, 0x02, 0x15, 0xe2, 0xc5, 0x6d, 0xb5, 0xdf, 0xfb, 0x48, 0xd2, 0xb0, 0x60, 0xd0, 0xf5, 0xa7, 0x10, 0x96, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xc5, 0x52, 0xab, 0x8d, 0x38, 0xa5]; NRF.setAdvertising(g);
When sending the code to Puck.js, I get the following error message:
Uncaught Error: Got BLE error code 9 at line 1 col 21 NRF.setAdvertising(g); ^ =undefined
Any ideas? Thanks in advance!
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.