Reputation: 8978
In iOS, I connect to 1 peripheral from the scan, discover its services etc. When it is done, I receive notifications from characteristics changes.
I then do the same with another peripheral, while the first one is connected : scan, connect to 2nd peripheral etc.
I will get notifications from the second device, but I will stop receiving notifications from the first one, even though I didn't have any disconnect event from the 1st connected device. Is that normal ?
EDIT :
@property (strong, nonatomic) CBPeripheral *device1_;
@property (strong, nonatomic) CBPeripheral *device2_;
and given the name of the device I connect to I use one reference or the other
Upvotes: 0
Views: 127
Reputation: 8978
I have replaced the properties with 2 private variables and it now works
@implementation BLEManager {
CBCentralManager* centralManager_;
CBPeripheral* device1_;
CBPeripheral* device2_;
}
...
@end
Upvotes: 0