• 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: Null UUID Returned for CBPeripheral
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Null UUID Returned for CBPeripheral


  • Subject: Re: Null UUID Returned for CBPeripheral
  • From: Jonathan Cohn <email@hidden>
  • Date: Wed, 26 Sep 2012 19:47:28 -0400

Ramin, can you post a code xample of your getAssociatedObject/setAssociatedObject trick?

Thanks

-Jonathan

On Tue, Sep 25, 2012 at 3:14 PM, Ramin Firoozye <email@hidden> wrote:
Under iOS5 the UUID was loaded up in didDiscoverPeripheral. Under iOS6 it will not be loaded until after the connection is established. According to a post on the forums this is intended to allow for devices that have random resolvable addresses which don't get a UUID until needed (and even then might change at a later time).

If you're using the UUID as an index into a dictionary where you are holding the list of discovered peripherals, there's an easy workaround. Create a custom CFUUID as an NSString, use that as the index and attach it to the CBPeripheral instance using objc_setAssociatedObject. At any later time you can use objc_getAssociatedObject  to retrieve it. That way you're guaranteed a well-known UUID for each peripheral and it works under both iOS5 and 6.

If you're using the UUID to remember the list of peripherals for later fast reconnection, then you probably don't really need it until connection has been made.

Cheers,
Ramin

On Sep 24, 2012, at 10:45 PM, R. Justin <email@hidden> wrote:

> Hello,
>
> We're trying to access the UUID on the CBPeripheral object returned by the didDiscoverPeripheral.
>
> The call peripheral.UUID will sometimes return a null value for a peripheral.  We have verified that the uuid will sometimes be able to be pulled from the same device after the iPhone has been restarted or the Bluetooth has been reset.  We are wondering:
>
> 1)  Is this a known issue?
> 2)  Who else has seen this issue on the list?
> 3)  Are there any workarounds?
> 4)  Has a bug report has been filed for this issue?  We are filing one now just in case.
>
> Thank you and we appreciate everyone's advice and help in the matter.
> _______________________________________________
> 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

 _______________________________________________
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

  • Follow-Ups:
    • Re: Null UUID Returned for CBPeripheral
      • From: Ramin Firoozye <email@hidden>
References: 
 >Null UUID Returned for CBPeripheral (From: "R. Justin" <email@hidden>)
 >Re: Null UUID Returned for CBPeripheral (From: Ramin Firoozye <email@hidden>)

  • Prev by Date: UUID is always NULL when iPhone 4s is used as peripheral
  • Next by Date: Updated Accessory Design Guidelines?
  • Previous by thread: Re: Null UUID Returned for CBPeripheral
  • Next by thread: Re: Null UUID Returned for CBPeripheral
  • Index(es):
    • Date
    • Thread