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: HCI commands to dynamically change Bluetooth power mode in Android

Part Number: WL1837MOD
Other Parts Discussed in Thread: WL1837, CC2564C

Hi,

We are using wl1837 chip with a i.MX6 based board running Android Marshmallow. We want to change bluetooth power mode dynamically with HCI commands. Our end goal is to reduce(or increase) the Bluetooth power consumption dynamically.

We have found the below user guide explaining about HCI opcodes and how to use it with HCI tester tool.

http://www.ti.com/lit/ug/swru442b/swru442b.pdf

How to use these HCI commands in Android to change the power modes dynamically? Or is there any other methods to implement our requirment?

Thank you,

Sandeep E

  • Did you try the vendor specific HCI commands?  This wiki refers to the CC2564C, but the same HCI commands can be used on the WL devices for BT.

    https://processors.wiki.ti.com/index.php/CC256x_VS_HCI_Commands#HCI_VS_DRPb_Set_Power_Vector_.280xFD82.29

    Regards,

    Travis

  • Hi Travis,

    Thanks for your response. I found these vendor specific HCI commands in the user guide which i mentioned in my issue.

    But, How to send these commands from Android(or Linux)  to the WL1837 chip?


    Thanks,
    Sandeep E

  • Well, if you are using Bluez or BluetopiaPM you can issue the commands from the linux console using 'ss1tool' or 'hcitool' respectively.. Please check below.. We, do not know how this could be accomplished in Android environment. Please check, Android's Bluedroid stack..

    Thanks

  • Hi all,

    We are trying to run continuous transmission test for BLE mode, But continuous transmission stops within few seconds while testing with spectrum analyzer.

    As per the below thread scan needs to be disabled while running continuous transmission test.

    https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/t/124304

    We are trying to disable BLE scan using HCI_LE_Write_Scan_Enable command in bts file. But bluetooth is not getting enabled with this configuration.


    How to test continuous transmission? Is there any other parameter to be configured?

    Any quick help is appreciated. Thanks in advance.

    Sandeep E

  • Did, you try issuing the page/scan disable from command line using SS1tool or hcitool, just before starting the continuous test? 

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

    Thanks

  • Hi Hari,

    We are working with Bluedroid. Unfortunately SS1tool and hcitool are not available.

    We also explored a bit of Bluedroid stack and It seams scan is not getting enabled.

    Following are the steps we use to start continuous test:

    1. Added Continuous transmission test commands in the end of bts file.

    2. Enable Bluetooth using bdt command(BluedroidTest).

    Is it the right way to start continuous transmission mode from bts file? Or Do we need to enable continuous transmission only after enabling bluetooth from bdt?

  • I will check, if by default scanning is enabled in the FW.. Can, you try explicitly disabling scanning in the BTS file, just before continuous TX command? Taking, bt snoop logs may also help to ensure that the Bludroid/Host is not issuing HCI scan enable command.

    Continuous TX

    This is a non-packet continuous transmission with either GFSK (BR), π/4-DQPSK (2-EDR) or 8DPSK (3-EDR). It can also be used with BLE and ANT modulations. Please refer to the Continuous_TX description above.

    The HCI commands to put the device in the Continuous TX mode (after service pack has been loaded) are:

    HCI Tester command format

    Send_HCI_Write_Scan_Enable 0x00
    Send_HCI_VS_DRPb_Enable_RF_Calibration_Enhanced 0xFDFB, 1, 0xFF, 0x00000000, 0x01
    Send_HCI_VS_DRPb_Tester_Con_TX 0xFDCA, 2402, 0x1, 0, 7, 0x00000000, 0x00000000
    

    Bluetopia PM SS1 Tool format

    SS1Tool cmd 0x03 0x001a 0x00 
    SS1Tool cmd 0x3f 0x01fb 0x01 0xff 0x00 0x00 0x00 0x00 0x01
    SS1Tool cmd 0x3f 0x01ca 0x62 0x09 0x01 0x00 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    

    {{#if: Having active Page and/or Inquiry scans running in parallel during RF tests, specially during Continuous TX tests, will cause the test signal to appear for a short period of time and the test signal will disappear on the next scan instance. This will appear as a burst rather than the Continuous TX. The BluetopiaPM enables both Page and Inquiry scans by default when the WL18xx device initializes. In order to avoid loosing the test signal after a short burst due to scan instances, the HCI_Write_Scan_Enable command must be issued before running the Continuous TX test using SS1Tool/hcitool|

    |}}NoteNote: {{#if: Having active Page and/or Inquiry scans running in parallel during RF tests, specially during Continuous TX tests, will cause the test signal to appear for a short period of time and the test signal will disappear on the next scan instance. This will appear as a burst rather than the Continuous TX. The BluetopiaPM enables both Page and Inquiry scans by default when the WL18xx device initializes. In order to avoid loosing the test signal after a short burst due to scan instances, the HCI_Write_Scan_Enable command must be issued before running the Continuous TX test using SS1Tool/hcitool|Having active Page and/or Inquiry scans running in parallel during RF tests, specially during Continuous TX tests, will cause the test signal to appear for a short period of time and the test signal will disappear on the next scan instance. This will appear as a burst rather than the Continuous TX. The BluetopiaPM enables both Page and Inquiry scans by default when the WL18xx device initializes. In order to avoid loosing the test signal after a short burst due to scan instances, the HCI_Write_Scan_Enable command must be issued before running the Continuous TX test using SS1Tool/hcitool

    }}

    Thanks