Dcoumentation about CYBLE_EVT_GAPC_SCAN_START_STOP

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

cross mob
YuAr_1521891
Level 1
Level 1
First like given

Hello,

I'm working on a Psoc4 application. My application is composed by a central device which receives advertisement data from one or more peripheral devices. The main information flux occurs in the advertisement packet from the peripherals to the central; our goal here is to save power avoiding unnecessary connections. The central device eventually connect to the peripheral devices just to change their operation mode and then disconnects.

I've managed to get everything working: change advertising data in real time, create custom services and characteristics, connect to the peripheral devices, discover custom services and characteristics handles and then change the parameters I need.

Now I'm reviewing the entire application in order to place excepections whenever its possible, so my application can take decisions if anything goes wrong with the BLE system.

My question is about the CYBLE_EVT_GAPC_SCAN_START_STOP. I've found a mismatch in the subparameter value of this event.

In the BLE Component's datasheet (Document Number: 002-25037 Rev. **), page 116, we find the following info. It says it's successfull when the subparameter value is 0x01.

pastedImage_0.png

But in the "BLE_Stack.h" file, which is auto generated in my project files, is says the opposite: success would be 0x00.

pastedImage_1.png

I have tested using the following code, and it returns 0x00:

case CYBLE_EVT_GAPC_SCAN_START_STOP:

{

    uint8 *result;

    result = eventParam;

    strcpy(send, "CYBLE_EVT_GAPC_SCAN_START_STOP ");

    sprintf(temp, "%02x\n\r", *result);

    strcat(send, temp);

    debugPrint(send);

    }

break;

The question is: in which documentation should I trust? Everything is working fine. Is the component's datasheet wrong, or may I printing a wrong result?

Thank you very much.

Yuri


					
				
			
			
				
			
			
				
0 Likes
1 Solution
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello Yuri,

On stopping the scan operation, the event CYBLE_EVT_GAPC_SCAN_START_STOP is generated with an event parameter of 0x00 on success. We will check internally with the team about the info on BLE Component documentation and get back to you.

Updated There is no sub-parameter 0x01 Success, description in the BLE Component documentation will be updated.

Thanks,

P Yugandhar.

View solution in original post

1 Reply
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello Yuri,

On stopping the scan operation, the event CYBLE_EVT_GAPC_SCAN_START_STOP is generated with an event parameter of 0x00 on success. We will check internally with the team about the info on BLE Component documentation and get back to you.

Updated There is no sub-parameter 0x01 Success, description in the BLE Component documentation will be updated.

Thanks,

P Yugandhar.