Received advertisement data dictionary empty when iOS6 iphone is making advertising
Received advertisement data dictionary empty when iOS6 iphone is making advertising
- Subject: Received advertisement data dictionary empty when iOS6 iphone is making advertising
- From: Frederic Visticot <email@hidden>
- Date: Thu, 20 Sep 2012 23:48:23 +0200
Test is done with 2 iPhone4S
1 with iOS6 (making advertising)
1 with iOS5 (receiving advertising)
I have developed an advertising service on a iPhone4S/iOS6
- Advertising seems correct (confirmed with sniffer).
- 2nd iPhone is trigged with the didDiscoverPeripheral
BUT advertisementData dictionary is empty...
For my point of view, the dictionary should contain CBAdvertisementDataLocalNameKey and CBAdvertisementDataServiceUUIDsKey
Any idea why this dico is empty ?
Code for the iOS6 advertising service
CBUUID *cbuuidService = [CBUUID UUIDWithString: @"1804"];//kAdvertisingServiceUUID];
NSArray *services = [NSArray arrayWithObject: cbuuidService];
NSDictionary *advertisingDict = [NSDictionary dictionaryWithObjectsAndKeys: services,CBAdvertisementDataServiceUUIDsKey, @"iOS6", CBAdvertisementDataLocalNameKey, nil];
[_peripheralManager startAdvertising: advertisingDict];
Code for the iOS5 reception service
- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI{
NSLog(@"didDiscoverPeripheral[%@] UUID: [%@]: RSSI returned after scan: %d", peripheral.name, peripheral.UUID, [RSSI intValue]);
for (NSString * key in [advertisementData allKeys]) {
NSLog(@"Key: %@ value: %@", key, [advertisementData objectForKey: key]);
}
_______________________________________________
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