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.

LAUNCHXL-CC2640R2: Turning Simple_Central into a beacon scanner.

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

Hi, I have been unsuccesfully trying to scan for beacons of data being emitted by my custom PCB that uses the cc2640r2f-q1 chips and an altered simpleBroadcaster code. I am now attempting to use the simple central project on my launchpad but when i scan for devices it says 0 are available!  I am assuming it is currently on scanning for connectable devices so that data can be displayed. How can i change it so that it just scans for advertised packets of data (beacons) and prints there RSSI?

Any help or source code/ where to get started would be very very much appreciated!

  • Hi,

    I would recommend to review the User's Guide, especially the section dedicated to the GAP scanner.

    In your case, the following piece of code (in simple_peripheral.c) seems to need to be modified:

          // Set PDU type filter -
          // Only 'Connectable' and 'Complete' packets are desired.
          // It doesn't matter if received packets are
          // whether Scannable or Non-Scannable, whether Directed or Undirected,
          // whether Scan_Rsp's or Advertisements, and whether Legacy or Extended.
          GapScan_setParam(SCAN_PARAM_FLT_PDU_TYPE, &temp16);

    In addition, as you need the RSSI to be reported, please make sure to enable it by modifying the following piece of code (add SCAN_ADVRPT_FLD_RSSI):

    // Advertising report fields to keep in the list
    // Interested in only peer address type and peer address

    I hope this will help,

    Best regards,