I want to connect with my mobile phone. After calling adapter.getKnownDevices I get one device with the name of my mobile and its MAC address of Bluetooth.
Here is the fragment of my code:
function onBondingErrorCallback(e) {
alert('Cannot create a bond, reason: ' + e.message);
}
function createBonding() {
try {
alert("Connection with "+BluetoothDevices[0].address);
adapter.createBonding(BluetoothDevices[0].address, onBondingSuccessCallback, onBondingErrorCallback);
}
catch (err) {
alert('createBonding error: '+err.message);
}
}
When I call my function createBonding I see the proper MAC address and then I see alert alert from onBondingErrorCallback:
Cannot create a bond, reason: unknown exception
Does anybody know what this “unknown exception” is?
Bluetooth Adapter: createBonding and unknown exception
My device is Samsung Gear S3 SM-R760 Frontier.
Tizen version is 3.0.0.2
I use this tutorial:http://https://developer.tizen.org/development/guides/web-application/connectivity-and-wireless/bluetooth
I want to connect with my mobile phone. After calling adapter.getKnownDevices I get one device with the name of my mobile and its MAC address of Bluetooth.
Here is the fragment of my code:
function onBondingErrorCallback(e) { alert('Cannot create a bond, reason: ' + e.message); } function createBonding() { try { alert("Connection with "+BluetoothDevices[0].address); adapter.createBonding(BluetoothDevices[0].address, onBondingSuccessCallback, onBondingErrorCallback); } catch (err) { alert('createBonding error: '+err.message); } }
When I call my function createBonding I see the proper MAC address and then I see alert alert from onBondingErrorCallback:
Does anybody know what this “unknown exception” is?
Please, help me.
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio