Event on BLE disconnect
Hi,
I have an application for the sensor that requires constant accelerometer data streaming to the handset which works very well on a RG running latest firmware and iOS SDK, the app also uses the LED to provide state feedback to the end user (eg connected, data streaming, etc). It would be extremely beneficial to be able to trigger certain activities on BLE disconnect within the device, for example, flashing the LED to signify the disconnection of the BLE, switching the accelerometer off and enabling iBeacon mode. Clearly there are battery consumption benefits to be had by shutting down peripheralson BLE disconnect for some applications too.
Looking through the iOS API I can't see any 'device' level events that can be hooked to achieve the above via programCommandsToRunOnEvent, is there a work around or something that can be added to the roadmap - I would think that disconnect events would be useful in a number of applications.
Cheers,
Matt
This discussion has been closed.
Comments
[device.settings.disconnectEvent programCommandsToRunOnEventAsync:^{
[device.led setLEDColorAsync:[UIColor redColor] withIntensity:1.0];
}];
Prior to upgrade (v1.0.0 FW) the same code worked perfectly and the Red LED lit on disconnect.
Matt