• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
peripheral disconnects when discovering services
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

peripheral disconnects when discovering services


  • Subject: peripheral disconnects when discovering services
  • From: Justin Cooper <email@hidden>
  • Date: Fri, 06 Feb 2015 16:35:16 -0600

Hello!


I am having an intermittent issue, where I get an unexpected disconnect from our hardware peripheral (which uses the Nordic nrf8001 chip) about 1 out of 20 times.

The disconnect always happens at exactly the same place.  Here is my connection sequence:
  • central.scanForPeripheralsWithServices([serviceUUIDUART], options: nil)

  • didDiscoverPeripheral -> look for matching name in advertisementData, if found continue with:

  • store a reference to peripheral as myPeripheral

  • central.connectPeripheral(peripheral, options: nil)

  • central.stopScan()

  • wait for didConnectPeripheral then call myPeripheral?.discoverServices([serviceUUIDUART])


Right here is where it fails, again about 1 out of 20 times.

I've posted my debug output log and the error code I receive in didDisconnectPeripheral.


This test is running in a loop, by the way, where we connect, discover services, send and receive data, then disconnect.  Then we wait for, say, 6 second and start the loop over.


Has anyone else seen errors like this when connecting?



Found Peripheral 50000 <__NSConcreteUUID 0x1742250a0> 36DC3DDA-9384-D02F-BF95-12527501BB86

connected to peripheral <CBPeripheral: 0x1700f0d00, identifier = 36DC3DDA-9384-D02F-BF95-12527501BB86, name = 50000, state = connected>

my peripheral is <CBPeripheral: 0x1700f0d00, identifier = 36DC3DDA-9384-D02F-BF95-12527501BB86, name = 50000, state = connected>

going to discover services for Snail and VIU

disconnected from peripheral <CBPeripheral: 0x1700f0d00, identifier = 36DC3DDA-9384-D02F-BF95-12527501BB86, name = 50000, state = disconnected> for reasons Error Domain=CBErrorDomain Code=10 "The connection has failed unexpectedly." UserInfo=0x17426f980 {NSLocalizedDescription=The connection has failed unexpectedly.}



Thanks!


Justin


 _______________________________________________
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

  • Prev by Date: Bluetooth heart rate sensor with iOS 8
  • Next by Date: Bluetooth device/service caching
  • Previous by thread: Bluetooth heart rate sensor with iOS 8
  • Next by thread: Bluetooth device/service caching
  • Index(es):
    • Date
    • Thread