On Tuesday, January 14, 2003, at 03:50 PM, Garth Cummings wrote: Hi Paul, As a speculation, would IOServiceWaitQuiet() in IOKit/IOKitLib.h work? This would required diving down into the I/O Kit layer briefly, > though. Unfortunately no... the configuration process that needs to complete is controlled by the daemon (blued). There is no notification or state that goes along with the completion, so there's no way to currently wait for it. - Eric On Tuesday, January 14, 2003, at 11:22 AM, Eric Brown wrote: On Tuesday, January 14, 2003, at 06:36 AM, Paul Davis wrote: I have a question about the IOBluetoothLocalDeviceReadName function. When the Bluetooth USB dongle is plugged in and I start my application this function returns the machine name. However, if I unplug/plug the USB when my application is active, the IOBluetoothLocalDeviceReadName callback always returns what appears to be the USB device default name (i.e. Broadcom BCM2033) instead of the machine name. Is their any notification that can tell me when the firmware download to the USB dongle is complete so that I don't request the local device name prematurely? Or, can the callback from IOBluetoothLocalDeviceReadName be changed to only return when the firmware download to the Bluetooth USB dongle is complete? As you've found, there is a race between the device appearing to an application and begin fully initialized by the system. In this case, I don't think the problem is the firmware download so much as the difference in time between the device first appearing in the IORegistry (which is what our API uses to find the device), and the daemon getting the same notification and configuring the device with the proper name, scan modes etc... I also tried using while(!(IOBluetoothLocalDeviceAvailable()) as the delay before requesting the local name and this was unsuccessful as well. I ended up using a time delay as a workaround. I was hoping to get around this since the time delay required may be different depending on machine speed. For now, the delay is probably your best bet. We are working on fixing the problem so that applications won't know about a device until the daemon has fully configured it. - Eric _______________________________________________ bluetooth-dev mailing list | bluetooth-dev@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/bluetooth-dev Do not post admin requests to the list. They will be ignored. _______________________________________________ bluetooth-dev mailing list | bluetooth-dev@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/bluetooth-dev Do not post admin requests to the list. They will be ignored.
participants (1)
-
Eric Brown