|
楼主 |
发表于 2013-11-22 21:44:41
|
显示全部楼层
/*让设备可搜索并可见*/
ConnectionWriteScanEnable(hci_scan_enable_inq_and_page); 这个函数是用在BR上的,蓝牙2.0,3.0可见
但不懂BLE是怎么上IPHONE5搜索到的,我调用了以下函数,但IPHONE还是搜索不到
uint8 pattern[] = {
ble_ad_type_ssp_oob_class_of_device,
ble_ad_type_complete_uuid16,
ble_ad_type_complete_local_name,
ble_ad_type_service_16bit_uuid};
bool ret;
ret = ConnectionBleAddAdvertisingReportFilter(BLE_FLAGS_GENERAL_DISCOVERABLE_MODE ,
sizeof(pattern), sizeof(pattern), pattern);
DEBUG(("xxxxxxxxxxxxxxx:%d",ret));
ConnectionDmBleSetAdvertisingParamsReq( ble_adv_ind,TRUE,BLE_ADV_CHANNEL_ALL,0 );
ConnectionDmBleSetAdvertiseEnable(TRUE); |
|