HCI_UART sample, Enabling DTM cannot configure tx power through hci command

Hi

   Based on NCS 2.3.0,I started by referencing this link and compiling it using the relevant configuration How to setting TX power through HCI command? - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)

Add the below setting on "prj.conf" and re-build the project.

CONFIG_BT_HCI_VS=y

CONFIG_BT_HCI_VS_EXT=y

CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y

CONFIG_BT_HCI_RAW_CMD_EXT=y

CONFIG_BT_CTLR_SET_HOST_FEATURE=y

Run command: hcitool -i hci0 cmd 0x3f 0x000e 0x00 0x00 0x00 -8, set TX power Success

Execute the following command and btmon results:

hcitool cmd 0x08 0x0007
< HCI Command: ogf 0x08, ocf 0x0007, plen 0
> HCI Event: 0x0e plen 5
  01 07 20 00 F8
  
btmon
@ RAW Open: hcitool (privileged) version 2.22                                                                                                                           {0x0004} [hci0] 6.431766
< HCI Command: LE Read Advertising Channel TX Power (0x08|0x0007) plen 0                                                                                                      #1 [hci0] 6.434787
> HCI Event: Command Complete (0x0e) plen 5                                                                                                                                   #2 [hci0] 6.440189
      LE Read Advertising Channel TX Power (0x08|0x0007) ncmd 1
        Status: Success (0x00)
        TX power: -8 dbm (0xfffffff8)
@ RAW Close: hcitool   

To conduct Direct Test Mode (DTM) HCI testing, add configuration:

CONFIG_BT_LL_SW_SPLIT=y
CONFIG_BT_LLL_VENDOR_NORDIC=y
rebuild
Run command: hcitool -i hci0 cmd 0x3f 0x000e 0x00 0x00 0x00 -8, set TX power Success
Execute the following command and btmon results:
hcitool cmd 0x08 0x0007 
< HCI Command: ogf 0x08, ocf 0x0007, plen 0
> HCI Event: 0x0e plen 5
  01 07 20 00 00
  
  

btmon
@ RAW Open: hcitool (privileged) version 2.22                                                                                                                           {0x0003} [hci0] 6.625427
< HCI Command: LE Read Advertising Channel TX Power (0x08|0x0007) plen 0                                                                                                      #1 [hci0] 6.625593
> HCI Event: Command Complete (0x0e) plen 5                                                                                                                                   #2 [hci0] 6.630707
      LE Read Advertising Channel TX Power (0x08|0x0007) ncmd 1
        Status: Success (0x00)
        TX power: 0 dbm (0x00)
@ RAW Close: hcitool
After adding DTM related configurations, the command to set TX power did not take effect. I would like to know the reason and if there is a way to perform DTM testing and set TX power simultaneously
Thanks
Parents Reply
  • Hi Shi, 
    Thanks for the info. 
    My understanding is that the Nordic controller doesn't support DTM directly on the controller. 
    You would need to use DTM sample to do Direct test. 

    The reason tx power can not be configured when you do DTM direct on the controller is most likely you were using the vendor specific HCI command to control TX Power that only works on Nordic Controller not the Zephyr controller. 

    But my understanding is that you can set the TX Power with the DTM command, you don't need to set it using the HCI command. I'm looking at the dtm_set_txpower() in the dtm sample. 

Children
No Data
Related