Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Home › Forums › Ask the Flomies › Disconnecting Flo Ble Plus
Is there a way of disabling the auto connect feature in the SDK? I need to have the ability to disconnect the device after use. If i call [_fmManager stopreaders] i get a disconnected event in the didUpdateConnectedDevices:(NSArray *)devices callback but then the device reconnects automatically.
Hi Mat,
Try changing the config setting to kAutoPollingControl.
Let me know how you get on.
Scott
kAutoPollingControl on Power Operation did not work. This time I did not get the kDisconnected event and it immediately reconnected to the device (received kConnected). I find this strange:
After setting the configuration (kAutoPollingControl) on the FmSessionManager and calling startReaders i get connection event kScanning which i now use to set the device as connected. After calling stopReaders function i get a kConnected event?
When using kBluetoothConnectionControl in configuration its the same connect event (kScanning) but when calling stopReaders i first receive the kDisconnect event and then the kScanning event..
I found a solution.. not very nice though..
if (device.communicationStatus == kDisconnected) {
if ([self.delegate respondsToSelector:@selector(
sensor:didDisconnectWithError:)] && self.isConnected) {
self.isConnected = false;
[self.delegate sensor:self didDisconnectWithError:nil];
}
_fmManager.btManager.centralManager = nil;
}
Setting centralManager = nil stopped the autoconnect..
You must be logged in to reply to this topic.