KB: How to read the command of HCI of DTM

Question

What is the procedure for reading the HCI command of DTM?

Answer

The following example shows how to read the RESET command. (For more examples, refer to Bluetooth Core v5.2.)

HCI_RESET

This transfers the command to 00000001 00000011 00001100 00000000, since the command format follows the reference below:

hci_command_packet

The first part of the command is the OCF = 0x03, and the rest is OGF = 0x03. By checking in Bluetooth Core v5.2 as below, we can see that this command is HCI_Reset:

OGF OCF

Hi snow.yang:
Can you provide HCI set Advertising Parameter Command? thank you.

ex:
image

I have tried to set the Advertising Parameters,
OGF = 0x08, OCF = 0x06
(OGF 6 bit)001000 << 10 | (OCF 10 bit)0000000110
opcode: 0x2006 (I’m not sure right.)
Advertising_Interval_Min &Max : 50 ms (0x0050)
Advertising_Type: 0x00
Own_Address_Type:0x00
Peer_Address_Type:0x00
Peer_Address: 66:66:66:66:66:66
Advertising_Channel_Map: 0x07
Advertising_Filter_Policy:0x00

The final is error message.
image
I don’t understand where wrong.

Hi,Ji-Liang.
if OGF = 0x08, OCF = 0x06
the opcode should be 0x0620

Hi snow.yang.
Return ParametersL Status is 0x12
image
The final is error message.

Hi, @Ji-Liang this means our HIC_APP sample now didn’t support this command. if you want to use it, you should modify our code by yourself. Thanks