您好,我想在 advertData[]中添加自己的数据,比如温度、日期、电压等等,我想知道 advertData[]中哪些数据是必须的我必须保留?
我曾试过将 advertData[]中全部换成自己的数,发现最大有31个字节。期待TI专家的帮助,谢谢!
static uint8 advertData[] ={ // Flags; this sets the device to use limited discoverable
// mode (advertises for 30 seconds at a time) instead of general
// discoverable mode (advertises indefinitely)
//0x02, // length of this data
// GAP_ADTYPE_FLAGS,
// DEFAULT_DISCOVERABLE_MODE | GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED,
// service UUID
// 0x03, // length of this data
// GAP_ADTYPE_16BIT_MORE,
// LO_UINT16( THERMOMETER_SERV_UUID ),
// HI_UINT16( THERMOMETER_SERV_UUID ),
0x1E,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30
};
Yan:
advertising 数据是有一定合适要求的哦.
请看gap.h
看一下里面的 @defgroup GAP_ADTYPE_DEFINES GAP Advertisment Data Types
下面有类型定义. 注意看一下下面的类型定义哈.