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.

CC2640R2F: Question on HCI Tester script commands for use with CC26xx (e.g. CC2640R2 dev kit)

Part Number: CC2640R2F

Hi,

We are working on the CC2640R2 and we would like to use HCI Tester for some basic Bluetooth tests.

  • CC2640R2 SDK host_test example
  • Network Processor mode
  • HCI Tester on Windows PC
  • Use of some of the high level VS commands such as GAP_DeviceInit, GAP_DeviceDiscoveryRequest and GAP_EstablishLinkReq on central role side

Now I would like to use a few of the script features of HCI tester for my setup, but I can't find any applicable documentation...

(Not in HCI Tester User Manual or any other AN I have found so far.)

For example I would like to know where information is found related to following:

  • CallFile
  • LoadLib
  • Logger
  • etc

Please refer to attached screen dump showing the script related functions of HCI tester.

Also if you have any example script files that may be helpful.

Thanks in advance.

  • Hello,

    Details on the interface used by the Host Test network processor application are located in the HCI Vendor Specific API Guide that is packaged in the SDK. This will describe the frame format and commands that can be sent to the device .

    Regarding the functions you have shown, I would look at processors.wiki.ti.com/.../LPRF_BLE_HCITester for some sample scripts, though they are a bit stale.

    cleartrace will clear the trace log.
  • Hello Sean,

    Thanks for information on where to find the VS HCI API guide. This is useful indeed while actually my question is primarily related to the scripts and HCI tester:

    I already looked into the link that you provided earlier and was hoping there was something more available: I mean, I suspect that there should be some documentation available for these functions (although function names are somehow self-explanatory)?

    The link (processors.wiki.ti.com/.../File:Central_commands_sbp.zip) to the central example use of some of the functions but not all of them. Also they are not explained there, just used.

    So any information would be helpful here.

    Thanks in advance.

    BR, Patrik
  • Hi Sean!

    Did you have time to check my follow-up questions?

    Thanks in advance.

    BR, Patrik

  • Hi Patrik,

    I am sorry, but I am unable to find any additional supporting documentation other than what has already been linked.
    I would recommend searching the wiki.

    If you have a specific script feature that you are seeking to understand, you can post the question here.
  • Hi Sean,

    Ok, thanks for checking. I did already search a bit without finding relevant posts.

    Please have a look at the attached script where I added some self-explanatory questions and comments.

    For example related to CallFile and "event ignored while sleeping".

    Thanks in advance.aa_hcitester.zip

    BR, Patrik

  • Hi Patrik,

    1. CallFile ScriptPath + \\initializations\\general_inits.txt

    I believe you need quotes around the string you are appending (i.e. "\\initializations\\general_inits.txt")


    2. Send_GAP_DeviceDiscoveryRequest 0x03, 0x00, 0 # This does work but I get event saying "Event ignored while sleeping ..." Ask TI about this.

    You are pending on event 0x601 (GAPRole Device discovery), but you have received other events while you are waiting on this event.
    Most likely other reports coming in.

    3. Send_GAP_TerminateLinkReq 0, 0x13 # This does give errors, why? But eventually link is indeed disconnected. Ask TI about this.

    Based on your logs, it appears that the Send_GAP_TerminateLinkReq is sent and received successfully without errors . However, since previously you had called Send_GATT_DiscAllPrimaryServices some lingering events are coming back related to service discovery, but are giving errors because the device is no longer connected

    08:33:41.430 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff
    08:33:41.430 Parameters:
    08:33:41.430 | Event Opcode : 0x0511 (ATT_ReadByGrpTypeRsp)
    08:33:41.430 | Status : 0x14 (bleNotConnected)
    08:33:41.430 | connectionHandle : 0x0000
    08:33:41.430 | pduLen : 0x00
  • Hi Sean!

    Thanks.

    1. Thanks for the info, however when I tried here it did not work. Could you just provide a simple script that you tried out successfully?

    2. So a Send_GAP_DeviceDiscoveryCancel in between Send_GAP_DeviceDiscoveryRequest 0x03, 0x00, 0 and Send_GAP_EstablishLinkReq 0x00, 0, 0, peerAddr would help?

    BR, Patrik

  • Hi Patrik,

    1. Here is a snippet from a script that is used for an internal test

    ClearVariables
    
    ScriptPath = "C:\\git\\ble_test\\scripts\\HCI_Tester\\BLE Scripts - HOST"
    
    # load common scripts
    CallFile ScriptPath + "\util\Host_Common.txt"
    CallFile ScriptPath + "\qual\qual_pixit.txt"
    
    CloseAllDocuments
    
    interactive = 0
    
    # initialize device
    CallFile ScriptPath + "\util\init_master.txt"

    2. Possibly, it really matters on the way the events come in. That said, if device info reports are not critical, then there is no harm is ignoring them while you are sleeping.