Issue to send data from galaxy wacth3 app to computer over bluetooth SPP

I implemented to connect other bluetooth device with my watch app using SPP. But After connected successfully when i tried to send data from watch app to connected bluetooth device it not working function return -1 error code. I m using “bt_socket_send_data” function to send data here following my code for sending data over bluetooth Please help what i m doing wrong and how can i send data from watch app to connected device over bluetooth.

char data = “test”;
int client_socket_fd = 0;
ret = bt_socket_send_data(client_socket_fd , data, sizeof(data));

1 Like

Hello kamlesh,
Welcome to the community!
We hope your issue was properly addressed through SDP channel.

Thank you.

Hi,
Please check the connection always before sending data over Bluetooth.
You can check bluetooth connection using below code:
`int bt_device_set_connection_state_changed_cb(bt_device_connection_state_changed_cb callback, void *user_data)

Thank you.`

yes issue resolved thanks

1 Like