OK, I am not an expert on Eddystone beacons. I have got two ordered from China so I can actually see how they use Eddystone-URL.
I have seen it demonstrated in this post (true, not with micro:bit) and since I managed to get the micro:bit work as an iBeacon, this (have it behave like an Eddystone-URL) sounded easy.
I failed to get the mBed code working, although this page does have nice documentation, and when trying to adapt the BLE API code that Dough posted I also failed up to now.
setInterval(function() {
NRF.setName('Testing Espruino');
NRF.setAdvertising({
0x10 : [
0x03, // Length of Service List
0x03, // Param: Service List
0xAA, 0xFE, // Eddystone ID
0x13, // Length of Service Data
0x16, // Service Data
0xAA, 0xFE, // Eddystone ID
0x10, // Frame type: URL
0xF8, // Power
0x03, // https://
'g',
'o',
'o',
'.',
'g',
'l',
'/',
'a',
'0',
'm',
'n',
's',
'S',]});
}, 30000);
The name-change works, but as soon as I scan it, I receive an error:
Uncaught Error: Got BLE error code 12
at line 25 col 15
'S',]});
^
in function called from system
It only happens when I use an app, not right away. The name-change does work however. No Eddystone related info is shown though.
If I make the URL short enough, no error is thrown, but the lack of info remains and no tools that scan for beacons recognise the microbit as a beacon.
That is as far as I got. Hope you can help me. Thanks! :)
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.
OK, I am not an expert on Eddystone beacons. I have got two ordered from China so I can actually see how they use Eddystone-URL.
I have seen it demonstrated in this post (true, not with micro:bit) and since I managed to get the micro:bit work as an iBeacon, this (have it behave like an Eddystone-URL) sounded easy.
I failed to get the mBed code working, although this page does have nice documentation, and when trying to adapt the BLE API code that Dough posted I also failed up to now.
I used the Eddystone URL script to create:
The name-change works, but as soon as I scan it, I receive an error:
It only happens when I use an app, not right away. The name-change does work however. No Eddystone related info is shown though.
If I make the URL short enough, no error is thrown, but the lack of info remains and no tools that scan for beacons recognise the microbit as a beacon.
That is as far as I got. Hope you can help me. Thanks! :)
1 Attachment