Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting to other Bluetooth Device by BeeTee app

I need to implement a self bluetooth app to connect with all bluetooth devices to iPhone. I know it is not possible with CoreBluetooth framework.

I use private API and added header files of DeviceManager and BluetoothManager to private frameworks and downloaded BeeTee Project from here

This app runs and finds all bluetooth device near me but when I have tried to connect to a device by this code:

[self.bluetoothManager connectDevice:bluetoothDevice];

and this

[bluetoothDevice connect];

When a cell is selected, Both of above codes request to connect but BTM returns this message:

BeeTee[5473:60b] BTM: connection to service 0xffffffff on device "Nokia 500" F4:xx:xx:xx:xx:xx failed with error 109

What is error 109? Which would be set service number?

I guess I should pair devices before connecting but how can I do that?

like image 243
Fa.Shapouri Avatar asked Oct 20 '22 08:10

Fa.Shapouri


2 Answers

I am just guessing, but I think the problem is that the BluetoothManager.framework is made for the External Accessory Program by Apple. And this allows (among others) SPP Bluetooth connection to certificated devices. But there is the problem: you need to have a device with a authentication chip inside.

I don't know on which level/layer Apple implemented the authentication, but I fear the did it one layer under the private framework BeeTee is using.

UPDATE: Maybe this is helpful for you:

BluetoothManager *bluetoothManager = //...
[bluetoothManager setDevicePairingEnabled:YES];
[bluetoothManager connectDevice:bluetoothDevice withServices:0x00002000];

Credits

like image 91
Michael Dorner Avatar answered Oct 27 '22 09:10

Michael Dorner


BluetoothManager *bluetoothManager = //...
[bluetoothManager setDevicePairingEnabled:YES];
[btManager setPincode:@"111111" forDevice:bluetoothDevice.deviceRef];
//where 111111 is your device PIN
[bluetoothManager connectDevice:bluetoothDevice withServices:0x00002000];
like image 25
kerolos Avatar answered Oct 27 '22 07:10

kerolos