BLE HCI Application to set transmitter/receiver test commands

Document created by josem.reyes.chaidez Employee on Sep 15, 2016Last modified by josem.reyes.chaidez Employee on Mar 23, 2017
Version 6Show Document
  • View in full screen mode

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:

"<insllation_path>\KW40Z_Connectivity_Software_1.0.1\ConnSw\examples\bluetooth\hci_app"

 

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:

"<insllation_path>\MKW41Z_ConnSw_1.0.2\boards\frdmkw41z\wireless_examples\bluetooth\hci_black_box"

7 people found this helpful

Attachments

    Outcomes