我使用的是multi_role工程,修改了multi_role_processGATTDiscEvent(gattMsgEvent_t *pMsg)函数,使该函数连续发现5个特征值。
我观察到该函数发现每个特征值的时间差不多都是1S。
请问如何加快发现从机特征值时间,使它能在最短时间内发现指定特征值?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我使用的是multi_role工程,修改了multi_role_processGATTDiscEvent(gattMsgEvent_t *pMsg)函数,使该函数连续发现5个特征值。
我观察到该函数发现每个特征值的时间差不多都是1S。
请问如何加快发现从机特征值时间,使它能在最短时间内发现指定特征值?
HI, ALVIN
我按照你的方法试了一下,连接之后先更新参数再获取特征值。获取特征值时间确实可以大幅缩短了。
下面是串口打印的信息,“//”及之后是我手动添加的注释
[2020-07-29 22:05:33.073]# RECV ASCII>
Initialized
[2020-07-29 22:05:33.280]# RECV ASCII>
Connected!linkDB_NumActive 01//通过mac地址直接连接
0x806FB0C164F3
Updating//发起更新
[2020-07-29 22:05:35.513]# RECV ASCII>
Param Update 00//更新成功
[2020-07-29 22:05:36.076]# RECV ASCII>
connIndex:00
discState:01
MTU size updated MTU Size:41//更新MTU
MTU Size:41
discState:02
discState:02//发现服务BLE_DISC_STATE_SVC
Start Char Finding //开使发现特征值1
discState:03
Simple Char Found//发现特征值1
discState:03
discState:04
Simple Char Found//发现特征值4
discState:04
discState:05
Simple Char Found//发现特征值5
discState:05
discState:06
Simple Char Found//发现特征值6
discState:06
discState:07
Simple Char Fo
[2020-07-29 22:05:36.123]# RECV ASCII>
und//发现特征值7
但是在发起连接间隔更新到更新成功仍然用了2秒多,请问这个时间该怎么缩短?或者有可以将连接间隔设置为默认的地方吗?
还请知道的各位帮助解答一下,谢谢!