Bluetooth HCI command for enabling BLE advertising

烈酒焚心 提交于 2019-12-12 01:37:14

问题


I am currently trying to write some test scripts to get a bluetooth device fcc certified. I have been following these two sites http://processors.wiki.ti.com/index.php/CC256x_VS_HCI_Commands, http://processors.wiki.ti.com/index.php/WL18xx_Bluedroid_Bluetooth_RF_Testing. I've been using the later to convert commands from the former into tests that the bluedroid test tool will recognize. I have had success for the most part, but I need away to turn on BLE advertising mode and cannot find a way to do it. The bluetooth chip I am using is a Pan13xx from Panasonic. If anyone could point me in the right direction that would be amazing.

Thanks in advance.


回答1:


I haven't tried this, but according to the Bluetooth 4.2 spec (Vol 2, Part E, 7.8.9 Page 1284):

HCI_LE_Set_Advertise_Enable is the command for starting/stopping advertising.

It takes an Advertising_Enable parameter which is defined as:

  • 0x00: Advertising is disabled (default)

  • 0x01: Advertising is enabled.

  • 0x02 – 0xFF: Reserved for future use Value

and returns Status which is defined as:

  • 0x00: LE_Set_Advertise_Enable command succeeded
  • 0x01 – 0xFF: LE_Set_Advertise_Enable command failed


来源:https://stackoverflow.com/questions/39907675/bluetooth-hci-command-for-enabling-ble-advertising

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!