2 Replies Latest reply on Jul 18, 2016 3:59 AM by johnl_1631656

    Start and Stop BLE Scanning

    johnl_1631656

      Hi All

         

      As part of my application I need to start and stop BLE Scanning.

         

      To start scanning I use the function CyBle_GapcStartScan(CYBLE_SCANNING_FAST).

         

      To stop scanning I use the function CyBle_GapcStopScan().

         

      The start scanning always works and generates a CYBLE_EVT_GAPC_SCAN_START_STOP event.

         

      The stop scanning only works intermittently.

         

      When it works it generates a CYBLE_EVT_GAPC_SCAN_START_STOP event.

         

      When it doesn't work, no event is generated and the BLE remains in scanning mode.

         

      Are there other conditions I need to set to stop the BLE from scanning.

         

      The device is a CYBL10563-56LQXI

         

      Thanks

         

      John

        • 1. Re: Start and Stop BLE Scanning
          anpm

          Hi John,

             

          I am not sure how you are using the CyBle_GapcStopScan() API. Are you calling CyBleprocessevents() after CyBle_GapcStopScan() API? Can you please make sure of that?

             

          Please let us know your further queries.

             

          Thanks & Regards,
          Anjana

          • 2. Re: Start and Stop BLE Scanning
            johnl_1631656

            Hi Anjana

               

            Thanks for the reply regarding my scan stop start issue.

               

            Not calling CyBleprocessevents was the cause of my issue.

               

            I had not called it directly after the stop scan command so once I did the stop scan worked perfectly.

               

            I actually fixed the issue the day after I posted query so my apologies for not updating my post.

               

            Thanks again,

               

            John