HCI_EXT_SetRxGainCmd and HCI_EXT_SetTxPowerCmd


Has anyone tried these calls? I added the calls to the end of HCI_EXT_App_Init() in the HostTestApp demo project and the load hung. If I only call one of these calls, it doesn't matter which, than it works.

The only usage example is in the keyfob demo, but only the HCI_EXT_SetTxPowerCmd function is used.




3 Replies

  • Hi David,

    You should not experience that issue , have you done any other changes in the software? 

    Can you debug the code and see where it get hung?



    PS. Thank you for clicking  Verify Answer below if this answered your question!

  • In reply to Joakim Lindh:

    Hi Nick,


    Thanks for the quick response. I add the calls to the end of the HCI init function:


    void HCI_EXT_App_Init( uint8 task_id )


    Nothing else was changed. The load hangs but works normally if I comment out either call. I have not stepped the calls to see where it hangs yet. I will do that as soon as I have time.

    Another thing I noticed that increasing the Rx gain made absolutely no difference in the RSSI. I have observed the same result using BTool with the original binary - no difference in RSSI. One odd thing I did notice is that the Tx or Rx cmd issued from BTool never reach the application code. I had expect to reach HCI_EXT_App_ProcessEvent( ) and processExtMsg() but those cmds never reach the application code. Well, there is no code in the  application to handle Tx power or RX gain anyway.  So they must be terminated somewhere in the library.

    Any help would be greatly appreciated as I am tasked to evaluated the CC2540 for possible use in a range of the company's products.





  • In reply to David Wong89949:

    I guess it is irrelevant now but I just noticed a copy-paste error:

       HCI_EXT_SetRxGainCmd(HCI_EXT_TX_POWER_4_DBM); => This call should be to HCI_EXT_SetTxPowerCmd instead

    Cheers :)