fork to force BLE id to have prefix that is assumed by the app
Dependencies: BLE_API Crypto RNG mbed nRF51822
Fork of Garagem by
Diff: main.cpp
- Revision:
- 15:88ea59cb2b9e
- Parent:
- 13:bc1be947b497
--- a/main.cpp Sun Aug 30 01:10:16 2015 +0000 +++ b/main.cpp Mon May 01 00:33:07 2017 +0000 @@ -14,7 +14,6 @@ #include "ble/services/iBeacon.h" #include "DeviceInformationService.h" - // HOW-TO TEST: //create a string to write to the characteristic 2000:2001 //openssl enc -aes-128-cbc -K 9734062BA852A049CF5D40593B769014 -iv A2685636521871D02306E2EB8F7027B3 -out /dev/stdout -in inputfile @@ -96,6 +95,11 @@ #endif ble.init(); + + // Note that the Garagem app that is in the Google Play store has the prefix for the BLE Nano hardcoded as F2:9B:4B, but newer Nanos do not have this prefix + // The following line changes the address on your Nano to ensure it will work with the app as is. + const uint8_t address1[] = {0x01,0x02,0x03,0x4B,0x9B,0xF2}; ble.setAddress(Gap::ADDR_TYPE_PUBLIC, address1); + ble.onDisconnection(disconnectionCallback); ble.gattServer().onDataWritten(onDataWrittenCallback);