2 Replies Latest reply on May 28, 2016 11:51 PM by abhishekbarve04_1611946

    No event generation for connection

    abhishekbarve04_1611946

      Hello,

         

      I am using PROC 4 BLE as a central device. I want to exchange data with a peripheral device which is advertising.

         

      The API Cyble_gapcconnectdevice() is returning CYBLE_ERROR_OK. Thus api is successful.

         

      But CYBLE_EVT_GATT_CONNECT_IND and CYBLE_EVT_GAP_DEVICE_CONNECTED events are not generated eventhough api is successful.

         

      What may be the possible faults ?

         

      Thanks.

        • 1. Re: No event generation for connection
          Madhu Lakshmipathy

          Hi,

             

          Are you able to connect the peripheral device with the Cypress BLE Dongle and CySmart App? This is just to ensure that the peripheral device is in a state to accept connection. Please try this.

             

          Please check the handshake happening between the central and peripheral using a BLE Sniffer to see what exactly is happening if you have one. 

             

          Regards,

             

          - Madhu Sudhan

          • 2. Re: No event generation for connection
            abhishekbarve04_1611946

            Hello,

               

            Peripheral device is connecting using Cysmart app. 

               

            Cyble_gapcconnectdevice() says scanning should be stopped before calling the function. I have stopped scanning using the cyble_gapcstopscan() fuction after gap peripheral is located. Then the CyBle_GapcConnectDevice is called. It works perfectly says the api result. 

               

            Although scanning is stopped again the CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT generated which is result of gap peripheral discovery. Also getstate() function shows scanning stste despite of stopscan() function.

               

            Also, no generation of CYBLE_EVT_GAP_DEVICE_CONNECTED event after the successful connectdevice call.

               

            What may be the possible faults ?

               

            Thanks.