3 Replies Latest reply on Mar 20, 2019 5:56 AM by PY_21

    Connecting BLE Central project to iOS mobile peripheral app

    keda_3267566

      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