src/BleBrowser.js
/**
   * Starts scanning as soon as all conditions are met.
   * 
   * Conditions that affect the scanning mode:
   * 
   * - BLE stack initialized
   * - Scanning was started previously
   * - Scan suspension counter is zero
   * - Scanning hasn't already been initiated.
   * 
   */
Starts scanning as soon as all conditions are met.

Conditions that affect the scanning mode.

- BLE stack initialized
- Scanning was started previously
- Scan suspension counter is zero
- Scanning hasn't already been initiated.
Starts scanning as soon as all conditions are met . Conditions that affect the scanning mode . - BLE stack initialized - Scanning was started previously - Scan suspension counter is zero - Scanning hasn ' t already been initiated .
_scan() {
    if (this._shouldScan === false) {
      return;
    }
    if (this._isScanning === true) {
      return;
    }
    if (this._suspensionCounter > 0) {
      return;
    }
    if (this.noble.state === 'poweredOn') {
      this.log('Starting to scan for BLE devices');
      this.noble.startScanning([], true);
    }
    const ScanStartTimeout = 1000;
    setTimeout(this._scan.bind(this), ScanStartTimeout);
  }
_scan ( ) { if ( this . _shouldScan === false ) { return ; } if ( this . _isScanning === true ) { return ; } if ( this . _suspensionCounter > 0 ) { return ; } if ( this . noble . state === 'poweredOn' ) { this . log ( 'Starting to scan for BLE devices' ) ; this . noble . startScanning ( [ ] , true ) ; } const ScanStartTimeout = 1000 ; setTimeout ( this . _scan . bind ( this ) , ScanStartTimeout ) ; }
Starts scanning as soon as all conditions are met.
Starts scanning as soon as all conditions are met .
// Scanning was not requested // Already scanning, do not restart scanning. // Scanning was suspended, do not initiate it. // BLE stack is initialized, try to initiate scanning // Set a timeout to try to restart scanning, will disable itself with  // the above exit conditions