Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does eddystone works for Arduino-SDK? #109

Open
chenchen-hci opened this issue Aug 16, 2017 · 0 comments
Open

Does eddystone works for Arduino-SDK? #109

chenchen-hci opened this issue Aug 16, 2017 · 0 comments

Comments

@chenchen-hci
Copy link

I am currently using RedBear BLE to act as an EddyStone beacon with Arduino being used as firmware development platform.

The example code of BLE ibeacon works great on my board, however I don’t know how to enable EddyStone service and EddyStone configure service. After looking through the library code, I can see the provided Arduino SDK has such capabilities. The libraries of eddystone and eddystoneservices can be referred to following file:

~/.arduino15/packages/RedBear/hardware/nRF51822/1.0.8/cores/RBL_nRF51822/ble-master/ble/services/EddystoneService.h

and

~/.arduino15/packages/RedBear/hardware/nRF51822/1.0.8/cores/RBL_nRF51822/ble-master/ble/services/EddystoneConfigService.h

Here are the simple starter code I wrote, could you please indicate where the problems may be:

#include "EddystoneService.h"
BLEDevice ble; 
EddystoneService *eddyServicePtr;

void setup() {
  pinMode(LED, OUTPUT);
  digitalWrite(LED, HIGH);
  ble.init(); 
  eddyServicePtr = new EddystoneService(ble);   // period = 100ms, tx = 0
  eddyServicePtr->start();
  ble.setAdvertisingType(GapAdvertisingParams::ADV_NON_CONNECTABLE_UNDIRECTED);
  ble.setAdvertisingInterval(160); 
  ble.setAdvertisingTimeout(0);
  ble.startAdvertising();
}

void loop() {}

Also I will be very appreciated if you can indicate me some example codes for different kinds of services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant