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.

CCS/LAUNCHXL-CC2640R2: HostTest GAP issue

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: CC2640R2F

Tool/software: Code Composer Studio

Hello,

I am evaluating CC2640R2F SDK 2.40 in HCI mode.The goal is to use the example host test in  (examples\rtos\CC2640R2_LAUNCHXL\ble5stack\host_test) to configured the CCR640R2F as extended scanner.

I am using the serial library of Python  to send  GAP commands and receive GAP events.

Plesae found the folowing configuration used:

2019-01-30 13:20:42,566 ::  -------------------------------------------------------------------------------
 @ TED command
   raw = [0x01, 0x1D, 0xFC, 0x01, 0x00]
   Opcode = 0xFC1D (HCIExt_ResetSystemCmd)
   Parameter Total Length = 0x1
   Type = 0x0

2019-01-30 13:20:42,572 ::  -------------------------------------------------------------------------------
 @ TED event
   raw = [0x04, 0xFF, 0x05, 0x1D, 0x04, 0x00, 0x1D, 0xFC]
   Event Code = 0xFF (HCI_VENDOR)
   Parameter Total Length = 0x5
   Subevent_Code = 0x41D (HCIExt_ResetSystemCmdDone)
   Status = 0x0
   CmdOpCode = 0xFC1D

