• 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
Recovering after turning BT off and on
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Recovering after turning BT off and on


  • Subject: Recovering after turning BT off and on
  • From: Daniel Birns <email@hidden>
  • Date: Thu, 9 Oct 2008 11:37:33 -0700

Resolved:

I added the following the test:

		if (!BT.deviceCnt &&( (hal.GetTime() - BT.inquiryStartTime) > 10000))
                {
                        IOReturn err;
                        err = IOBluetoothDeviceInquiryStop(BT.BTInquiry);
                        if (err)
                                DDC1("InquiryStop failed with %x\n", err);
                        return 0;
                }
BT.deviceCnt is the count I get back from the inquiry.  In other words, it hasn't found any device after 10 seconds...

--Daniel

Begin forwarded message:

From: Daniel Birns <email@hidden>
Date: October 9, 2008 10:35:43 AM PDT
To: email@hidden
Subject: Recovering after turning BT off and on

To clarify:  I can recreate this problem by doing a device inquiry with BT, turn BT off inquire again, turn BT back on and inquire again.  The callback set by IOBluetoothDeviceInquirySetDeviceFoundCallback() is never called.

I'm not sure how to work around this or what's causing it...

--Daniel
We have a pretty reliable BT implementation.  The problem I'm having is after you successfully use BT, if you then disable it (from the system toolbar), and then reenable it, I get the following behavior:

I am using IOBluetoothDeviceInquirySetDeviceFoundCallback().

When this is called, I set a counter, as per the bt examples in the manual.

After I disable/enable BT, this never gets called.  However, if I stop my application and restart it, everything works fine.

Is there something I need to do in this case to reset a state or something?  I'm using IOBluetoothLocalDeviceGetPowerState() to discover when BT is available to me.  When it's not available I abort my inquiry.  Perhaps I'm leaving some state somehow that's causing this problem?

--Daniel

 _______________________________________________
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: 
 >Recovering after turning BT off and on (From: Daniel Birns <email@hidden>)

  • Prev by Date: Recovering after turning BT off and on
  • Next by Date: Iphone 3G (2.0.2) OSBundleLibraries key and string?
  • Previous by thread: Recovering after turning BT off and on
  • Next by thread: Iphone 3G (2.0.2) OSBundleLibraries key and string?
  • Index(es):
    • Date
    • Thread