2 Replies Latest reply on Mar 28, 2019 11:09 AM by dusj_3409981

    PSOC Creator BLE Scanning for BLE Friendly Name

    dusj_3409981

      How do you search for a specific BLE Friendly Name when scanning for another BLE device. At the moment, I can only find a BLE device based on Mac Address when scanning results are completed. Is there a way to find a device to connect with based on its BLE friendly name using PSOC creators library? I have looked through the 100 days project and was unable to find an example of this.

        • 1. Re: PSOC Creator BLE Scanning for BLE Friendly Name
          GyanC_36

          Struct CYBLE_GAPC_ADV_REPORT_T  has advertising or scan response data field which can be extracted while scanning for the  peripheral device name based on the index value ( for the device name ) in advertising packet in CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT event.

           

          Pseudo code --

          """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

          case CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT:

                    

                      advReport = (CYBLE_GAPC_ADV_REPORT_T *) eventParam;

                    

                      /* check if report has device name corresponding to the intended matching peer */

                      if((advReport->data[1] == 0xff) && (advReport->data[2] == 0x31)  \

                              && (advReport->data[3] == 0x01) && (advReport->data[4] == 0x3b) \

                              && (advReport->data[5] == 0x04))

           

                      {}

           

          """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

           

          Note: The device name value will be in hex format.

           

           

          -Gyan

          • 2. Re: PSOC Creator BLE Scanning for BLE Friendly Name
            dusj_3409981

            Thanks Gyan! This is exactly what I was looking for!