If you don't mind using some private stuff, you can do it like this:
typedef void* BluetoothHCIRequest;
OSStatus BluetoothHCIRequestCreate(BluetoothHCIRequest* outHandle, int timeOut, void* unknownOut, int alwaysZero);
void BluetoothHCIRequestDelete(BluetoothHCIRequest hciRequest);
OSStatus BluetoothHCIWriteSimplePairingMode(BluetoothHCIRequest hciRequest, BOOL onOff);
#define HCI_TIMEOUT (3000)
void SetSimplePairing(BOOL on)
{
BluetoothHCIRequest hciRequest = nil;
if ( BluetoothHCIRequestCreate(&hciRequest, HCI_TIMEOUT, nil, 0) == noErr && hciRequest )
{
OSStatus err = BluetoothHCIWriteSimplePairingMode(hciRequest, on);
if (err)
{
NSLog(@"BluetoothHCIWriteSimplePairingMode: %d", err);
}
BluetoothHCIRequestDelete(hciRequest);
}
else
{
NSLog(@"BluetoothHCIRequestCreate failed");
}
}