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.

CC2564C: How to read existing Tx Power?

Part Number: CC2564C

Hi,

It would be very helpful if you can clarify following queries:

1. Is there any API to read existing BLE Tx power?

2. Please explain about the procedure for changing Tx power?

3. If we don't have access to current Power Level table, how do we extract that information?

Thanks,

Sneha

  • Hello Sneha,

    1. Can you please explain when exactly do you need this API?

    you can use:
    Send_HCI_LE_Read_Advertising_Channel_TX_Power
    Wait_HCI_Command_Complete_LE_Read_Advertising_Channel_TX_Power_Event 5000, any, HCI_LE_Read_Advertising_Channel_TX_Power, 0, 0x00

    2. There are no standard API's to change the TX power - can you elaborate why do you need that and i'll see if such an API exists.

    3. As mentioned above you can read the Advertising channel TX power.

    BR,
    Chen Loewy
  • 1. We want to know BLE Tx power of our device. Is there any restriction on checking/setting Tx power at any given time?

    2. We used HCI_LE_Read_Advertising_Channel_Tx_Power() to read current Tx level. Return value of Transmit_Power_LevelResult parameter was 4. As per BT spec, we believe it means that transmit power was 4dBm. Please confirm.

    3. We passed MaxPower as 0 to VS_Set_Max_Output_Power(). When we read back Tx power using HCI_LE_Read_Advertising_Channel_Tx_Power(), as expected, Transmit_Power_LevelResult returned 0. Does it mean that BLE Tx power level is set to 0dBm?

    4. Is there any way to set negative value (e.g. -23dBm) as BLE Tx power? ( description of VS_Set_Max_Output_Power says that 'The maximum output power is specified from 0 to 12'. Hence the question.)

    5. If we can simply use VS_Set_Max_Output_Power() to change Tx power, does it mean that GFSK power level vector doesn’t come into picture at all? Please clarify this.
  • Hello Sneha,

    We support the standard HCI API's.
    For anything VS - I will check what can and can't be done and get back to you on that one.

    BR,
    Chen
  • Hi Chen,

    Will wait for an update on things related to VS.
    Would you please provide inline answers to the questions from my previous post? That would help to understand clearly.

    Thanks,
    Sneha
  • Hello,

    It is bit urgent for us to get answers to above questions. We are relying on this forum to get proper information on time. Can anybody please help to clarify?
    Thanks in advance!

    -Sneha
  • Hello Sneha,

    Sorry for the time it took.

    In order to understand exactly what you are doing i will need the following from you please.

    1. The exact initscript you use.
    2. The exact xml you use.
    3. The exact commands you are sending

    I've went over your questions:

    1. We want to know BLE Tx power of our device. Is there any restriction on checking/setting Tx power at any given time?

    I can see an opcode that will enable you to set the TX POWER for the CC2564C -
    Send_HCI_VS_LE_Output_Power (which gets a power level index) - however for some reason the .xml i'm using doesn't support it - (you say you are using a different command VS_Set_Max_Output_Power() - is that the opcode you are using?

    2. We used HCI_LE_Read_Advertising_Channel_Tx_Power() to read current Tx level. Return value of Transmit_Power_LevelResult parameter was
    4. As per BT spec, we believe it means that transmit power was 4dBm. Please confirm.

    Yes it is.

    3. We passed MaxPower as 0 to VS_Set_Max_Output_Power(). When we read back Tx power using HCI_LE_Read_Advertising_Channel_Tx_Power(), as expected, Transmit_Power_LevelResult returned 0. Does it mean that BLE Tx power level is set to 0dBm?

    It seems that way - as you capped the max output power - however i will need the exact commands and files you are using.

    4. Is there any way to set negative value (e.g. -23dBm) as BLE Tx power? ( description of VS_Set_Max_Output_Power says that 'The maximum output power is specified from 0 to 12'. Hence the question.)

    5. If we can simply use VS_Set_Max_Output_Power() to change Tx power, does it mean that GFSK power level vector doesn’t come into picture at all? Please clarify this.
  • Hi,

    A few more details.

    We keep only one level for BLE - unlike BT.
    As BLE doesn't have a negotiation mechanism between two sides of a connection - so they can't ask to increase the output power or decrease it.

    You can set a negative power level.

    Chen Loewy
  • Hi Chen,

    We want BLE signal to be available only in ~50 cm (arbitrary value) radius from Source. That is why we want to keep BLE Tx power as low as possible. Our intention is to limit the distance between source and destination.

    Regards,

    Sneha

  • Hi Chen,

    I am not sure what initscript you are referring to. The SDK has exposed few commands to Application layer. Following are the  exact commands we are using:

    1. To set BLE Tx power ->

        Byte_t MaxPower = 0;

        unsigned int result = VS_Set_Max_Output_Power(btStackId(), MaxPower);

    2. To read current Tx power ->

        Byte_t status;

        Byte_t power;BTVSAPI.hHCIAPI.h

        unsigned int result = HCI_LE_Read_Advertising_Channel_Tx_Power(btStackId(), &status, &power);

    Please find attached SDK source files.

    Is MaxPower parameter, that is passed to VS_Set_Max_Output_Power(), a Power level Index or Tx Power value?

    If we can simply use VS_Set_Max_Output_Power() to change Tx power, does it mean that GFSK power level vector doesn’t come into picture at all? Please clarify this.

    Regards,

    Sneha

  • Hi Chen,

    Hope the attachments and commands have the information you were looking for. Do let me know if you need any other input from my side.

    Could you please reply to my previous post?

    Regards,

    Sneha

  • Hello Sneha,

    Yes the parameters there should set the max power.

    I will also loop in Vihang and Hari to check it - as i'm less familiar with the upper protocol stack API's

    and more with the HCI-API's.

    Chen

  • Thanks, Chen.
    Will wait for reply from Vihang/Hari.

    -Sneha
  • Sorry for the delay..

    Did, you try the HCI spec command:
    HCI_Read_Transmit_Power_Level

    Thanks
  • Hi Hari,

    As per your suggestion, I used HCI_Read_Transmit_Power_Level() . It is returning Transmit_Power_Level as 4dBm. 

    Then I used VS_Set_Max_Output_Power() to set Tx power level to 0 when headset was running. I was able to see that HCI_Read_Transmit_Power_Level() returned 0dBm as expected.

    In general, can we set Tx power to different value when Bluetooth chip is running? Is there any restriction related to changing Tx power?

    Our observation is, even when Tx power level was reduced from 4 to 0, mobile received the signal when it was kept at same distance from headset.

    Our expectation is : Mobile should not receive the signal if it is kept 'x' cm away from phone.

    Request you to provide the clarity on above mentioned questions and also on how to limit the distance/range of ble signal.

    Thanks,

    Sneha

  • Hi Sneha,

    Did you check the RSSI at the receiver end, for a fixed distance, between the different power levels? The difference in RSSI should closely correlate to the output power change of the transmitter.

    Of-course, the most accurate way to test the change in output power is to measure the output power with a spectrum analyzer for the two output power levels.

    Sneha Nayak said:
    In general, can we set Tx power to different value when Bluetooth chip is running? Is there any restriction related to changing Tx power?

    The output power change is followed by TCP calibration (which is a resource intensive task). Thus, it is best practice to update the output power during the device initialization before making any connections (and or starting LE advertisements or scans). This is more than convenient for pretty much all the use-cases I can imagine.

    Sneha Nayak said:
    Our expectation is : Mobile should not receive the signal if it is kept 'x' cm away from phone.

    Considering the receiver sensitivity and output power of the CC2564C as well as most modern phones, you might be looking at distance in tens meters even for the lowest output power allowed by BT spec (-20dBm). Like I mentioned above, the best way to measure the change in output power is with a spectrum analyzer.

    Best regards,

    Vihang