马上注册,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册 
×
BLE蓝牙向手机广播UUID是用哪个函数呀
uint8 pattern[] = {
0xa5,0xa5};
ConnectionBleAddAdvertisingReportFilter(ble_ad_type_complete_uuid16, sizeof(pattern), sizeof(pattern), pattern);
还是用: #define SPP_DEFAULT_CHANNEL (0x01) const uint8 spp_service_record[] = { 0x09, 0x00, 0x01, /* ServiceClassIDList(0x0001) */ 0x35, 0x03, /* DataElSeq 3 bytes */ 0x19, 0x11, 0x01, /* UUID SerialPort(0x1101) */ 0x09, 0x00, 0x04, /* ProtocolDescriptorList(0x0004) */ 0x35, 0x0c, /* DataElSeq 12 bytes */ 0x35, 0x03, /* DataElSeq 3 bytes */ 0x19, 0x01, 0x00, /* UUID L2CAP(0x0100) */ 0x35, 0x05, /* DataElSeq 5 bytes */ 0x19, 0x00, 0x03, /* UUID RFCOMM(0x0003) */ 0x08, SPP_DEFAULT_CHANNEL, /* uint8 Suggested RFCOMM channel for SPP */ 0x09, 0x00, 0x06, /* LanguageBaseAttributeIDList(0x0006) */ 0x35, 0x09, /* DataElSeq 9 bytes */ 0x09, 0x65, 0x6e, /* uint16 0x656e */ 0x09, 0x00, 0x6a, /* uint16 0x006a */ 0x09, 0x01, 0x00, /* uint16 0x0100 */ 0x09, 0x01, 0x00, /* ServiceName(0x0100) = "SPP Dev" */ 0x25, 0x07, /* String length 7 */ 'S','P','P',' ','D', 'e', 'v'
};
ConnectionRegisterServiceRecord(GetSppTask(), sizeof(spp_service_record), spp_service_record);
求大神解决UUID是怎么一回事,我试了两种方法,但IPHONE手机用lightblue收到的UUID都不是我设置的。 |