Topic

FAQ
Login Register
8258 Bluetooth LE Single Connection - How to do Notify
Sep 03, 2022 07:40

/

A

/A

當更改數值,可以自動更新(Notify),


程式中電池,這個位置不能自動更新

//// Battery attribute values
static const u8 my_batCharVal[5] = {
CHAR_PROP_READ | CHAR_PROP_NOTIFY,
U16_LO(BATT_LEVEL_INPUT_DP_H), U16_HI(BATT_LEVEL_INPUT_DP_H),
U16_LO(CHARACTERISTIC_UUID_BATTERY_LEVEL), U16_HI(CHARACTERISTIC_UUID_BATTERY_LEVEL)
};

有沒有示範軟件


1 replies
TL_Soyo Sep 05, 2022 10:43
0
/A


你好,

  可以使用ble_remote工程,参考battery_check.c文件,在电池电压改变时,调用blc_gatt_pushHandleValueNotify (BLS_CONN_HANDLE,BATT_LEVEL_INPUT_DP_H, tbl_advData, 4+ADC_SAMPLE_NUM*2);

Related topics
No related topics
Author's other topics
No more topics