Connecting external devices to Bluetooth devices without user interaction

In accordance with the instruction of the EAAccessoryManager class from iOS 6, using showBluetoothAccessoryPickerWithNameFilter, we can then display an accessory collector that helps the user connect external accessories, including iAP, using a unique Bluetooth identifier.

Now we want to programmatically connect one of the external accessories from this list.

We need your support as follows.

How can we programmatically connect any of our external devices in the range of the phone?

How can we programmatically connect any of our external devices without user interaction?

How can we programmatically display a list of external devices within the range of a user phone?

How can we get a list of EAAccessory objects of our external devices that are in range but not connected?

Can I save an EAAccessory object in NSUserDefaults? If so, how can we do this? Since EAAccessory EAAccessory does not implement the encodeWithCoder and initWithCoder methods, so it does not allow it to be stored in NSUserDefaults.

Using BTLE, we can solve it, but we want solutions in BT Classic.

+4
source share

Source: https://habr.com/ru/post/1447023/


All Articles