BLE HCI Application to set transmitter/receiver test commands

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

BLE HCI Application to set transmitter/receiver test commands

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.
    163849_163849.pngtx_test_parameter.png
  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"

コメント

Hi,

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

Thanks!

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:
<C:\Freescale\KW40Z_Connectivity_Software_1.0.1\ConnSw\examples\bluetooth\hci_app>

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

Best regards,

Sebastian

Sebastian,

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?

Thanks!,

Josh

hi miguel,

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

thanks.

 

 

New Bitmap Image.bmp

Hi @EverettRao , 

The format of the command in the xml file is wrong. 

Please update the XML file for this command as below:

<Vendor_Commands>
<GroupDesc>Vendor_Commands</GroupDesc>
<Cmd>
<CmdName>HCI_VENDOR_CONFIG_TX_POWER</CmdName>
<CmdDesc>HCI_VENDOR_CONFIG_TX_POWER Desc. OgB: FD OcB: 2D </CmdDesc>
<CmdSync>01</CmdSync>
<CmdHeader>3F 012D</CmdHeader>
<CmdParms>
<Parm>
<ParmName>tx_power</ParmName>
<ParmDesc>tx_power Desc</ParmDesc>
<ParmSize>1</ParmSize>
<ParmType>tInt</ParmType>
<ParmLastValue>00</ParmLastValue>
<ParmDefaultValue>00</ParmDefaultValue>
</Parm>
<Parm>
<ParmName>Channel</ParmName>
<ParmDesc>type Desc</ParmDesc>
<ParmSize>1</ParmSize>
<ParmType>tInt</ParmType>
<ParmLastValue>00</ParmLastValue>
<ParmDefaultValue>00</ParmDefaultValue>
</Parm>
<Parm>
<ParmName>NotUsed</ParmName>
<ParmDesc>Not Used</ParmDesc>
<ParmSize>2</ParmSize>
<ParmType>tInt</ParmType>
<ParmLastValue>00</ParmLastValue>
<ParmDefaultValue>00</ParmDefaultValue>
</Parm>
</CmdParms>
</Cmd>
</Vendor_Commands>

On TestTool, you should see something like this:

ovidiu_usturoi_0-1622131163866.jpeg

As parameters, there are 2 options for the channel:

  • 0x00 – advertising channel;
  • 0x01 – connection channel;

And the tx_power is the level in dbm.  If you put a value > 20 you will receive COMMAND_DISALLOWED_ERROR.

Regards,

Ovidiu

評価なし
バージョン履歴
最終更新日:
‎09-15-2016 09:42 AM
更新者: