Languages

Menu
Sites
Language
bluetooth error

Hi, i am developing a Watch app that commnuicates with external devices using Bluttooth Low Energy(BLE).

Watch is a client, external devices is a server.

 

bt_gatt_client_create(remote_address, client);

bt_gatt_client_get_service(client, UUID, &svc);

bt_gatt_service_get_characteristic(svc, control_point_UUID, &write);

bt_gatt_set_value(control_point_UUID,  ...); // i send 5byte char character

bt_gatt_client_write_value(control_point_UUID, __bt_gatt_client_write_complete_cb, NULL);

// upper callback function
__bt_gatt_client_write_complete_cb(int result, bt_gatt_h gatt_handle, void *data)
{
    // the result is -9, 0xFD
}

In callback function(__bt_gatt_client_write_cmomplete_cb), i got a result which  assigned as -9.

 

It is hard to upload image...

log below..

bt-hal-gatt-client.c: __hal_bluetooth_internal_write_cb(1616) > write Characteristic dbus failed Error:[GDBus.Error:org.bluez.Error.Failed: Operation failed with ATT error: 0xfd]

bt-request-sender.c: __send_request_cb(449) > event_type[23], result= INTERNAL [0xfffffff7]

 

To solve the problem, i was looking for a solution and i found that trying to apply notification as true.

However, Tizen native api doesn't support that the client cannot set a status of server notification.

 

Today, I attempted to convert "bt_gatt_service_get_characteristic" to "bt_gatt_characteristic_create", but it was not working..

And i try to convert "bt_gatt_client_get_service" to "bt_gatt_service_create" and "bt_gatt_server_create"... 

 

How can i solve this problem?

 

Edited by: Junhak Lee on 05 Apr, 2021

Responses

3 Replies
Junhak Lee

I added  "bt_gatt_client_set_characteristic_value_changed_cb" function behind "bt_gatt_client_write_value" call and the error was gone.

Peter Groft

Check Bluetooth basics

    Turn Bluetooth off and then on again. Learn how to turn Bluetooth on and off.
    Confirm that your devices are paired and connected. Learn how to pair and connect via Bluetooth.
    Restart your devices. Learn how to restart your Pixel phone or Nexus device.

Regards,
Peter

Cucumber Nox

acquire new knowledge that is useful. We appreciate the website's excellent documentation and information.