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.

Linux: Regarding bluetopia binaries

Other Parts Discussed in Thread: WL1831

Tool/software: Linux

Hi ,

I am using TI Bluetooth Stack for WL18xx and using the LinuxIbeaon binary. I am able to configure the UUID, Major, Minor and Txpower successfully but after changing the txpower there is no effect on the range, the range is same in all cases.

SetIbeaconTxPower 0xF8

SetIbeaconTxPower 0xFC

SetIbeaconTxPower 0x04

SetIbeaconTxPower 0x02

Please look into this as soon as possible.

Thank you

  • Hi Samiksha,

    Could you give more detailed description about the issue? Could you add steps which you done and what do you expect to do?

    BR
    Tsvetolin Shulev
  • Thanks Tsvetolin for your quick response.

    The scenario is that i am creating an beacon here by using TI Bluetopia Stack for WL18xx. For this i am using LinuxIbeacon binary and able to configure major, minor, uuid and tx power successfully.
    I am using TI wl1831 module that have both wifi and bluetooth on single chip.

    These are the steps that i have done----

    1.Compile Bluetopia stack for our setup.
    2.Run SS1BTPM binary in background.
    3.Then Run LinuxIBeacon binary and use its API-
    i. SetDevicePower 1
    ii. SetIbeaconUUID 12345678-1234-1234-1234567890123456
    iii. SetIbeaconMajor 2345
    iv. SetIbeaconMinor 9874
    v. SetIbeaconTxPower 2
    vi. StartAdvertising 60

    But after configuring txpower i am not able to change the beacons range. I have tried by setting different txpower but the beacon broadcasting range is similar in all case.

    Thanks.
  • Samiksha,

    Now I understanding the whole picture. But the issue is not related to the Linux kernel but it is specific for WL18xx and Bluetopia stack. Therefore I'm moving the thread in the Dual Mode Bluetooth E2E forum section.

    BR
    Tsvetolin Shulev
  • Hi Tsvetolin,

    we are not getting any reply from the dual mode bluetooth forum. Can you please help?
  • Hi,

    Your query has been assigned to a relevant expert. We will get back to you soon.

    Best regards,
    Vihang
  • Hi Samiksha,

    After doing some digging, the IBeacon application/profile does not have the capability to change the output power of the Bluetooth radio. The TX power value is usually calibrated once from a distance of 1m from the connected device (Cellphone/tablet/etc) and an algorithm is used to estimate the distance between the two devices based on the calibrated value and the current RSSI.

    The following specification from apple may shed further insight onto the topic:

    https://developer.apple.com/ibeacon/Getting-Started-with-iBeacon.pdf

    The BLE output power can be changed through HCI commands in your application, or through the BTS script. The current application simply changes the output power string in the advertising packet.

    As a start, you can change the output power by using the HCI_VS_DRPb_Set_Power_Vector HCI command, for which the information about parameters and return values can be found on page 39 of the Vendor-Specific HCI Commands User's Guide.


    www.ti.com/.../swru442a.pdf

    Please see question 8 within the Wilink8 BLE facts for more information: processors.wiki.ti.com/.../WiLink_FAQ

    Best,
    Alexander

  • Thanks Alexander for your response.

    Now, we are following the HCI_VS_DRPb_Set_Power_Vector HCI command at page 39 in swru442a.pdf for setting power level using SS1Tool.

    After converting the VS command in SS1Tool format, we have run Low power vector table, High power vector table commands and class 2 power vector commands for setting power level 6 and then run TPC commands.

    And then using StartAdvertising API in LinuxIbeacon binary for advertising and check with spectrum analyzer, does not any changes in power.

    I have also attached cmd.txt file that have VS command in SS1Tool format and SS1Tool_logs.txt file for the SS1Tool command o/p that we have run on the chip.

    Thanks.

    root@TI:~# ./SS1BTPM &
    [1] 327
    root@TI:~# 
    root@TI:~# 
    root@TI:~# 
    root@TI:~# ./SS1Tool cmd 0x3F 0x182 0x00 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    echo 13 > /sys/class/gpio/export
    echo out > /sys/class/gpio/gpio13/direction
    echo 0 > /sys/class/gpio/gpio13/value
    echo 1 > /sys/class/gpio/gpio13/value
    echo 0 > /sys/class/gpio/gpio13/value
    echo 1 > /sys/class/gpio/gpio13/value
    BT COMM PORT (/dev/ttymxc1): 1
    Changing HCI baud rate to 3000000
    Status: Executing BTS Script /lib/firmware/TIInit_11.8.32.bts.
    Status: BTS Script successfully executed.
    < HCI Command: ogf 0x3F, ocf 0x0182, plen 12
      00 D3 DC E5 EE F7 00 0A 14 3F FF 00
    
    Device Powered On.
    DEVM>> HCI Event: 0x0e plen 4
      01 82 FD 00
    root@TI:~# ./SS1Tool cmd 0x3F 0x182 0x03 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    < HCI Command: ogf 0x3F, ocf 0x0182, plen 12
      03 D3 DC E5 EE F7 00 0A 14 3F FF 00
    > HCI Event: 0x0e plen 4
      01 82 FD 00
    root@TI:~# ./SS1Tool cmd 0x3F 0x182 0x04 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    < HCI Command: ogf 0x3F, ocf 0x0182, plen 12
      04 D3 DC E5 EE F7 00 0A 14 3F FF 00
    > HCI Event: 0x0e plen 4
      01 82 FD 00
    root@TI:~# ./SS1Tool cmd 0x3F 0x182 0x01 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    < HCI Command: ogf 0x3F, ocf 0x0182, plen 12
      01 D3 DC E5 EE F7 00 0A 14 3F FF 00
    > HCI Event: 0x0e plen 4
      01 82 FD 00
    root@TI:~# ./SS1Tool cmd 0x3F 0x182 0x02 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    < HCI Command: ogf 0x3F, ocf 0x0182, plen 12
      02 D3 DC E5 EE F7 00 0A 14 3F FF 00
    > HCI Event: 0x0e plen 4
      01 82 FD 00
    root@TI:~# ./SS1Tool cmd 0x3F 0x182 0x08 0xD9 0xE3 0xED 0xF7 0x01 0x0B 0x15 0x1F 0x3F 0xFF 0x00
    < HCI Command: ogf 0x3F, ocf 0x0182, plen 12
      08 D9 E3 ED F7 01 0B 15 1F 3F FF 00
    > HCI Event: 0x0e plen 4
      01 82 FD 00
    root@TI:~# ./SS1Tool cmd 0x3F 0x182 0x09 0xD9 0xE3 0xED 0xF7 0x01 0x0B 0x15 0x1F 0x3F 0xFF 0x00
    < HCI Command: ogf 0x3F, ocf 0x0182, plen 12
      09 D9 E3 ED F7 01 0B 15 1F 3F FF 00
    > HCI Event: 0x0e plen 4
      01 82 FD 00
    root@TI:~# ./SS1Tool cmd 0x3F 0x182 0x0A 0xD9 0xE3 0xED 0xF7 0x01 0x0B 0x15 0x1F 0x3F 0xFF 0x00
    < HCI Command: ogf 0x3F, ocf 0x0182, plen 12
      0A D9 E3 ED F7 01 0B 15 1F 3F FF 00
    > HCI Event: 0x0e plen 4
      01 82 FD 00
    root@TI:~# ./SS1Tool cmd 0x3F 0x182 0x0B 0xD9 0xE3 0xED 0xF7 0x01 0x0B 0x15 0x1F 0x3F 0xFF 0x00
    < HCI Command: ogf 0x3F, ocf 0x0182, plen 12
      0B D9 E3 ED F7 01 0B 15 1F 3F FF 00
    > HCI Event: 0x0e plen 4
      01 82 FD 00
    root@TI:~# ./SS1Tool cmd 0x3F 0x182 0x0C 0xD9 0xE3 0xED 0xF7 0x01 0x0B 0x15 0x1F 0x3F 0xFF 0x00
    < HCI Command: ogf 0x3F, ocf 0x0182, plen 12
      0C D9 E3 ED F7 01 0B 15 1F 3F FF 00
    > HCI Event: 0x0e plen 4
      01 82 FD 00
    root@TI:~# 
    root@TI:~# 
    root@TI:~# ./SS1Tool cmd 0x3F 0x187 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06
    < HCI Command: ogf 0x3F, ocf 0x0187, plen 10
      06 06 06 06 06 06 06 06 06 06
    > HCI Event: 0x0e plen 4
      01 87 FD 00
    root@TI:~# 
    root@TI:~# ./SS1Tool cmd 0x3F 0x1FB 0x00 0x00 0x08 0x00 0x00 0x01
    < HCI Command: ogf 0x3F, ocf 0x01FB, plen 6
      00 00 08 00 00 01
    > HCI Event: 0x0e plen 4
      01 FB FD 00
    root@TI:~# 
    root@TI:~# ./LinuxIBeacon 
    Trying to connect to server (0)...
    BTPM_Initialize() Success: 0.
    DEVM_RegisterEventCallback() Success: 5.
    
    ******************************************************************
    * Command Options: 
         1) SetDevicePower
         2) QueryDevicePower
         3) QueryLocalDeviceProperties
         4) SetLocalDeviceName
         5) SetLocalClassOfDevice
         6) SetIbeaconUUID
         7) SetIbeaconMajor
         8) SetIbeaconMinor
         9) SetIbeaconTxPower
        10) QueryIbeaconParams
        11) StartAdvertising
        12) StopAdvertising
        13) EnableBluetoothDebug
    *    Help, Quit. 
    ******************************************************************
    TI-BT>11 200
    
    
    Local Device Properties changed.
    TI-BT>
    LE Advertising Started.
    TI-BT>DEVM_StartAdvertising() Success: Duration 200 seconds.
    TI-BT>
    
    
    			Low Power Vector Table
    
    #Set BT BR (GFSK) LP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x00, -22.5 *2, -18 *2, -13.5 *2, -9 *2, -
    4.5 *2, 0 *2, 5 *2, 10 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x00 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    
    
    #Set BT LE (BLE) LP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x03, -22.5 *2, -18 *2, -13.5 *2, -9 *2, -
    4.5 *2, 0 *2, 5 *2, 10 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x03 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    
    
    #Set ANT LP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x04, -22.5 *2, -18 *2, -13.5 *2, -9 *2, -
    4.5 *2, 0 *2, 5 *2, 10 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x04 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    
    
    #Set BT BR EDR 2MB LP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x01, -25 *2, -20.5 *2, -16 *2, -11.5 *2, -7 *2, -
    2 *2, 3 *2, 8 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x01 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    
    #Set BT BR EDR 3MB LP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x02, -25 *2, -20.5 *2, -16 *2, -11.5 *2, -7 *2, -
    2 *2, 3 *2, 8 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x02 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    
    
    
    
    
    
    			High Power Vector Table
    
    
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 8, -19.5 *2, -14.5 *2, -9.5 *2, -
    4.5 *2, 0.5 *2, 5.5 *2, 10.5 *2, 15.5 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x08 0xD9 0xE3 0xED 0xF7 0x01 0x0B 0x15 0x1F 0x3F 0xFF 0x00
    
    
    
    #Set BT LE (BLE) HP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 9, -19.5 *2, -14.5 *2, -9.5 *2, -
    4.5 *2, 0.5 *2, 5.5 *2, 10.5 *2, 15.5 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x09 0xD9 0xE3 0xED 0xF7 0x01 0x0B 0x15 0x1F 0x3F 0xFF 0x00
    
    
    #Set ANT HP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 10, -19.5 *2, -14.5 *2, -9.5 *2, -
    4.5 *2, 0.5 *2, 5.5 *2, 10.5 *2, 15.5 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x0A 0xD9 0xE3 0xED 0xF7 0x01 0x0B 0x15 0x1F 0x3F 0xFF 0x00
    
    
    #Set BT BR EDR 2MB HP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 11, -22.5 *2, -18 *2, -13.5 *2, -9 *2, -
    4.5 *2, 0 *2, 5 *2, 10 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x0B 0xD9 0xE3 0xED 0xF7 0x01 0x0B 0x15 0x1F 0x3F 0xFF 0x00
    
    #Set BT BR EDR 3MB HP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 12, -22.5 *2, -18 *2, -13.5 *2, -9 *2, -
    4.5 *2, 0 *2, 5 *2, 10 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x0C 0xD9 0xE3 0xED 0xF7 0x01 0x0B 0x15 0x1F 0x3F 0xFF 0x00
    
    
    
    
    			Class 2 Power ROM Data
    
    Send_HCI_VS_DRPb_Set_Class2_Single_Power 0xFD87, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6
    
    ./SS1Tool cmd 0x3F 0x187 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06 0x06
    
    
    
    			Run TPC Calibration
    
    # Run TPC calibration to update the ACW (Amplitude Control Word) to the PA
    Send_HCI_VS_DRPb_Enable_RF_Calibration_Enhanced 0xFDFB, 0x00, 0x00000800, 0x01
    
    ./SS1Tool cmd 0x3F 0x1FB 0x00 0x00 0x08 0x00 0x00 0x01
    
    

  • Hi Samiksha,

    It looks like you're not issuing the HCI wait commands after changing each power vector. From page 39:

    Wait_HCI_Command_Complete_VS_DRPb_Set_Power_Vector_Event is called after each vector change.

    It may also be easier to work with the HCI Tester tool to perform these power changes within the bts script rather than the SS1Tool that way you can configure the power levels once and have it be persistent throughout all of your applications.

    The tool is located in the wireless tools package and can be downloaded from here:

    www.ti.com/.../wilink-bt_wifi-wireless_tools


    Best,

    Alexander

  • Thanks Alexander for your response.

    First we have tried with HCI Tester tool, when we use it we are facing some problem, we are not getting any incoming dump from chip.

    We have also post query related to this on TI forum .

    And we have tried also with commenting the baudrate in bts script and also done the port configuration for three wire.

    Our setup has imx6sl processor connected with TI wl1831 module and using USB to UART for running HCI Tester tool from Window7 to the targeted board but we are only getting below logs:

    13:00:54.242 Script Started: 
    13:00:54.242 --
    13:00:54.242 Packet "HCI_VS_Update_Uart_HCI_Baudrate", Opcode 0xff36
    13:00:54.242 Parameters:
    13:00:54.242 | Uart Baudrate : 0x002dc6c0
    13:00:54.242 --
    13:00:54.242 Outgoing Dump:
    13:00:54.242 0000: 01 36 ff 04 c0 c6 2d 00 .6....-.13:00:59.243 ERROR - Timeout waiting for event HCI_Command_Complete_VS_Update_Uart_HCI_Baudrate_Event
    13:00:59.243 ERRORed Line (21): Wait_HCI_Command_Complete_VS_Update_Uart_HCI_Baudrate_Event 5000, 0x00, 0xff36, 0x00
    13:00:59.247 --
    13:00:59.247 Script End

    Please correct me if i am wrong, Wait_HCI_Command_Complete_VS_DRPb_Set_Power_Vector_Event  command is used for checking whether the command is successfully run or not.

    Using SS1Tool we are getting the below log:

    ./SS1Tool cmd 0x3F 0x182 0x00 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    echo 13 > /sys/class/gpio/export
    echo out > /sys/class/gpio/gpio13/direction
    echo 0 > /sys/class/gpio/gpio13/value
    echo 1 > /sys/class/gpio/gpio13/value
    echo 0 > /sys/class/gpio/gpio13/value
    echo 1 > /sys/class/gpio/gpio13/value
    BT COMM PORT (/dev/ttymxc1): 1
    Changing HCI baud rate to 3000000
    Status: Executing BTS Script /lib/firmware/TIInit_11.8.32.bts.
    Status: BTS Script successfully executed.
    < HCI Command: ogf 0x3F, ocf 0x0182, plen 12
    00 D3 DC E5 EE F7 00 0A 14 3F FF 00

    Device Powered On.
    DEVM>> HCI Event: 0x0e plen 4
    01 82 FD 00

    After seen this logs, Hope it means that firstly this command run the bts script and then run HCI comand and we are also getting the HCI Event logs  

     HCI Event: 0x0e plen 4
    01 82 FD 00

    In this 00 means that command run successfull.

    Thanks.

  • Hi Samiksha,

    Thanks for generating those files, after looking through them It looks like you've set up your power tables correctly and you're also correct in the fact that the 00 return is a success indicator, so i'm not sure why this isn't working. When you're measuring the transmit power on the spectrum analyzer what output power level are you measuring?

    Also could you post your .bts script as well? Thanks


    Best,
    Alexander
  • Hi Samiksha,

    It seems as if you're using the default power vector values from the HCI user's guide, we tested the attached vectors to decrease the BLE output power by approximately 10 dBm and saw results. Could you try running those commands?

    Note only the BLE vectors were updated here:

    			Low Power Vector Table
    
    #Set BT BR (GFSK) LP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x00, -22.5 *2, -18 *2, -13.5 *2, -9 *2, -
    4.5 *2, 0 *2, 5 *2, 10 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x00 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    
    
    # Lowered by 10 dBm
    #Set BT LE (BLE) LP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x03, -22.5 *2, -18 *2, -13.5 *2, -9 *2, -
    4.5 *2, 0 *2, 5 *2, 10 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3f 0x0182 0x03 0xbf 0xc8 0xd1 0xda 0xe3 0xec 0xf6 0x00 0x3f 0xff 0x00 
    
    #Set ANT LP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x04, -32.5 *2, -28 *2, -23.5 *2, -19 *2, -
    14.5 *2, -10 *2, -5 *2, 0 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x04 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    
    #Set BT BR EDR 2MB LP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x01, -25 *2, -20.5 *2, -16 *2, -11.5 *2, -7 *2, -
    2 *2, 3 *2, 8 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x01 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    
    #Set BT BR EDR 3MB LP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x02, -25 *2, -20.5 *2, -16 *2, -11.5 *2, -7 *2, -
    2 *2, 3 *2, 8 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x02 0xD3 0xDC 0xE5 0xEE 0xF7 0x00 0x0A 0x14 0x3F 0xFF 0x00
    
    
    			High Power Vector Table
    
    
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 8, -19.5 *2, -14.5 *2, -9.5 *2, -
    4.5 *2, 0.5 *2, 5.5 *2, 10.5 *2, 15.5 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x08 0xD9 0xE3 0xED 0xF7 0x01 0x0B 0x15 0x1F 0x3F 0xFF 0x00
    
    # Lowered by 10 dBm
    #Set BT LE (BLE) HP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, -9, -29.5 *2, -24.5 *2, -19.5 *2, -
    14.5 *2, -0.5 *2, -5.5 *2, 20.5 *2, 5.5 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3f 0x0182 0x09 0xc5 0xcf 0xd9 0xe3 0xeb 0xf5 0x01 0x0b 0x3f 0xff 0x00 
    
    #Set ANT HP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 10, -19.5 *2, -14.5 *2, -9.5 *2, -
    4.5 *2, 0.5 *2, 5.5 *2, 10.5 *2, 15.5 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x0A 0xD9 0xE3 0xED 0xF7 0x01 0x0B 0x15 0x1F 0x3F 0xFF 0x00
    
    
    #Set BT BR EDR 2MB HP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 11, -22.5 *2, -18 *2, -13.5 *2, -9 *2, -
    4.5 *2, 0 *2, 5 *2, 10 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x0B 0xD9 0xE3 0xED 0xF7 0x01 0x0B 0x15 0x1F 0x3F 0xFF 0x00
    
    #Set BT BR EDR 3MB HP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 12, -22.5 *2, -18 *2, -13.5 *2, -9 *2, -
    4.5 *2, 0 *2, 5 *2, 10 *2, 0x3F, 0x00FF
    
    ./SS1Tool cmd 0x3F 0x182 0x0C 0xD9 0xE3 0xED 0xF7 0x01 0x0B 0x15 0x1F 0x3F 0xFF 0x00
    
    # Run TPC calibration to update the ACW (Amplitude Control Word) to the PA
    Send_HCI_VS_DRPb_Enable_RF_Calibration_Enhanced 0xFDFB, 0x00, 0x00000800, 0x01
    
    ./SS1Tool cmd 0x3F 0x1FB 0x00 0x00 0x08 0x00 0x00 0x01
    
    

    Best,
    Alexander

  • Hi Alexander,

    Thanks for your response.

    We did the following steps for configuring the power level for wl1831:

    1. Run ./SS1BTPM  &

    2.

    (i)For BLE in Low power vector

    Run ./SS1Tool cmd 0x3f 0x0182 0x03 0xbf 0xc8 0xd1 0xda 0xe3 0xec 0xf6 0x00 0x3f 0xff 0x00

    (ii)For BLE in High Power vector

    Run ./SS1Tool cmd 0x3f 0x0182 0x09 0xc5 0xcf 0xd9 0xe3 0xeb 0xf5 0x01 0x0b 0x3f 0xff 0x00

    (iii)Run TPC Calibration

    Run ./SS1Tool cmd 0x3F 0x1FB 0x00 0x00 0x08 0x00 0x00 0x01

    3. For continuous tx test:

    (i)Run Send_HCI_VS_DRPb_Enable_RF_Calibration_Enhanced 0xFDFB, 0x1, 0xFF, 0x00000000, 0x01

    (In SS1Tool format) -- ./SS1Tool cmd 0x3f 0x1ca 0x62 0x09 0x04 0x00 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

     

    Now we are getting change in txpower on different power level but if we are setting 5.5dbm(0x0B) on power level 7 in high power vector, we are getting only nearly -1.05dbm. There is huge power loss.

    Below are the power level that we have set 

    Powerlevel       power                           Getting power on spectrum(dbm)

    0              0xc5(-29.5dbm)              -29.4

    1              0xcf(-24.5dbm)                -27.7

    2              0xd9(-19.5dbm)               -24.7

    3              0xe3(-14.5dbm)               -20.01

    4              0xeb(-10.5dbm)               -16.4

    5              0xf5(-5.5dbm)                   -11.8

    6              0x01(0.5dbm)                     -5.96

    7              0x0b(5.5dbm)                    -1.05

    We have also tried with setting 11.5dbm on power level 7 and getting 5.16dbm on spectrum analyzer.

    Thanks for looking into this.

  • Hi Samiksha,

    The intended purpose for updating the power using these vendor specific commands is to execute them once after the init script has been run. It's not meant to be used to dynamically update the output power multiple times, as this may lead to the inaccuracy you're seeing in the Power Amplifier/internal calibration.

    As such, you should maintain the power vector after setting it once within your application, what is your intended use case?

    Best,
    Alexander

  • Hi Alexander,

    Thanks for your response.

    Now we are getting change in power at different power level. If we are setting 11.5dbm at power level 7, then we are getting near 9dbm channel power on spectrum analyzer so its OK for us.

    Our use case is to change txpower dynamically at specific interval after running init script.

    As you said earlier that Bluetopia's settxpower API can change power only in advertising packet, so what we did we have linked settxpower with SS1Tool and issue the VS commands for changing txpower and using StartAdvertising API for advertising.

    We issued the following commands to change the txpower and got the range at different power:

    1. Run SS1BTPM &

    2. Run ./LinuxIbeacon

    3.Initialize 1

    4.
    Low Power(BT LE)
    #Set BT LE (BLE) LP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 0x03, -21.5 *2, -17 *2, -12.5 *2, -8 *2, -3.5 *2, 1 *2, 5.5 *2, 10 *2, 0x3F, 0x00FF

    ./SS1Tool cmd 0x3F 0x182 0x03 0xd5 0xde 0xe7 0xf0 0xf9 0x02 0x0b 0x14 0x3F 0xFF 0x00

    5.Setting all power level to -15.5dbm.
    High Power(BT LE)
    #Set BT LE (BLE) HP Vectors Values (note the need to multiply the output power in dBm by '2'
    Send_HCI_VS_DRPb_Set_Power_Vector 0xFD82, 9, -15.5 *2, -15.5 *2, -15.5 *2, -15.5.5 *2, -15.5 *2, -15.5 *2, -15.5 *2, -15.5 *2, 0x3F, 0x00FF

    ./SS1Tool cmd 0x3F 0x182 0x09 0xe1 0xe1 0xe1 0xe1 0xe1 0xe1 0xe1 0xe1 0x3F 0xFF 0x00

    6.Run TPC calibration
    ./SS1Tool cmd 0x3F 0x1FB 0x00 0x00 0x08 0x00 0x00 0x01

    7.Run StartAdverting 100, with above power level we are getting approx range 7m.

    We ran step 5,6 and 7 for below High Power(BT LE) SS1Tool command for setting different power level and get the approx range.

    All power level set to -11dbm getting 10m after running step 7.
    ./SS1Tool cmd 0x3F 0x182 0x09 0xea 0xea 0xea 0xea 0xea 0xea 0xea 0xea 0x3F 0xFF 0x00

    Power level set to -6.5dbm getting 14m after running step 7.
    ./SS1Tool cmd 0x3F 0x182 0x09 0xf3 0xf3 0xf3 0xf3 0xf3 0xf3 0xf3 0xf3 0x3F 0xFF 0x00

    Power level set to -2dbm getting 16m after running step 7.
    ./SS1Tool cmd 0x3F 0x182 0x09 0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0xfc 0x3F 0xFF 0x00

    Power level set to 2.5dbm getting 19m after running step 7.
    ./SS1Tool cmd 0x3F 0x182 0x09 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x3F 0xFF 0x00

    Power level set to 7dbm getting 23m after running step 7.
    ./SS1Tool cmd 0x3F 0x182 0x09 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x0e 0x3F 0xFF 0x00

    Power level set to 11.5dbm getting 26m after running step 7.
    ./SS1Tool cmd 0x3F 0x182 0x09 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x3F 0xFF 0x00


    So by looking this, it means StartAdvertising API is always adverting with power level 7. So is this right?

    Is there any reference so that we can match the range?

    The range that we have got is approx not accurate. We are also using the FXP73 Blue diamond 2.4Ghz Band Antenna.

    Thanks for looking into this.
  • Hi Samiksha,

    Apologies for any confusion previous answers may have caused, but the power vectors are not intended to be changed dynamically. The variance in output power from that documented could be affected by this. They should be set once before program initialization and held constant throughout to allow the stack to shift between the different levels based on the master/slave's power needs.

    Best,
    Alexander
  • Thanks Alexander for your response.

    Actually we are using StartAdvertising API for advertising Ibeacon. This API advertise with 7th power level defined in power vectors. So we are changing the power vectors dynamically.

    We have gone through the StartAdvertising code and found that we are using DEVM_StartAdvertising() function for advertising.

    Is there any way by which we can use this StartAdvertising API for advertising with different power level?

    If we are changing the power vectors dynamically, is there any impact on wl1831 module?

    Thanks

  • Hi

    Any followup on this?