Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CBperipheral uuid is null in ios 6.0.1 on i-phone5

well, I have an application that scan and connect to to a 'bluetooth le' device under ios 6.0.1 but on iphone 4s, and it works good. when upload the application to the apple store, they return me an application crash, bat programming, but I only understand the crash when I try the application on an iphone5 where the

 - (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI; 

return me a peripheral with null uuid.

I print the peripheral, the name, the uuid, the rssi and the advertData, everything is good but the uuid is null, and I use the uuid in the application. this make my application crash, I can control the null uuid, and this means that I can't control the application.

Somebody knows what happens, and a possible solution?

like image 487
Manelonix Avatar asked Dec 04 '12 23:12

Manelonix


1 Answers

What we have to do is the next: You cant write the peripheral object with a NSLog, but we can't have the peripheral uuid property before connect was executed. It always was null. We ask for the uuid when the services read was finished, not before, and then we can't run the applications on i-phone5 without crash.

I read it about on TI (texas instruments) that it was a ios bug, but I thing it is a ble security update, we need to connect before ask fore the uuid.

like image 137
Manelonix Avatar answered Nov 30 '22 19:11

Manelonix