Compare commits

...

2 Commits

Author SHA1 Message Date
wupengfei3 6425e8be56 bluetooth/scan: handle uuid16_some/uuid_all eir data
bug: v/22580

Signed-off-by: wupengfei3 <wupengfei3@xiaomi.com>
2026-05-11 20:09:15 +08:00
liuxiang18 676d098658 bluetooth/scan: add uuid_some & uuid_all macro
bug: v/22580

The watch now supports power meters. In addition to the existing SVC_DATA_16 filter, new UUID_SOME and UUID_ALL filters must be added.

Signed-off-by: liuxiang18 <liuxiang18@xiaomi.com>
2026-05-11 20:09:15 +08:00
2 changed files with 7 additions and 1 deletions

View File

@ -56,8 +56,12 @@ void scan_record_parse(scan_record_t* record, const uint8_t* eir_data, uint8_t e
data_len = field_len - 1;
switch (eir_data[1]) {
case BT_EIR_UUID16_INCOMPLETE:
case BT_EIR_UUID16_COMPLETE:
case BT_EIR_SVC_DATA_16:
record_parse_uuid16(record, data, data_len);
if (data_len >= 2) {
record_parse_uuid16(record, data, data_len);
}
break;
/* TODO: handle other eir data */

View File

@ -19,6 +19,8 @@
#include <stdbool.h>
#include <stdint.h>
#define BT_EIR_UUID16_INCOMPLETE 0x02 // 16-bit UUID, more available
#define BT_EIR_UUID16_COMPLETE 0x03 // 16-bit UUID, all listed
#define BT_EIR_SVC_DATA_16 0x16 // 16-bit UUID
typedef struct {