How to implement a read characterictic similar as in Device-Name?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

CYW20737 runs as a server.

How to implement a read characterictic similar as in Device-Name?

The firmware will update the value during non-connect. Once a client connects it will read that value immediately. That works nicely for device-name, but I need a sepearate characteristic for that.

In all the examples I found nothing appropiate, only writing to a characteristic

0 Likes
1 Solution
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

If you already know the UUID of the characteristic, then you can use the example from the hello_sensor app:

// Read value of the service from GATT DB.

    bleprofile_ReadHandle(HANDLE_HELLO_SENSOR_SERVICE_UUID, &db_pdu);

    ble_tracen((char *)db_pdu.pdu, db_pdu.len);

View solution in original post

1 Reply
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

If you already know the UUID of the characteristic, then you can use the example from the hello_sensor app:

// Read value of the service from GATT DB.

    bleprofile_ReadHandle(HANDLE_HELLO_SENSOR_SERVICE_UUID, &db_pdu);

    ble_tracen((char *)db_pdu.pdu, db_pdu.len);