cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

rotu_3236376
New Contributor II

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
Reply
1 Solution
GyanC_36
Employee

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
Reply
3 Replies
GyanC_36
Employee

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
Reply
rotu_3236376
New Contributor II

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
Reply
GyanC_36
Employee

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

-Gyan