Connecting BLE Central project to iOS mobile peripheral app

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

cross mob
rotu_3236376
Level 3
Level 3
First like received

Hello,

I have a device with a Cypress semiconductor that is running the UART_to_BLE_Central project.  I would like to modify the code that is filtering by Manufacturer data and put a different filter.  Would this be possible?  Would it be possible to read other parameters passed from BLE at CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT ? I pasted a copy of this code that is causing the issue.

I want to be able to make a BLE connection to an iOS peripherial mobile app.  Right now I only get this to work if I remove the manufaturing data condition show below. Unfortunately as a result, it also connects to any other peripheral devices in the area.  And this is impacting the reliabitly and quality of the connection.

File: app_Ble.c

case CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT: 

            advReport = (CYBLE_GAPC_ADV_REPORT_T *) eventParam;

            /* check if report has manfacturing data corresponding to the intended matching peer */

            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;

                memcpy(peerAddr.bdAddr, advReport->peerBdAddr, sizeof(peerAddr.bdAddr));

                peerAddr.type = advReport->peerAddrType;

                #ifdef PRINT_MESSAGE_LOG 

                    UART_UartPutString("\n\r\n\rServer with matching custom service discovered...");

                #endif

            }         

            break;  

Any ideas would be greatly appreciated.

Thanks,

Rohan

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

Hello Rohan,

The advReport->data values are the peripheral device scan response data values and these values are different for different peripheral devices. Please check( filter) with the valid scan response data of peripheral device.

The struct CYBLE_GAPC_ADV_REPORT_T will contains the advertisement report received by the GAP central device. We can filter with different data of advertising devices which are bd address type of the device which are advertising, advertisement event types, public or random device address of advertising device, length of the data, advertising or scan response data and RSSI value of the responding device.

Please refer to the struct CYBLE_GAPC_ADV_REPORT_T in the BLE component datasheet for more information.

Thanks,

P Yugandhar.

View solution in original post

0 Likes
3 Replies
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello Rohan,

The advReport->data values are the peripheral device scan response data values and these values are different for different peripheral devices. Please check( filter) with the valid scan response data of peripheral device.

The struct CYBLE_GAPC_ADV_REPORT_T will contains the advertisement report received by the GAP central device. We can filter with different data of advertising devices which are bd address type of the device which are advertising, advertisement event types, public or random device address of advertising device, length of the data, advertising or scan response data and RSSI value of the responding device.

Please refer to the struct CYBLE_GAPC_ADV_REPORT_T in the BLE component datasheet for more information.

Thanks,

P Yugandhar.

0 Likes

Thank you so much Mr. Yugandhar. This information is very helpful but do you know where I can download the BLE component datasheet? I want to examine this closely to see what the best options are.

-Rohan

0 Likes

Hello Rohan,

In the PSoC Creator, Each Component has their own Datasheet. When you right click on the component you can see the "Open Datasheet" option. Please go through the  BLE Component datasheet for more information.

Thanks,

P Yugandhar.

0 Likes