5

I've been messing around with the private BluetoothManager framework in iOS 5.0 and I've been able to successfully start/stop Bluetooth and get a list of devices, however I can't figure out how to initiate pairing.

The closest I've come is to try to connect using:

[[BluetoothManager sharedInstance] connectDevice:dev];

where dev is a BluetoothDevice object discovered during scanning.

This seems to attempt to pair (when I try to connect to my iMac, the pairing dialog appears for a split second), but then quickly fails.

I've noticed that the BluetoothManager.h includes a BTPairingAgentImpl struct which might help, but I have no idea of what this struct includes or how to use it.

Any help would be greatly appreciated.

Stoph
  • 693
  • 1
  • 5
  • 20
  • Did you found a way to connect to a bluetooth device? If yes, it would be great, if you could contact me. Thanks! – Flocked May 15 '12 at 00:42
  • Unfortunately the project that required that bluetooth connection got shelved so I haven't had a reason to keep messing with it. – Stoph May 17 '12 at 21:31

1 Answers1

0

The correct way of doing this is getting a BluetoothDevice object (see BluetoothDevice.h) and using its methods: pairing, connect , etc.

radhoo
  • 2,877
  • 26
  • 27
  • Late comment but: There is no "pairing" method on the device. Just "connect" and "unpair". Best I can determine, one must use a pairing agent to establish pairing but haven't been successful doing this yet. – AdvApp Apr 15 '14 at 15:01
  • bluetooth not use for Iphone 5s ,can you help me please – vualoaithu Sep 09 '14 at 08:30