TI中文支持网
TI专业的中文技术问题搜集分享网站

求助:Observe如何获取Peripheral广播中的数据?

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, to notify central devices what services are included
// in this peripheral
0x03, // length of this data
GAP_ADTYPE_16BIT_MORE, // some of the UUID's, but not all
LO_UINT16( SIMPLEPROFILE_SERV_UUID ),
HI_UINT16( SIMPLEPROFILE_SERV_UUID ),

};

如上述是从机的广播数据,我如何在Observe中获取它的信息呢?Observe中的这个数组simpleBLEDevList,只找到获取addr,求解答,谢谢

Kevin Wang2:

回复 Yan:

谢谢YAN,帮我解决苦恼很久的问题,另外还想问一下,*pEvtData接收到的是advertData数组内的所有数据吗,还是有具体的函数对*pEvtData进行处理,期待您的解答。

Hui Chen4:

回复 Yan:

请问,广播的数据,可以随时改变吗?我想一广播的形式传信息,不知道怎么随时更改广播数据。

Yan:

回复 Hui Chen4:

Hui,

可以随时修改广播数据。

可以修改 scanRspData[] 和 advertData[] 来实现。

赞(0)
未经允许不得转载:TI中文支持网 » 求助:Observe如何获取Peripheral广播中的数据?
分享到: 更多 (0)