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: CC2640R2F continues adv packet scanning issue

Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2650

Hi,

I am using SDK 1.50.00.71 with host test example and profile i set in host test is Peripheral + Observer.

I want to listen advertising packets sent by other BLE devices ( very similar function to CC2650 sniffer does ), can you help what command or command set i need to use to get the same.

If i use below command set then it scans only device info and what packet it advertises... but if other device sends adv packet continuously then all packet device need to scan. 

Send_GAP_DeviceInit 0x06

Send_GapScan_setParam 0x03, 0x0fff

Send_GapScan_setPhyParams 0x05, 0x00, 1600, 1600

Send_GapScan_enable 0, 6000, 40

Regards,

Bhavin

  • Hi Bhavin,

    Can you elaborate on how you are using host test? Are you controlling it from BTool or an external host device? Or would your goal rather be to create something stand-alone?

    Regards,
    Katie
  • Hi Katie,

    I am testing it through HCI_Tester software.

    Regards,
    Bhavin
  • Hi Bhavin,
    Could you share the log with commands sent to the host Test software? I am interested in knowing the command chain (with parameters) beyond the HCI Tester abstraction.
  • Hi Joakim,

    Pl. find the below commands used for scanning purpose,

    ClearTrace
    Send_HCI_EXT_ResetSystemCmd 0
    sleep (200)

    Send_GAP_DeviceInit 0x06
    sleep (200)

    Send_GapAdv_create 0x0013, 160, 160, 0x07, 0x00, "B0:91:22:69:FA:64", 0x00, 127, 0x01, 0x01, 0
    sleep (200)
    Send_GapScan_setPhyParams 0x05, 0x01, 1600, 1600
    Sleep (200)
    Send_GapScan_setParam 0x02, 0x01
    Sleep (200)

    Regadrs,
    Bhavin
  • Hi Bhavin,

    Those are not the HCI commands. Those are the HCI Tester API commands, that you use to script behaviour within the HCI Tester. I am looking for the commands that the HCI Tester is sending to the Host Test device. I am looking for commands such as;

    GAP_DeviceInit(profileRole, maxScanResponses, IRK, CSRK, signCounter)

    GAP_DeviceDiscoveryRequest(mode, activeScan, whiteList)

    These commands have another set of parameters than listed in the HCI Tester API, which I would be interested in understanding.

    When you have executed the script, you should be able to copy the HCI Log. You can replace confidential information if necessary, just indicate how you do that.

  • Tester_HCILib.xmlHi Joakim,

    I think you required below setting for scanning device right ? along with this i am also attaching xml file of commands that i use

    12:26:33.555 --

    12:26:33.555 Packet "HCI_EXT_ResetSystemCmd", Opcode 0xfc1d

    12:26:33.555 Parameters:

    12:26:33.555 | type : 0 (Chip Reset)

    12:26:33.555 --

    12:26:33.555 Outgoing Dump:

    12:26:33.555 0000: 01 1d fc 01 00 .....

    12:26:33.565 Incoming Dump:

    12:26:33.565 0000: 04 ff 05 1d 04 00 1d fc ........

    12:26:33.575 --

    12:26:33.575 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff

    12:26:33.585 Parameters:

    12:26:33.585 | Event Opcode : 0x041d (HCI_EXT_ResetSystemDone)

    12:26:33.585 | Status : 0x00 (Success)

    12:26:33.585 | Command Opcode : 0xfc1d (HCI_EXT_ResetSystemCmd)

    12:26:33.585 --

    12:26:33.595 Event ignored while sleeping: HCI_Vendor_Specific_Event (0xff)

    12:26:33.765 --

    12:26:33.765 Packet "GAP_DeviceInit", Opcode 0xfe00

    12:26:33.765 Parameters:

    12:26:33.765 | profileRole : 0x09 (GAP_PROFILE_BROADCASTER|GAP_PROFILE_CENTRAL)

    12:26:33.765 | addrMode : 0x00 (ADDRMODE_PUBLIC)

    12:26:33.765 | ramdomAddr : "00:00:00:00:00:00"

    12:26:33.765 --

    12:26:33.765 Outgoing Dump:

    12:26:33.765 0000: 01 00 fe 08 09 00 00 00 00 00 00 00 ............

    12:26:33.765 Incoming Dump:

    12:26:33.765 0000: 04 ff 06 7f 06 00 00 fe ........

    12:26:33.765 Incoming Dump:

    12:26:33.765 0000: 00 .

    12:26:33.795 --

    12:26:33.795 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff

    12:26:33.815 Parameters:

    12:26:33.815 | Event Opcode : 0x067f (GAP CommandStatus)

    12:26:33.815 | Status : 0x00 (SUCCESS)

    12:26:33.815 | opCode : 0xfe00 (GAP_DeviceInit)

    12:26:33.815 | length : 0x00

    12:26:33.815 --

    12:26:33.815 Incoming Dump:

    12:26:33.815 0000: 04 ff 2c 00 06 00 64 ..,...d

    12:26:33.815 Incoming Dump:

    12:26:33.815 0000: fa 69 22 91 b0 ff 00 05 18 86 78 1b 1c 61 23 93 .i".......x..a#.

    12:26:33.815 0010: b2 7a a6 9f 6b 65 67 52 8d bc 42 cd 9d 10 1c c2 .z..kegR..B.....

    12:26:33.815 0020: a4 28 69 cb aa b5 d5 02 .(i.....

    12:26:33.835 --

    12:26:33.835 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff

    12:26:33.855 Parameters:

    12:26:33.855 | Event Opcode : 0x0600 (GAP_DeviceInitDone)

    12:26:33.855 | Status : 0x00 (SUCCESS)

    12:26:33.855 | devAddr : "B0:91:22:69:FA:64"

    12:26:33.855 | dataPktLen : 0x00ff

    12:26:33.855 | numDataPkts : 0x05

    12:26:33.855 | IRK : "18:86:78:1B:1C:61:23:93:B2:7A:A6:9F:6B:65:67:52"

    12:26:33.855 | CSRK : "8D:BC:42:CD:9D:10:1C:C2:A4:28:69:CB:AA:B5:D5:02"

    12:26:33.855 --

    12:26:33.855 Event ignored while sleeping: HCI_Vendor_Specific_Event (0xff)

    12:26:33.965 --

    12:26:33.965 Packet "GapScan_setPhyParams", Opcode 0xfe53

    12:26:33.965 Parameters:

    12:26:33.965 | primPhy : 0x05 (SCAN_PRIM_PHY_1M|SCAN_PRIM_PHY_CODED)

    12:26:33.965 | type : 0x01 (SCAN_TYPE_ACTIVE)

    12:26:33.965 | interval : 1600

    12:26:33.965 | window : 1600

    12:26:33.965 --

    12:26:33.965 Outgoing Dump:

    12:26:33.965 0000: 01 53 fe 06 05 01 40 06 40 06 .S....@.@.

    12:26:33.965 Incoming Dump:

    12:26:33.965 0000: 04 ff 06 7f 06 00 53 fe ......S.

    12:26:33.965 Incoming Dump:

    12:26:33.965 0000: 00 .

    12:26:33.995 --

    12:26:33.995 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff

    12:26:34.025 Parameters:

    12:26:34.025 | Event Opcode : 0x067f (GAP CommandStatus)

    12:26:34.025 | Status : 0x00 (SUCCESS)

    12:26:34.025 | opCode : 0xfe53 (GapScan_setPhyParams)

    12:26:34.025 | length : 0x00

    12:26:34.025 --

    12:26:34.045 Event ignored while sleeping: HCI_Vendor_Specific_Event (0xff)

    12:26:34.165 --

    12:26:34.165 Packet "GapScan_setParam", Opcode 0xfe55

    12:26:34.165 Parameters:

    12:26:34.165 | paramID : 0x05 (SCAN_PARAM_FLT_DISC_MODE)

    12:26:34.165 | SCAN_PARAM_FLT_DISC_MODE : 0x01 (SCAN_FLT_DISC_GENERAL)

    12:26:34.165 --

    12:26:34.175 Outgoing Dump:

    12:26:34.175 0000: 01 55 fe 02 05 01 .U....

    12:26:34.175 Incoming Dump:

    12:26:34.175 0000: 04 ff 06 7f 06 00 55 fe ......U.

    12:26:34.175 Incoming Dump:

    12:26:34.175 0000: 00 .

    12:26:34.205 --

    12:26:34.205 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff

    12:26:34.225 Parameters:

    12:26:34.225 | Event Opcode : 0x067f (GAP CommandStatus)

    12:26:34.225 | Status : 0x00 (SUCCESS)

    12:26:34.225 | opCode : 0xfe55 (GapScan_setParam)

    12:26:34.225 | length : 0x00

    12:26:34.225 --

    12:26:34.235 Event ignored while sleeping: HCI_Vendor_Specific_Event (0xff)

    12:26:34.375 --

    12:26:34.375 Packet "GapScan_enable", Opcode 0xfe51

    12:26:34.375 Parameters:

    12:26:34.375 | period : 0

    12:26:34.375 | duration : 6000

    12:26:34.375 | max number of records : 40

    12:26:34.375 --

    12:26:34.375 Outgoing Dump:

    12:26:34.375 0000: 01 51 fe 05 00 00 70 17 28 .Q....p.(

    12:26:34.375 Incoming Dump:

    12:26:34.375 0000: 04 ff 06 7f 06 00 51 fe ......Q.

    12:26:34.375 Incoming Dump:

    12:26:34.375 0000: 00 .

    12:26:34.385 --

    12:26:34.385 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff

    12:26:34.415 Parameters:

    12:26:34.415 | Event Opcode : 0x067f (GAP CommandStatus)

    12:26:34.415 | Status : 0x00 (SUCCESS)

    12:26:34.415 | opCode : 0xfe51 (GapScan_enable)

    12:26:34.415 | length : 0x00

    12:26:34.415 --

    12:26:34.415 Incoming Dump:

    12:26:34.415 0000: 04 ff 07 13 06 00 00 .......

    12:26:34.415 Incoming Dump:

    12:26:34.415 0000: 00 01 00 ...

    12:26:34.435 --

    12:26:34.435 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff

    12:26:34.455 Parameters:

    12:26:34.455 | Event Opcode : 0x0613 (GAP Advertiser/Scanner Event)

    12:26:34.455 | Status : 0x00 (SUCCESS)

    12:26:34.455 | event : 0x00010000 (GAP_EVT_SCAN_ENABLED)

    12:26:34.455 --

    Regards,

    Bhavin

  • Bhavin,
    If the advertisements doesn't change over time (i.e. dynamic data), the duplicates will be filtered by the stack to reduce memory footprint.

    You should be able to perform a GAP_SetParam to remove the filtering as suggested in this thread;
    e2e.ti.com/.../615205
  • Hi Joakim,

    Thanks for solution... I checked with BTool as i do use SDK 1.50.00.71 version and host test example of it....its BTool doesn't have this " TGAP_FILTER_ADV_REPORTS" attribute in GAP_setParam command, so i downloaded BTool from you have given link but when i use it and sending command of GAP_setParam then BTool reflects response as Invalid Parameter.

    See the screenshot

  • Hi Joakim,

    Same thing i have tested with SDK 1.50.00.58 and its working fine.... so is it issue with SDK 1.50.00.71 ?

    Regards,
    Bhavin
  • Hi Joakim,

    Can you confirm will this work with SDK 1.50.00.71 ?

    Other thing is that when i use SDK 1.50.00.58 and sending command to listen all beacons as per below

    DeviceInit ( Central + Broadcaster )
    Gap_SetParam ( for all beacons )
    GAP_DeviceDiscoveryRequest

    So when i use "GAP_DeviceDiscoveryRequest" command it scans all beacons but it scans for limited time.... i want to scan it for infinite time so how can i set its time period parameter to scan it at infinite time or user configurable time period.

    Regards,
    Bhavin
  • Hi Bhavin,

    SDK 1.50.00.71 is BLE 5 stack. SDK1.50.00.58 is BLE 4.2 stack so they are different protocols and different stacks so they don't directly correlate. What were you using originally - 1.50.00.71, or 1.50.00.58? As far as I can tell, SDK1.50.00.71 does not have this TGAP_FILTER_ADV_REPORTS parameter, but there appears to be a GapScan_FilterDuplicate_t that you might want to look into instead.

    Regards,
    Katie
  • Hi Katie,

    Thank you for response on my query.

    Correct there are different protocols for BLE4.2 and BLE5.0 and now my need is that i want to listen all beacons from another devices weather those device is SDK 58 or 71 or can be mobile also but scanning device will contain SDK 71 with host test example.

    I tested same with scanning device with SDK 58 with host test example then it scans all beacons from other devices by setting TGAP_FILTER_ADV_REPORTS parameter in GAP_SetParam command but now my need comes to SDK 71 host test example.

    Regards,

    Bhavin

  • Hi Bhavin,

    As mentioned, I think for 1.50.00.71 you may want to look into the GapScan_FilterDuplicate_t - I suspect this may have a function similar to the TGAP_FILTER_ADV_REPORTS parameter from 1.50.00.58.

    Regards,
    Katie