项目终于快结项了,闲下时间重新掰回light blue 。
Light Blue中的ADVERTISEMENT DATA,的所有信息都定义在 advertData和scanRspData中,只是获取的方式不一样罢了,一个是在广播时获取,一个是得到的扫描信息。
在Light Blue扫描到外设时,会出现0 Server,1 Server 。。。
是因为advertData中的
添加服务项在advertData中
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 ),
static const uint8 devInfoModelNumber[] = "Model Number";
// Serial Number String characteristic
static uint8 devInfoSerialNumberProps = GATT_PROP_READ;
static const uint8 devInfoSerialNumber[] = "Serial Number";
// Firmware Revision String characteristic
static uint8 devInfoFirmwareRevProps = GATT_PROP_READ;
static const uint8 devInfoFirmwareRev[] = "Firmware Revision";
// Hardware Revision String characteristic
static uint8 devInfoHardwareRevProps = GATT_PROP_READ;
static const uint8 devInfoHardwareRev[] = "Hardware Revision";
// Software Revision String characteristic
static uint8 devInfoSoftwareRevProps = GATT_PROP_READ;
static const uint8 devInfoSoftwareRev[] = "Software Revision";
// Manufacturer Name String characteristic
static uint8 devInfoMfrNameProps = GATT_PROP_READ;
static const uint8 devInfoMfrName[] = "Manufacturer Name";