BLE HCI Application to set transmitter/receiver test commands

Showing results for 
Search instead for 
Did you mean: 

BLE HCI Application to set transmitter/receiver test commands

No ratings

BLE HCI Application to set transmitter/receiver test commands

HCI Application is a Host Controller Interface application which provides a serial communication to interface with the KW40/KW41 BLE radio part. It enables the user to have a way to control the radio through serial commands. In this section will be discussed how user could send serial commands to the KW40/KW41 device.

“HCI app” file is given to test the BLE functionality. User needs to open the COM port with the configuration 115200 8N1N. Then, it is needed to send commands in Hex format, user can make use of Docklight application. Once HCI application is downloaded to the board, next steps need to be followed:


  1.       Open the COM port.
  2.       Send the next command in Hex format “01 03 0C 00”. It is to perform a Reset to the radio.
  3.       Send the next command in Hex format “01 1E 20 03 26 20 00”. It is to set the radio in Transmit test mode. The number 26 specifies the number of the channel in which user wants to see the signal(valid range is from 0x00 to 0x27, this means from BLE Channel 0 to BLE Channel 39). Number 00 specifies the type of the signal that will be sent, in this case, it is a PBRS9 format. (valid range are from 0x00 to 0x07). Refer to the next table to know the meanings of each type of signal.  Finally, 20 is the number that specifies the length that will be sent in the packet or the payload, in this case, it is configured to 20 (32 bytes), VALID RANGE is from 0x00 to 0x25.
  4.       In order to set the radio in Receiver Test Mode. The next command in hex format need to be used "01 1D 20 01 04", this command means that radio would be listening in channel 04. Hence, values "01 1D 20 01" is the command to set the radio in Rx mode, the last value "04' defines the channel in which device is going to listen. As an additional example, if channel 06 is desired, command "01 1D 20 01 06" should be used.  


If there is a need to change the output power of the radio. The NXP connectivity software provides the Controller_SetTxPowerLevel() which is called inside of the Controller_TaskInit()Controller_SetTxPowerLevel() function make use of the following defines to determine the default power output in the application:


mAdvertisingDefaultTxPower_c and mConnectionDefaultTxPower_c. The value range for both is from 0 to 31. The range might be different for each device, so, it needs to be corroborated. This range is applicable only for KW41Z device. For example, for KW40Z, range is from 0 to 15.  


The defines are defined in the file ble_controller_task_config.h.

Finally, HCI applications can be found in the connectivity software package of your desired device.

If the KW40Z is the device under test (DUT), the HCI application is called "hci_app", it can be found in the next path:



If the KW41Z is the device under test (DUT), the HCI application is called "hci_black_box", it can be found in the next path:




I'm working with the KW30Z chip set, is the hci_app compatible with this chip set?


Hi Josh, I hope you're doing well!

hci_app is compatible with the KW30Z chipset, you can find the Connectivity Software in this page here.

You can find the hci_app example project in the following path after installing the Connectivity Software:

To use the test tool, could you please take a look at this document?

Best regards,



Thanks for the response! I have a board where the main MCU is the MK22FN512VLL12 and I have the KW30Z as an auxiliary chip that just manages BLE. I've programmed the KW30Z with the hci_app with no problems. I'm having trouble finding documentation on hci commands to send to the KW30Z over serial from the main MCU. Could you give me some direction please?



hi miguel,

can you tell me  parameter tx_power's range in HCI_VENDOR_CONFIG_TX_POWER command?




New Bitmap Image.bmp

Version history
Revision #:
1 of 1
Last update:
‎09-15-2016 09:42 AM
Updated by: