title: Change interval time reading beacon RSSI on iOS with CoreBluetooth
body: <p>I try to read the RSSI of the beacon(estimote) more offen than once per second. I know that using Core Location nd method <code>locationManager (manager: CLLocationManager, didRangeBeacons beacons: [CLBeacon] inRegion region: CLBeaconRegion)</code> it is not possible.</p>
  
  <p>I found suggestions to use  Core Bluetooth. My implementation looks like this:</p>
  
  <pre><code>class Bluetooth : NSObject, CBCentralManagerDelegate, CBPeripheralDelegate {
      var manager: CBCentralManager!
      lazy var peripherals = [NSUUID:CBPeripheral]()
  
  
      static let sharedInstance = Bluetooth()
  
      private override init() {
          super.init()
          manager = CBCentralManager()
          manager.delegate = self
      }
  
      func centralManagerDidUpdateState(central: CBCentralManager) {
          switch(central.state) {
              case .PoweredOn:
                  print("powered on")
                  manager.scanForPeripheralsWithServices(nil, options: [CBCentralManagerScanOptionAllowDuplicatesKey: NSNumber(bool: true)])
                  break
              default:
                  print("Unknown status")
          }
      }
  
      func centralManager(central: CBCentralManager, didDiscoverPeripheral peripheral: CBPeripheral, advertisementData: [String : AnyObject], RSSI: NSNumber) {   
          //fot testo only one becon
          if(peripheral.name == "EST" &amp;&amp; peripherals.count == 0) {            
              manager.connectPeripheral(peripheral, options: nil)         
              peripherals[peripheral.identifier] = peripheral
              peripherals[peripheral.identifier]?.delegate = self     
              manager.stopScan()
          }
      }
  
      func centralManager(central: CBCentralManager, didConnectPeripheral peripheral: CBPeripheral) {
          print("Connect peripheral \(peripheral.name) \(peripheral.identifier)")
          peripheral.delegate = self
          peripheral.readRSSI()
      }
  
      func peripheral(peripheral: CBPeripheral, didReadRSSI RSSI: NSNumber, error: NSError?) {
          let currentTime = CACurrentMediaTime();
          print("\(currentTime) \(RSSI)")
          peripheral.readRSSI()
      }
  }
  </code></pre>
  
  <p>I set advertising interval to 100ms on beacon, after all it seems that the <code>peripheral (peripheral: CBPeripheral, didReadRSSI RSSI: NSNumber, error: NSError?)</code> not invoke more offen than once per second.</p>
  
  <p>Is there any way to read the RSSI every 100ms?</p>
  
  <p>And extra question - in the code above method <code>peripheral (peripheral: CBPeripheral, didReadRSSI RSSI)</code> runs only about 10 times, then stops. Is it possible that beacon "hung up" and I need to re-connect with him?</p>
  
  <p>I use for test iPhone 6s plus with iOS9.</p>