Locator beacon firmware
Dependencies: BLE_API mbed nRF51822
Fork of WeatherStation by
Revision 9:dd7ba1fdae47, committed 2017-04-29
- Comitter:
- sycorax
- Date:
- Sat Apr 29 16:33:11 2017 +0000
- Parent:
- 8:2aa1fc734e13
- Commit message:
- NON CONNECTABLE
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 2aa1fc734e13 -r dd7ba1fdae47 main.cpp --- a/main.cpp Sat Apr 29 15:43:33 2017 +0000 +++ b/main.cpp Sat Apr 29 16:33:11 2017 +0000 @@ -9,7 +9,6 @@ BLE ble; - const static char DEVICE_NAME[] = "Locator RedBear"; static const uint16_t serviceList[] = { @@ -37,12 +36,11 @@ ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE); ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_16BIT_SERVICE_IDS, (uint8_t *)serviceList, sizeof(serviceList)); ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME, (uint8_t *)DEVICE_NAME, sizeof(DEVICE_NAME)); - ble.gap().setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED); - ble.gap().setAdvertisingInterval(500); /* 1000ms */ + ble.gap().setAdvertisingType(GapAdvertisingParams::ADV_NON_CONNECTABLE_UNDIRECTED); + ble.gap().setAdvertisingInterval(100); /* 1000ms */ ble.gap().startAdvertising(); while (true) { ble.waitForEvent(); - printf("...\n"); } }