Always Bypass Guest Mode?
[[MBLMetaWearManager sharedManager] startScanForMetaWearsWithHandler:^(NSArray *array) {
for (MBLMetaWear *device in array) {
[[MBLMetaWearManager sharedManager] stopScanForMetaWears];
if (device.isGuestConnection) {
NSLog(@Guest connection);
[device setConfiguration:nil handler:^(NSError *error) {
//clears guest mode, then calls itself in order to hopefully establish a normal connection
[self connectToMetaWear];
}];
} else {
[device connectWithHandler:^(NSError *error) {
if (device.state == MBLConnectionStateConnected) {
NSLog(@Connected to device successfully!);
self.device = device;
}
}];
I'd love any suggestions you might have, thank you! Also, when the device is connected in guest mode, am I correct in saying that I don't have access to the accelerometer data? The reason I ask is because sometimes my app never gets an accelerometer data or it only reads a bit of data before the accelerometer data stops streaming. The sample frequency is 100hz. The reason I think it's guest mode is because after I go to the mbientlab sample app and factory reset, then everything is normal and works perfectly.
Thanks!
Comments