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.

About hciStatus_t HCI_EXT_NumComplPktsLimitCmd ( uint8 limit, uint8 flushOnEvt )

Other Parts Discussed in Thread: CC2540

Hi

I want to use HCI_EXT_NumComplPktsLimitCmd() to comfirm the number of packet that had been successfully recived by peer device.where i can find the corresponding event:HCI_VendorSpecifcCommandCompleteEvent in source code?shown me  example,i use ble stack v1.4.0,Peripheral role.i want to know the detial about HCI_EXT_NumComplPktsLimitCmd() as well. thanks in advance.

  • Hello. We do not have this documented for 1.4.0 and it is rather complicated. I would recommend updating to 1.4.1 which has a much better solution and documentation. This is described in section 5.6 of the software developer's guide included with the installer.
  • Hi

    Thanks for your reply,i really appreciate that.i am confused about your replay that "We do not have this documented for 1.4.0 and it is rather complicated".i can find this command in document:TI_BLE_Vendor_Specific_HCI_Guide in BLE Stack 1.4.0 installer. this command should be supported by BLE Stack 1.4.0? so i called this command in application.then i connect device,sent out some data.according to the say in TI_BLE_Vendor_Specific_HCI_Guide,"When  the  HCI_EXT_NumComplPktsLimitCmd  has  completed,  a  vendor  specific  Command Complete event shall be generated." but i did't recived that. below is my code.

    something i wrong? i also try the other HCI Extension Vendor Specific Commands. like:HCI_EXT_HaltDuringRfCmd(HCI_EXT_HALT_DURING_RF_DISABLE ), HCI_EXT_SetTxPowerCmd( LL_EXT_TX_POWER_4_DBM ),etc.i also did't recived the corresponding event in my code.could you show me example? thanks a lot.

  • add: i use a single-chip configuration in cc1540,not a network processor configuration. the role is periphal.
  • cc2540,a mistake.
  • The command is supported. There is no documentation for adding the ability to receive HCI Vendor specific events (such as num completed packet events) in the application.
  • Thanks a lot.that's too bad for me.what about the BLE stack 1.4.1? the ability to receive HCI Vendor specific events  in the application is described in section 5.6 of the software developer's guide included with BLE stack 1.4.1 installer? if i update to BLE stack 1.4.1, can i recive those events? if not,there are other methods achive the data flow control from host to controller? i need to achive this situation:the slave sent out data to master(via notification,not indication).during data communication, the maste can't recive the data sent out by slave for some reasion(go beyond vaild range,distraction,etc)so that the connection is drop(the hci buffer will be freed).then when reconnection,the slave need to know the number of data that master had been recived successfully.so the slave can locate the rest of data that not successfully recived by master.

  • Yes, if you upgrade to 1.4.1, this is straightforward and is documented in the SDG.
  • Hi

    I had upgraded to BLE stack 1.4.1. now i can recive the Vendor Specific Events after i call the Vendor Specific Commands.but the BT event like Number Of Completed Packets,event code is 0x13,i can't recive when the slave sent out some data to master after connecting. 

    belowing is my code:

    static void gapRole_ProcessOSALMsg( osal_event_hdr_t *pMsg )
    {
      switch ( pMsg->event )
      {
        case HCI_GAP_EVENT_EVENT:

        if ( pMsg->status == HCI_NUM_OF_COMPLETED_PACKETS_EVENT_CODE )
          {         
            static hciEvt_NumCompletedPkt_t *pPktNumComp;
            pPktNumComp = (hciEvt_NumCompletedPkt_t *)pMsg;
            static uint16 ConnectionHandleArray[3];
            static uint16 NumCompletedPacketsArray[3];
            ConnectionHandleArray[0] = *pPktNumComp->pConnectionHandle;
            ConnectionHandleArray[0] = *pPktNumComp->pNumCompletedPackets;
          }

       break;

           .

           .

           .

           .

    }

    there is wrong with me?

    i had read the document of OverlappedProcessing, it says that: By default, the controller will send a numberOfCompletedPackets event back to the host for every single comlpeted packet. in my code,i don't call the hciStatus_t HCI_EXT_NumComplPktsLimitCmd ( uint8 limit, uint8 flushOnEvt ). so,i should recive the Number Of Completed Packets event. somethings i miss? how i can recive the recive the Number Of Completed Packets event? please help me.

  • The HCI_EXT_NumComplPktsEvt will only be returned to the application if it is calling HCI_SendDataPkt() directly. If any type of ATT / GATT procedure is used, the HCI_EXT_NumComplPktsEvt will be consumed by the host and never returned to the application.
  • Hi

    Oh,I see.because the slave sent out  data to master with notification(ATT / GATT procedure) ,so i can't recive this event .one more thing that i want you comfirm me is that whether i am able to calling HCI_SendDataPkt() directly in application to sent out data,if i don't use notification(ATT / GATT procedure). if the answer is yes,how can i do or something i need to know about HCI_SendDataPkt(),this API i have found it in hci.h.Thank you for your help.it really help me a lot.

    PS:whether the indication (ATT / GATT procedure) can use in HIDEmuKbd project? in the HIDS_SPEC_V10,i can't find it.

    or are there projects based on HOGP and Indication ( GATT Sub-Procedure )?

  • Hi

    i am sorry to bother you,above question is important to me,please help.

  • Hi

    i am sorry to bother you,above question is important to me,please help.

  • Hello. My previous post is incorrect. You will not receive the numOfCompletedPacketsEvt in the application when using HCI_SendDataPkt(). See this thread for more information: e2e.ti.com/.../1643403
  • Thanks for your notification.