PSOC 6 Difference between Cy_BLE_GAPC_StartScan and Cy_BLE_GAPC_StartDiscovery

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

cross mob
GeGa_1196981
Level 2
Level 2
10 sign-ins 5 replies posted 5 sign-ins

I Have a question regarding the PSOC6 as central mode

What I want is to read the nerby devices but I can't find an example that works on psoc 6

I tried with 2 functions

Cy_BLE_GAPC_StartScan

and

Cy_BLE_GAPC_StartDiscovery

which one do I need to use?

I can't even trigger none of this events:

CY_BLE_EVT_GAPC_SCAN_PROGRESS_RESULT:

CY_BLE_EVT_GAPC_SCAN_START_STOP:

at first I thougth that StarScan trigger this two events

but reading Cypress PSoC 6 Bluetooth Low Energy Middleware Library 3.40

it says that the StartDiscovery function is the one that triggers this

so I'm not so sure right now which one is

I have no problem when working on perpheral and there are plenty of examples for this but for central I'm having a hard time to understand it

the device I'm using is CYBLE-416045-02 on a custom pcb that I design

0 Likes
1 Solution

Hello GeGa_1196981,

In the project it is recommended to start the scanning only after getting the CY_BLE_EVT_STACK_ON event.

Thanks,
P Yugandhar.

View solution in original post

0 Likes
3 Replies
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hello,

The API "Cy_BLE_GAPC_StartScan()" internally calls the "Cy_BLE_GAPC_StartDiscovery()" to find the peripherals available for connection. We suggest you to call "Cy_BLE_GAPC_StartScan()" in your application.

To get a better understanding about this issue, could you please attach your project to this forum thread? We can review it and let you know, if there are any problems.

Thanks and Regards,

Sudheesh

0 Likes

Hi Sudheesh sorry for the late response

I have uploade my project to github:

GitHub - magergar/Bluetooth-Controller

in this project I configured the Bluetooth as peripheral and central

the peripheral part is working fine but I can't get to work the central part

I even made a new project were the Bluetooth was configured as central only

and as I said before I can't get the central part work the events are not triggered so maybe I am doing something wrong

hope you can help me

Regards

German Garzon

0 Likes

Hello GeGa_1196981,

In the project it is recommended to start the scanning only after getting the CY_BLE_EVT_STACK_ON event.

Thanks,
P Yugandhar.

0 Likes