如上面代码所示,我将广播名更改为了TEST,并且将tbl_scanRsp中的数据结构类型更改为了0xff,之所以这样更改是为了避免不同的软件出现不同的蓝牙名称。
汤勇,公众号:汤勇聊无线手把手教你:TLSR8258芯片上如何更改蓝牙广播名



/*** @brief BLE Advertising data*/const u8 tbl_advData[] = {5, DT_COMPLETE_LOCAL_NAME, 'T', 'E', 'S', 'T',2, DT_FLAGS, 0x05, // BLE limited discoverable mode and BR/EDR not supported3, DT_APPEARANCE, 0x80, 0x01, // 384, Generic Remote Control, Generic category5, DT_INCOMPLETE_LIST_16BIT_SERVICE_UUID, 0x12, 0x18, 0x0F, 0x18, // incomplete list of service class UUIDs (0x1812, 0x180F)};/*** @brief BLE Scan Response Packet data*/const u8 tbl_scanRsp [] = {8, 0xff, 'v', 'S', 'a', 'm', 'p', 'l', 'e',};
夜雨聆风