Can the sample UART_to_BLE_central code connect to Peripheral without Cypress Manufacturing data?

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 an existing project where the Peripheral is not setting the manufacturing data to companyid 305 which is Cypress according to Bluetooth Specifications:

https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers

I am using a Central BLE app that is running the Cypress 100 Projects in 100 days (Day 20) UART to BLE Central project:

https://github.com/cypresssemiconductorco/PSoC-4-BLE/blob/master/100_Projects_in_100_Days/Day020_BLE...

My question is it possible to connect to the peripheral without having this manufacturing data?  I see code that is looking for this but I am not sure whether it is required or not.

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; 

Thanks,

Rohan

0 Likes
1 Solution
GyanC_36
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Rohan,

    The  CyBle_GapcConnectDevice() sends a connection request to peripheral device. Now, if you see in the code , you are calling this API by checking the flag "peerDeviceFound" as below  and this flag you are setting only after comparing the manufacture data.

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

if(peerDeviceFound)

            {

                cyble_api_result = CyBle_GapcConnectDevice(&peerAddr);

               

    if(CYBLE_ERROR_OK == cyble_api_result)

    {

    peerDeviceFound = false;

    }

            }

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

So , this default project will not connect to any peripheral device if that device does not have the same manufacture data set in scan response packet.

-Gyan

View solution in original post

0 Likes
3 Replies
GyanC_36
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Rohan,

    The  CyBle_GapcConnectDevice() sends a connection request to peripheral device. Now, if you see in the code , you are calling this API by checking the flag "peerDeviceFound" as below  and this flag you are setting only after comparing the manufacture data.

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

if(peerDeviceFound)

            {

                cyble_api_result = CyBle_GapcConnectDevice(&peerAddr);

               

    if(CYBLE_ERROR_OK == cyble_api_result)

    {

    peerDeviceFound = false;

    }

            }

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

So , this default project will not connect to any peripheral device if that device does not have the same manufacture data set in scan response packet.

-Gyan

0 Likes

This is my conclusion too.  And unfortunately there is no option to rewrite the firmware.  Is there no way around this?  Can I get the my iOS app to send the this information in the scan response data without changing Apple's Manufacturer data?

0 Likes

No Rohan,   You need the same manufacturer data to connect to the default central project.

-Gyan