CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT event is not generated

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello colleagues,

   

Event CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT is never generated. CYBLE_EVT_STACK_ON, CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP, CYBLE_EVT_GAP_DEVICE_CONNECTED and CYBLE_EVT_GAP_DEVICE_DISCONNECTED are generated correctly but not CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT.  From the BLE Datasheet, I learned that probably I need to invoke the function CyBle_GapcStartScan(ScanType) but that is not recognized by PSoC Creator. What can I do to solve the issue?

   

Below is a piece of my code with all the events:

   

       case CYBLE_EVT_STACK_ON:
            CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST);
            UART_PutString("Enter in Stack ON\r\n");
            break;
          
        case CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP:
            UART_PutString("Enter in Start Stop\r\n");
            break;
            
        case  CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT:
           UART_PutString("Enter in Scan Progress\r\n");
           break;
        
        case CYBLE_EVT_GAP_DEVICE_CONNECTED:
           UART_PutString("Enter in Device Connected\r\n");
           break;
    
        case CYBLE_EVT_GAP_DEVICE_DISCONNECTED:
            UART_PutString("Enter in Device Disconnected\r\n");

   

If I set ScanInfo->scanType=0x01 (being CYBLE_GAPC_DISC_INFO_T *ScanInfo;) in the main, then the Stack is not started and CYBLE_EVT_STACK_ON event is not generated,

   

Peter

0 Likes
1 Solution
Anonymous
Not applicable

What role does your device have? Central, peripheral or both? You must be central to start CyBle_GapcStartScan() and get event CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT (see datasheet page 111: "APIs unique to designs configured as a GAP Central role. A letter 'c' is appended to the API name: CyBle_Gapc").

View solution in original post

0 Likes
3 Replies
Anonymous
Not applicable

What role does your device have? Central, peripheral or both? You must be central to start CyBle_GapcStartScan() and get event CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT (see datasheet page 111: "APIs unique to designs configured as a GAP Central role. A letter 'c' is appended to the API name: CyBle_Gapc").

0 Likes
Anonymous
Not applicable

You were right, I configured the PRoC with Both roles and now I can see the event CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT is triggered. However, it is triggered always, even though no other device is range... Do you know why? According to the datasheet: The
CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT event is generated when a GAP peripheral device is
located...

0 Likes
Anonymous
Not applicable

Hi,

   

In your BLE Component-> GAP Settings -> Check the "Duplicate Filtering" check box. This will make sure that the event is triggered only once for each device.

   

Regards,

   

- Madhu Sudhan

0 Likes