Bluetooth HCI command for enabling BLE advertising

2019-09-11 02:12发布

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条回答
Root(大扎)
2楼-- · 2019-09-11 02:33

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
查看更多
登录 后发表回答