I tried the nvram command below. After a reboot, I can see that the built-in Bluetooth stack no longer uses the built-in Bluetooth (my BT keyboard stops working), but the iOS simulator still behaves the same way with either, or no, dongle plugged in. Just spins.
Is there a log that I can enable for the iOS Simulator to see what is happening? I don't see any Bluetooth-relevant information output to the Conosle log. All I see when I enter the Bluetooth screen in the simulator is:
12-02-04 8:02:59.105 AM Preferences: BTM: attaching to BTServer 12-02-04 8:02:59.117 AM Preferences: BTM: posting notification BluetoothAvailabilityChangedNotification
I must be missing a small configuration here because I think I've got the right hardware (MacBookAir4,2, Broadcom BT4 dongle) and right software (OSX 10.7.3, Xcode 4.2.1). It would speed up development greatly if we could get this functionality working.
Gerald.
Hi Gerald,
Have you made sure that the Mac OS stack is not grabbing these controllers. This is done by typing the following command in a terminal window:
$ sudo nvram bluetoothHostControllerSwitchBehavior="never"
This only takes effect after a reboot, so you will need to reboot your machine. Once your machine is rebooted the iOS Simulator should recognize your controller. You should also make sure that Bluetooth is turned on in the Bluetooth settings screen of the iOS Simulator.
Brian On Feb 3, 2012, at 9:50 AM, Gutierrez, Gerald wrote: Thanks Brian.
I've plugged in a CC&C dongle and tried the simulator again but still the same behavior. I see the following in System Information:
BCM20702A0:
Product ID: 0x21e8 Vendor ID: 0x0a5c (Broadcom Corp.) Version: 1.12 Speed: Up to 12 Mb/sec Manufacturer: Broadcom Corp Location ID: 0xfd120000 / 4 Current Available (mA): 500 Current Required (mA): Unknown (Device has not been configured)
I've similarly tried a CSR dongle:
CSR8510 Nanosira M2272:
Product ID: 0x0001 Vendor ID: 0x0a12 (Cambridge Silicon Radio Ltd.) Version: 75.58 Speed: Up to 12 Mb/sec Location ID: 0xfd120000 / 4 Current Available (mA): 500 Current Required (mA): 100
The behavior is the same. The progress indicator spins and BT doesn't turn on. Is there a driver or a setting I have to toggle to get the iOS simulator to use the dongle?
Gerald.
The iOS Simulator will not use the internal BT controller. You need to use a second BT controller plugged into a USB slot for the Simulator. Most LE capable controllers available in current development kits are compatible. On Feb 1, 2012, at 2:13 PM, Gutierrez, Gerald wrote:
We have a current-model MacBook Air (MacBookAir4,2) running Xcode 4.2.1 and the iOS SDK. The iOS simulator is 5.0 (272).
I understand we can use the simulator to test iOS LE apps, but every time I go to Settings/General/Bluetooth and turn Bluetooth ON, I get a progress indicator in the UI that never goes away until I reset the entire simulator.
Am I missing a driver or software, or something else?
Gerald.
|