4

My iPad mini(iOS7.1.2) has my app using CoreBluetooth to act as a peripheral device. Its state(CBPeripheralManager::state) is PoweredOn, and there're no any other errors when adding and starting advertising my service. However, any central devices around the peripheral cannot connect to it.

I, of course, thought there might be problems about the central devices. It was not true because those central devices could connect with other peripheral devices except "that peripheral device". When I tried to connect with the peripheral device, - (void)centralManager:(CBCentralManager *)central didDisconnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error was called. (with error code 7).

Peripheral doesn't show any error, and centrals cannot connect till rebooting the peripheral device. What should I do more? Should I upgrade the device to iOS8?

p.s. The central devices are various, from iPhon4s to iPhone6+, and from iOS7.0.6 to iOS8.2. No problems with central devices, and peripheral devices except it.

p.s. It was occured just once, but when in strange state, the peripheral state was suddenly changed to Resetting, and PoweredOn again. After that, there are no problems about connecting. I don't know why the state was suddenly changed to Resetting, and how the state was changed.

+added @ 04081228 (GMT+0000)

I found some fishy logs from the central device which is trying to connect with the peripheral device. These below are some of the logs.

Apr 8 21:20:57 BTServer[61] : ATT Failed to locate GATT primary >service on device "9C3C82F8-50F5-FE2C-EE41-D8B8B85D7DA3"

Apr 8 21:20:57 BTServer[61] : ATT Aborting command as device >"9C3C82F8-50F5-FE2C-EE41-D8B8B85D7DA3" is no longer connected

Apr 8 21:21:08 BTServer[61] : ATT Failed to locate GATT primary >service on device "9C3C82F8-50F5-FE2C-EE41-D8B8B85D7DA3"

Apr 8 21:21:08 BTServer[61] : ATT Aborting command as device >"9C3C82F8-50F5-FE2C-EE41-D8B8B85D7DA3" is no longer connected

I found the comment from github that this is known issue of iOS. I couldn't find any other information about this, though.

+added @ 04081304 (GMT+0000)

I also found this log. I'm not sure what this means, neither.

Apr 8 22:02:03 BTServer[61] : ATT Failed to set MTU to 158 with result BM3 STATUS 14

Apr 8 22:02:13 BTServer[61] : ATT Failed to set MTU to 158 with result BM3 STATUS 14

Ricky Park
  • 256
  • 4
  • 12
  • Did you write the central code ? Looks like your trying to use a Serial over BLE library? What does LightBlue show for services offered by your Peripheral? Can you connect with that? – Dylan May 04 '15 at 23:29

0 Answers0