This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WL1837MOD: BLE Testing with BlueZ stack - Rx and Tx testing with results

Part Number: WL1837MOD

Hi everyone,

I am using WL1837MOD and BlueZ stack with AM335x. I need to test LE for Rx and Tx with two units, transmitting packets from one and receiving from the other, and finally get a result of the amount of received and lost packets according to how many were sent from Tx. Also, I need perform this test sending data through a specific channel (0~39)

Two routes were tested to achieve the results:

1. For the above, I have tried with HCI commands extracted from Bluetooth Core 4.2 as shown below: 

Rx:  

hcitool -i hci0 cmd 0x08 0x001D 0x00 

 

Tx:  

hcitool -i hci0 cmd 0x08 0x001E 0x00 0x25 0x04 

Test End:

hcitool -i hci0 cmd 0x08 0x001F

Once I send the command to end the test, the command effectively returns to me the number of returned packets on the receiver side. However, I need to have control over what is sent, that is, I need to have a command that can limit the number of packages that are sent from the Tx unit.

2. I also tried commands taken from TI's wiki "WL18xx Bluetopia PM Bluetooth RF Testing" and later converted to HCI commands for use with BlueZ.

The commands used were: 

Send_HCI_VS_DRPb_BER_Meter_Start 0xFD8B, 0, 0, 0x222222222222, 1, 0x5, 339, 590, 0x1FF, 0x1

Send_HCI_VS_DRP_Read_BER_Meter_Status 0xFD5B

Send_HCI_VS_Write_BD_ADDR 0xFC06, BD_ADDR

Send_HCI_VS_DRPb_Enable_RF_Calibration_Enhanced 0xFDFB, 1, 0xFF, 0x00000000, 0x01

Send_HCI_VS_DRPb_Tester_Packet_TX_RX 0xFDCC, 0x5, 3, 2402, 0xFFFF, 5, 0, 339, 5, 1, 0x01FF

 

These commands return an error that appears in the Error Code table like this:

Question:

1. Do you know any HCI commands for Bluez that can help me to perform the tests mentioned in the introduction of this forum?

Related links:

https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=441541

https://processors.wiki.ti.com/index.php/WL18xx_Bluetopia_PM_Bluetooth_RF_Testing#Continuous_TX

Thanks in advance!

  • Did, you check the SS1tool/hcitool cmd conversion in the same document? Please, check section, "Conversion of HCI commands to SS1tool, hcitool format" in the attached pdf document.

    ThanksWL18xx Bluetopia PM Bluetooth RF Testing - Texas Instruments Wiki.pdf

  • Hi Hari, 

    yes, even for almost all commands I use the conversion. I tried to do the conversion to hcitool format but when I send these commands I receive the error code 11 (0x11 - the one related in point 2 of my first post).

    Here is an example taking the command: 

    Send_HCI_VS_DRPb_Tester_Packet_TX_RX 0xFDCC, 0x5, 3, 2402, 0xFFFF, 5, 0, 339, 5, 1, 0x01FF

    the OPCODE is 0xFDCC, to use it with hcitool format, we have OGF 0x3F and OCF 0x01CC for which I send the command and return this:

    After looking at the list of error codes in the Bluetooth Core 4.2 document, I find that a return of 0x11 corresponds to "UNSUPPORTED FEATURE OR PARAMETER VALUE (0x11) 

    Q1. Do you have any idea why I'm getting this error when I use the above command?

    Thanks!

  • I don't know why in my previous post the image didn't load correctly,

    so, the image with my command and the response is that:

     .

    Thanks!

  • You would need to provide the parameters as byte array for these commands.. Please, see below..

    (Send_HCI_VS_DRPb_Tester_Packet_TX_RX 0xFDCC, 0x5, 3, 2402, 0xFFFF, 5, 0, 339, 5, 1, 0x01FF)

    root@am335x-evm:~# hcitool -i hci0 cmd 0x3f 0x01cc 0x05 0x03 0x62 0x09 0xff 0xff 0x05 0x00 0x53 0x01 0x05 0x01 0xff 0x01          
    < HCI Command: ogf 0x3f, ocf 0x01cc, plen 14                                                                                      
      05 03 62 09 FF FF 05 00 53 01 05 01 FF 01                                                                                      
    > HCI Event: 0x0e plen 4                                                                                                          
      01 CC FD 00                                                                                                                    
    root@am335x-evm:~#

  • Thank you Hari, it solved the problem, but now I am trying to send the command:

    Send_HCI_VS_DRP_Read_BER_Meter_Status 0xFD5B and I am getting this response:

    root@phyboard-wega-am335x-3:~# hcitool -i hci0 cmd 0x3f 0x015b
    < HCI Command: ogf 0x3f, ocf 0x015b, plen 0
    > HCI Event: 0x0e plen 4
    01 5B FD 01

    0x01 is the error code: "UNKNOWN HCI COMMAND (0x01)". So, instead of this command, I am using:

    HCI_VS_DRP_Read_BER_Meter_Result (0xFD13)

    root@phyboard-wega-am335x-3:~# hcitool -i hci0 cmd 0x3f 0x0113
    < HCI Command: ogf 0x3f, ocf 0x0113, plen 0
    > HCI Event: 0x0e plen 15
    01 13 FD 00 01 A5 00 08 1E 01 00 27 01 00 00

    Return Parameters: 
    Status                                                     0x00
    Finished at least 1 test                           0x01
    Packets received                                    0xA5 0x00  (165)                                  
    Total bits counted                                   0x08 0x1E 0x01 0x00 (73224)
    Number of error bits found                     0x27 0x01 0x00 0x00 (295)

    I would like how to calculate BER and PER. I guess BER = Number of error bits found / Total bits counted, then BER = 295/73224, BER=0.4%

    Q1. Is it possible to use the command 0xFD13 instead of 0xFD5B?

    Q2. Is my understanding correct about BER? 

    Q3. How can I calculate PER?

     

    Thanks!