2788 views|3 replies

9

Posts

0

Resources
The OP
 

How to read and write attributes through the characteristic uuid in sdk! [Copy link]

 

As shown in the figure, this is operated through the handle. I want to know how to operate through the attributes.

This post is from ST - Low Power RF

Latest reply

You can refer to the client demo of the BLE_Chat project. Generally, it is not a mobile app, and there is no function interface for writing directly to UUID. The general idea is to get the handle corresponding to the UUID after discovering the service, and then read and write the characteristics through the obtained handle. 1. By ret = aci_gatt_disc_char_by_uuid(connection_handle, 0x0001, 0xFFFF,UUID_TYPE_128,&UUID_Tx); If successful, an event will be generated. aci_gatt_disc_read_char_by_uuid_resp_event()   Details Published on 2020-4-9 11:48
 
 

9702

Posts

24

Resources
2
 

See if you can get the attribute handle through the uuid and then call aci_gatt_write_char_desc(...)

tBleStatus aci_gatt_read_using_char_uuid(uint16_t Connection_Handle,
uint16_t Start_Handle,
uint16_t End_Handle,
uint8_t UUID_Type,
UUID_t *UUID);

This post is from ST - Low Power RF
Personal signature虾扯蛋,蛋扯虾,虾扯蛋扯虾
 
 
 

51

Posts

0

Resources
3
 

You can refer to the client demo of the BLE_Chat project.

Generally, it is not a mobile app, and there is no function interface for writing directly to UUID. The general idea is to get the handle corresponding to the UUID after discovering the service, and then read and write the characteristics through the obtained handle.

1. By

ret = aci_gatt_disc_char_by_uuid(connection_handle, 0x0001, 0xFFFF,UUID_TYPE_128,&UUID_Tx);

If successful, an event will be generated.

aci_gatt_disc_read_char_by_uuid_resp_event()

This post is from ST - Low Power RF
 
 
 

9

Posts

0

Resources
4
 

I used the above two commands. The day before yesterday, I couldn’t enter the event when debugging, but it was fine the next day. I’m so dizzy!

This post is from ST - Low Power RF
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list