Use 2 central Manager
Use 2 central Manager
- Subject: Use 2 central Manager
- From: Alpwise iOS Dev <email@hidden>
- Date: Fri, 25 Jan 2013 13:25:18 +0100
Hi,
I would use 2 central manager, one to manage the discovery and another to manage the connection. So i need to pass a CBPeripheral discover from a CBCentralManager to another CBCentralManager.
Has someone already try that?
Here is my example. =============================== -(void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI { // central != _centralManager _peripheralDiscovered = peripheral; [_centralManager connectPeripheral:peripheral options:nil]; }
-(void)centralManager:(CBCentralManager *)central didConnectPeripheral:(CBPeripheral *)peripheral { // central == _centralManager // peripheral != _peripheralDiscovered but [peripheral UUID] == [_peripheralDiscovered UUID] } =============================== It seems that a new CBPeripheral is allocated when the central change. It is a normal behavior?
Thanks,
Samuel.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden