微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > 射频无线通信设计 > CC2541如何在广播中带上service uuid以及characteristics的uuid和属性?

CC2541如何在广播中带上service uuid以及characteristics的uuid和属性?

时间:10-02 整理:3721RD 点击:
请问各位大侠,CC2541如何在广播中带上service uuid以及characteristics的uuid和属性?

广播的数据长度是有限制的,不一定能带上所有的
可修改的部分参考:
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 ),
};

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top