Automatic Connectivity for the pioneer kit: UART to BLE

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

cross mob
Anonymous
Not applicable

What parameter allows for the automatic connection of the central and peripheral device?

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi Jim,

   

Do you mean how the auto connection happening in GitHub project UART to BLE (https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day020_BLE...) ?

   

If then, its upon checking the adv data. Please check in the CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT of Central project.

   

 if((advReport->eventType == CYBLE_GAPC_SCAN_RSP) && (advReport->dataLen == 0x06) \
                    && (advReport->data[1] == 0xff) && (advReport->data[2] == 0x31)  \
                    && (advReport->data[3] == 0x01) && (advReport->data[4] == 0x3b) \
                    && (advReport->data[5] == 0x04))
            {
                peerDeviceFound = true;

   

:

   

:

   

Thus the peripheral BLE component the adv data is set the same.
As soon as Central receives adv packet , it will check the adv data , and if same as expected it will send connection request.

   

Thanks,
Anjana

View solution in original post

0 Likes
1 Reply
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi Jim,

   

Do you mean how the auto connection happening in GitHub project UART to BLE (https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day020_BLE...) ?

   

If then, its upon checking the adv data. Please check in the CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT of Central project.

   

 if((advReport->eventType == CYBLE_GAPC_SCAN_RSP) && (advReport->dataLen == 0x06) \
                    && (advReport->data[1] == 0xff) && (advReport->data[2] == 0x31)  \
                    && (advReport->data[3] == 0x01) && (advReport->data[4] == 0x3b) \
                    && (advReport->data[5] == 0x04))
            {
                peerDeviceFound = true;

   

:

   

:

   

Thus the peripheral BLE component the adv data is set the same.
As soon as Central receives adv packet , it will check the adv data , and if same as expected it will send connection request.

   

Thanks,
Anjana

0 Likes