• 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
Re: Unknown error 1309 in didFailToConnectToPeripheral
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unknown error 1309 in didFailToConnectToPeripheral


  • Subject: Re: Unknown error 1309 in didFailToConnectToPeripheral
  • From: András Kövi <email@hidden>
  • Date: Wed, 19 Feb 2014 22:36:01 +0100

NSError is a precisely forged hammer that can hold any info one can imagine. Still, mostly it is used as a sharp axe that cuts cleanly leaving no traces of reasons. One has to dig and reasearch instead of having some meaningful explanation of an event. The situation is just a little better than it was with errno and int return values.

Memory should not be a concern, speed should not be a concern. Spending more time to generate a reasonable error instead of a zero cost, zero info string. Make the error self explaining, add permalinks to documentation if possible, give as much context as possible.

Maybe one day framework creators will come to understand that programmers are still humans who need explanation, not just an error code. Especially not a code that has no documentation.

Rant over.
A


2014-02-19 19:21 GMT+01:00 Moe Aboulkheir <email@hidden>:
Hey,

Long time listener, first time caller.

I have seen a post or two about 1309, and a couple of SO questions, with no real result, mostly due to lack of information from the asker.  To clarify:

When connecting to a peripheral, didFailToConnectToPeripheral is sometimes passed "Unknown Error: 1309".  The aggravating precondition seems to be that either the peripheral or the central is running in the background (with the appropriate UIBackgroundModes key).  This error is inevitable with long running background processes and requires turning bluetooth off and on to resolve.  

I have opened a bug with Apple, but have not heard back.  

Take care,
Moe

More info:

This happens with peripherals which have previously (sometimes immediately previous) been successfully connected to.  The application on both sides of the connection is one which cycles between peripheral and central modes, however I have reproduced this issue with trivial sample code - one peripheral application and a central.  The only requirement is repeated reconnections and backgrounding.

The error object has no description, and nobody on the internet seems to have any information about what the error could mean, even vaguely, let alone how to fix it.  I know this error code is used elsewhere to indicate a file position/seek/read error, but that's very little to go on. 

 _______________________________________________
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

 _______________________________________________
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

References: 
 >Unknown error 1309 in didFailToConnectToPeripheral (From: Moe Aboulkheir <email@hidden>)

  • Prev by Date: Unknown error 1309 in didFailToConnectToPeripheral
  • Next by Date: Re: Unknown error 1309 in didFailToConnectToPeripheral
  • Previous by thread: Unknown error 1309 in didFailToConnectToPeripheral
  • Next by thread: Re: Unknown error 1309 in didFailToConnectToPeripheral
  • Index(es):
    • Date
    • Thread