Button initiated config service
Dependencies: BLE_API_EddystoneConfigService_2 mbed nRF51822
Fork of BLE_EddystoneBeaconConfigService_3 by
Diff: EddystoneConfigService.h
- Revision:
- 35:314f2152506f
- Parent:
- 34:5876fbb1aa62
- Child:
- 36:ccb188bcfef1
--- a/EddystoneConfigService.h Wed Sep 02 20:17:38 2015 +0000 +++ b/EddystoneConfigService.h Wed Sep 02 20:55:47 2015 +0000 @@ -619,27 +619,27 @@ /* Reinitialize the BLE stack. This will clear away the existing services and advertising state. */ - ble.shutdown(); - ble.init(); - ble.setTxPower(params.txPowerMode); - ble.setAdvertisingType(GapAdvertisingParams::ADV_NON_CONNECTABLE_UNDIRECTED); - ble.setAdvertisingInterval(beaconPeriod); +// ble.shutdown(); +// ble.init(); +// ble.setTxPower(params.txPowerMode); +// ble.setAdvertisingType(GapAdvertisingParams::ADV_NON_CONNECTABLE_UNDIRECTED); +// ble.setAdvertisingInterval(beaconPeriod); extern void saveURIBeaconConfigParams(const Params_t *paramsP); /* forward declaration; necessary to avoid a circular dependency. */ saveURIBeaconConfigParams(¶ms); - //setTLMFrameData(0x00,0x2222,0x3333,0x01,0x02); // Initialize TLM Data, for testing, remove for release - updateTlmPduCount(0); - updateTlmTimeSinceBoot(0); + EddystoneService(ble,params.beaconPeriod,params.txPowerMode, (uint8_t *) params.uidNamespaceID, (uint8_t *) params.uidInstanceID, (const char *) params.uriData, params.uriDataLength, params.tlmVersion ); +// updateTlmPduCount(0); +// updateTlmTimeSinceBoot(0); // Construct TLM Frame in initial advertising. - serviceData[serviceDataLen++] = BEACON_EDDYSTONE[0]; - serviceData[serviceDataLen++] = BEACON_EDDYSTONE[1]; - serviceDataLen += constructTLMFrame(serviceData+serviceDataLen,SERVICE_DATA_MAX); +// serviceData[serviceDataLen++] = BEACON_EDDYSTONE[0]; +// serviceData[serviceDataLen++] = BEACON_EDDYSTONE[1]; +// serviceDataLen += constructTLMFrame(serviceData+serviceDataLen,SERVICE_DATA_MAX); - updateAdvPacket(serviceData, serviceDataLen); - ble.gap().startAdvertising(); - ble.gap().onRadioNotification(this,&EddystoneConfigService::radioNotificationCallback); - timeSinceBootTick.attach(this,&EddystoneConfigService::tsbCallback,0.1); // incriment the TimeSinceBoot ticker every 0.1s +// updateAdvPacket(serviceData, serviceDataLen); +// ble.gap().startAdvertising(); +// ble.gap().onRadioNotification(this,&EddystoneConfigService::radioNotificationCallback); +// timeSinceBootTick.attach(this,&EddystoneConfigService::tsbCallback,0.1); // incriment the TimeSinceBoot ticker every 0.1s } private: