1 Reply Latest reply on Nov 18, 2020 12:47 AM by AnjanaM_61

    How to change power level in bluetooth RF hci commands testing commands


      Could you please explain us with an example for how to change the power level using the below commands,




      hcitool -i hci0 cmd 0x03 0x003


      hcitool -i hci0 cmd 0x08 0x01E 0x00 0x25 0x00


      hcitool -i hci0 cmd 0x03 0x003


      I understood from some documents that 0x00 is frequency , 0x25 is length, and 0x00 is payload.


      But 0x08 0x01E represents ? I could see there is no parameter to change the power levels in these commands.

        • 1. Re: How to change power level in bluetooth RF hci commands testing commands

          Hi MaRa_4792956 ,


          hcitool (Linux tool) will format the packets in OCF and OGF rather than complete raw HCI packet.

          0x08 is OGF and 0x01E is the OCF of LE_Transmitter_Test command


          There is no Tx power parameter in LE_Transmitter_test command.

          If you want to change the Tx power, you may have to use HCI command for setting Tx power separately depending upon chip you are using. Can you please let us know which exact BT chip you are using and what is the exact requirement ? So that we can assist you.


          LE Transmitter Test


          The LE Transmitter Test configures the chip to send test packets at a

          fixed interval. External test equipment may be used to receive and analyze

          the reference packets.


          The channel on which the BT chip transmits the packets  is passed as a parameter. BLE devices use 40 channels, each of which is 2 MHz wide. Channel 0 maps to 2402 MHz and Channel 39 maps to 2480 MHz.


          The other two parameters specify the length of the test data and the data pattern to be used (see BLUETOOTH SPECIFICATION Version 4.1 [Vol 2], Section 7.8.29 for details).


          Usage: mbt le_transmitter_test <tx_channel> <data_length> <packet_payload>


              tx_channel = transmit frequency minus 2402 divided by 2. For example, if  the transmit frequency is 2404 MHz then the tx_channel = (2404 – 2402) / 2 = 1.

              The channel range is 0–39 (2402–2480 MHz).


              data_length = 0–37

              data_pattern = 0–7

                  0 = Pseudo-random bit sequence 9

                  1 = Pattern of alternating bits: 11110000

                  2 = Pattern of alternating bits: 10101010

                  3 = Pseudo-random bit sequence 15

                  4 = Pattern of all 1s

                  5 = Pattern of all 0s

                  6 = Pattern of alternating bits: 00001111

                  7 = Pattern of alternating bits: 0101



          The example below starts the test and instructs the device to transmit packets

          on Channel 2 (2406 MHz), with a 10-byte payload of all ones (1s).


          WICED-SmartReady-SDK\Tools\mbt\win32>mbt le_transmitter_test 2 10 4

          Sending HCI Command:

          0000 < 1E 20 03 02 0A 04 >

          Received HCI Event:

          0000 < 0E 04 01 1E 20 00 >



          The last byte of the HCI Command Complete event is the status of the operation,

          where 0 signifies the success. 



          BT RF HCI commands: HCI-Based Bluetooth Testing