2019-01-30 13:20:42,572 ::  -------------------------------------------------------------------------------
 @ TED command
   raw = [0x01, 0x00, 0xFE, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
   Opcode = 0xFE00 (GAP_DeviceInit)
   Parameter Total Length = 0x8
   profileRole = 0x8
   addrMode = 0x0
   ramdomAddr = 0x0

2019-01-30 13:20:42,579 ::  -------------------------------------------------------------------------------
 @ TED event
   raw = [0x04, 0xFF, 0x06, 0x7F, 0x06, 0x00, 0x00, 0xFE, 0x00]
   Event Code = 0xFF (HCI_VENDOR)
   Parameter Total Length = 0x6
   Subevent_Code = 0x67F (GAP_HCI_ExtentionCommandStatus)
   Status = 0x0 (Success)
   OpCode = 0xFE00
   DataLength = 0x0

2019-01-30 13:20:42,589 ::  -------------------------------------------------------------------------------
 @ TED event
   raw = [0x04, 0xFF, 0x2C, 0x00, 0x06, 0x00, 0xCF, 0xF6, 0x69, 0x22, 0x91, 0xB0, 0xFF, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x93, 0x31, 0x81, 0x12, 0x0A, 0xEF, 0x13, 0x03, 0x2A, 0x52, 0x80, 0x0E, 0x6D, 0x59, 0xC9]
   Event Code = 0xFF (HCI_VENDOR)
   Parameter Total Length = 0x2C
   Subevent_Code = 0x600 (GAP_DeviceInitDone)
   Status = 0x0 (Success)
   DevAddr = 0xB0912269F6CF
   DataPktLen = 0xFF
   NumDataPkts = 0x5
   IRK = [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0] [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
   CSRK = [0xF, 0x93, 0x31, 0x81, 0x12, 0xA, 0xEF, 0x13, 0x3, 0x2A, 0x52, 0x80, 0xE, 0x6D, 0x59, 0xC9] [15, 147, 49, 129, 18, 10, 239, 19, 3, 42, 82, 128, 14, 109, 89, 201]

2019-01-30 13:20:42,591 ::  -------------------------------------------------------------------------------
 @ TED command
   raw = [0x01, 0x57, 0xFE, 0x04, 0x00, 0x00, 0xC3, 0x00]
   Opcode = 0xFE57 (GapScan_setEventMask)
   Parameter Total Length = 0x4
   eventMask = 0xC30000

2019-01-30 13:20:42,595 ::  -------------------------------------------------------------------------------
 @ TED event
   raw = [0x04, 0xFF, 0x06, 0x7F, 0x06, 0x00, 0x57, 0xFE, 0x00]
   Event Code = 0xFF (HCI_VENDOR)
   Parameter Total Length = 0x6
   Subevent_Code = 0x67F (GAP_HCI_ExtentionCommandStatus)
   Status = 0x0 (Success)
   OpCode = 0xFE57
   DataLength = 0x0

2019-01-30 13:20:42,598 ::  -------------------------------------------------------------------------------
 @ TED command
   raw = [0x01, 0x55, 0xFE, 0x02, 0x06, 0x00]
   Opcode = 0xFE55 (GapScan_setParam)
   Parameter Total Length = 0x2
   scanParamId = 0x6 (DuplicateFilter)
   DuplicateFilter = 0x0

2019-01-30 13:20:42,602 ::  -------------------------------------------------------------------------------
 @ TED event
   raw = [0x04, 0xFF, 0x06, 0x7F, 0x06, 0x00, 0x55, 0xFE, 0x00]
   Event Code = 0xFF (HCI_VENDOR)
   Parameter Total Length = 0x6
   Subevent_Code = 0x67F (GAP_HCI_ExtentionCommandStatus)
   Status = 0x0 (Success)
   OpCode = 0xFE55
   DataLength = 0x0

2019-01-30 13:20:42,604 ::  -------------------------------------------------------------------------------
 @ TED command
   raw = [0x01, 0x53, 0xFE, 0x06, 0x01, 0x00, 0x20, 0x03, 0x20, 0x03]
   Opcode = 0xFE53 (GapScan_setPhyParams)
   Parameter Total Length = 0x6
   primPhy = 0x1
   scan_type = 0x0
   interval = 0x320
   window = 0x320

2019-01-30 13:20:42,608 ::  -------------------------------------------------------------------------------
 @ TED event
   raw = [0x04, 0xFF, 0x06, 0x7F, 0x06, 0x00, 0x53, 0xFE, 0x00]
   Event Code = 0xFF (HCI_VENDOR)
   Parameter Total Length = 0x6
   Subevent_Code = 0x67F (GAP_HCI_ExtentionCommandStatus)
   Status = 0x0 (Success)
   OpCode = 0xFE53
   DataLength = 0x0

2019-01-30 13:20:42,609 ::  -------------------------------------------------------------------------------
 @ TED command
   raw = [0x01, 0x51, 0xFE, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
   Opcode = 0xFE51 (GapScan_enable)
   Parameter Total Length = 0x6
   period = 0x0
   duration = 0x0
   max_number_of_records = 0x0

2019-01-30 13:20:42,617 ::  -------------------------------------------------------------------------------
 @ TED event
   raw = [0x04, 0xFF, 0x06, 0x7F, 0x06, 0x00, 0x51, 0xFE, 0x00]
   Event Code = 0xFF (HCI_VENDOR)
   Parameter Total Length = 0x6
   Subevent_Code = 0x67F (GAP_HCI_ExtentionCommandStatus)
   Status = 0x0 (Success)
   OpCode = 0xFE51
   DataLength = 0x0

2019-01-30 13:20:42,622 ::  -------------------------------------------------------------------------------
 @ TED event
   raw = [0x04, 0xFF, 0x07, 0x13, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00]
   Event Code = 0xFF (HCI_VENDOR)
   Parameter Total Length = 0x7
   Subevent_Code = 0x613 (GAP_AdvertiserScannerEvent)
   Status = 0x0
   event = 0x10000

2019-01-30 13:21:43,762 ::  -------------------------------------------------------------------------------
 @ TED command
   raw = [0x01, 0x52, 0xFE, 0x00]
   Opcode = 0xFE52 (GapScan_disable)
   Parameter Total Length = 0x0

2019-01-30 13:21:43,766 ::  -------------------------------------------------------------------------------
 @ TED event
   raw = [0x04, 0xFF, 0x06, 0x7F, 0x06, 0x12, 0x52, 0xFE, 0x00]
   Event Code = 0xFF (HCI_VENDOR)
   Parameter Total Length = 0x6
   Subevent_Code = 0x67F (GAP_HCI_ExtentionCommandStatus)
   Status = 0x12 (Invalid HCI Command Parameters)
   OpCode = 0xFE52
   DataLength = 0x0

The issue that during 1 minute no GAP_Advertiser/Scanner_Event recived with type "GAP_EVT_ADV_REPORT" even if the sniffer show ADV packets in the air.

I am missing something?

  • Hello TAHIRI Amina,
    I will take a look at it, I need to set up the environment, so it might take some time.
    Did you find a template for this in our SDK or did you make it yourself?
  • Hello Eirik,

    I find the project host_test in your SDK 2.40 and I used as it is without any change to commubnicate through the serial interface (UART ) using the Host Controller Interface (HCI) protocol.
    I used Python serial to write and read through this serial.


    Best Regards,
  • Hello TAHIRI,
    TI does not provide any python test script resources.
    Have you tried to set this up with HCITester?

  • Hello Eirik,

    Yes, I used BTool and the issue not there : There are advertise reports and the GapScan_disable return success for status.

    Best Regards,

  • Hello TAHIRI,
    There might be some added timing delay magic in BTool to allow the device to complete the previous command. If you refer to the time stamp in BTool you can get an idea of how much delay you should add between your commands.

    For example even though the HCIExt_ResetSystemCmdDone event is received after the HCIExt_ResetSystemCmd, the reset might not be complete yet.

    Try to make something work in BTool, Then copy the same commands and add delay according to the time stamp delta.