- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.