Hello,
I wrote a code taking help from Bluetooth Tutorial for Tizen 2.3
https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.native.appprogramming/html/tutorials/net_tutorial/bluetooth_tutorial.htm#connect
When I worked my application as Server, It can listen to other connecting device perfectly.
But, I can not connect to the server.
Sockect COnnection State Change Listener is same as in the tutorial.
Here is my code to connect to the server side applicaiton:
bt_error_e ret;
const char* my_uuid="00001101-0000-1000-8000-00805F9B34FB"; //My Application's UUID
ret = bt_socket_set_connection_state_changed_cb(socket_connection_state_changed, NULL);
if (ret != BT_ERROR_NONE)
{
dlog_print(DLOG_ERROR, LOG_TAG, "[bt_socket_set_connection_state_changed_cb] failed.");
return;
}
ret = bt_socket_create_rfcomm(my_uuid, &server_socket_fd);
if (ret != BT_ERROR_NONE)
{
dlog_print(DLOG_ERROR, LOG_TAG, "bt_socket_create_rfcomm() failed.");
}
const char* bt_server_address="B8:03:05:B0:3E:B0"; // Server to which I am connecting
const char* service_uuid="27012f0c68af4fbf8dbe6bbaf7aa432a"; // UUID of the application running on the server
ret = bt_socket_connect_rfcomm(bt_server_address, service_uuid);
if (ret != BT_ERROR_NONE)
{
dlog_print(DLOG_ERROR, LOG_TAG, "[bt_socket_connect_rfcomm] failed.");
return;
}
else
{
dlog_print(DLOG_INFO, LOG_TAG, "[bt_socket_connect_rfcomm] Succeeded. bt_socket_connection_state_changed_cb will be called.");
}
Log Result:
[bt_socket_connect_rfcomm] Succeeded. bt_socket_connection_state_changed_cb will be called.
[socket_connection_state_changed_cb] Failed. result = -29359868
What does this error result id mean? From where can I check the error description against result id?
Kindly help to solve the problem.