Design Introduction “Air” Styles Mobile Design Principles Styles UX Overview Design Patterns UI Components for Tizen App Design 2.3 TV Design Principles Styles UX Overview Patterns UI Components Wearable Development Tizen Studo Overview Download Tizen Extensions for Visual Studio Family IoT extension SDK Docs Blog Blog Announcing the Tizen Studio 3.7 Release Announcing the Tizen Studio 3.1 Release Community Forums General Support Tizen .NET Web Application Development Native Application Development SDK & IDE Design Introduction “Air” Styles Mobile Design Principles Styles UX Overview Design Patterns UI Components for Tizen App Design 2.3 TV Design Principles Styles UX Overview Patterns UI Components Wearable Development Tizen Studo Overview Download Tizen Extensions for Visual Studio Family IoT extension SDK Docs Blog Blog Announcing the Tizen Studio 3.7 Release Announcing the Tizen Studio 3.1 Release Community Forums General Support Tizen .NET Web Application Development Native Application Development SDK & IDE
How to send data to gatt client when the gear is server?
I implemented to gear as Gatt server.
I created gatt server, 1 service, 2 characteristic and 1 descriptor as below;
——————————————————————-
bt_gatt_server_create(&m_hGattServer);
bt_gatt_service_create(UUID_SERVICE, BT_GATT_SERVICE_TYPE_PRIMARY, &m_hGattService);
char wval[] = {0x7d};
err = bt_gatt_characteristic_create(UUID_RX_CHAR, BT_GATT_PERMISSION_WRITE, BT_GATT_PROPERTY_WRITE, wval, 1, &m_hGattRxChar);
char rval[] = {0x01};
err = bt_gatt_characteristic_create(UUID_TX_CHAR, 0, BT_GATT_PROPERTY_NOTIFY, rval, 1, &m_hGattTxChar);
char nval[] = {0x02};
err = bt_gatt_descriptor_create(UUID_DESC, BT_GATT_PROPERTY_NOTIFY, nval, 1, &m_hGattNotiDesc);
err = bt_gatt_characteristic_add_descriptor(m_hGattTxChar, m_hGattNotiDesc);
err = bt_gatt_service_add_characteristic(m_hGattService, m_hGattRxChar);
err = bt_gatt_service_add_characteristic(m_hGattService, m_hGattTxChar);
err = bt_gatt_server_set_write_value_requested_cb(m_hGattRxChar, BleService::GattReadCB, this);
err = bt_gatt_server_register_service(m_hGattServer, m_hGattService);
err = bt_gatt_server_start();
——————————————————————-
Receiving data from gatt client is succeeded. I can see data in GattReadCB function. But how can I send data to client?
When I send thru Gatt descriptor, bt_gatt_set_value failed: 0xffffffea(-22)
bt_gatt_set_value(m_hGattNotiDesc, data, len);
If somebody has ideas, please let me know.
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio