title: iOS CoreBluetooth CBPeripheral didReceiveReadRequest
body: <p>I have two projects. One acts as central ,the other as a peripheral. Central has connected to peripheral, then central calls method <code>readValueForCharacteristic</code>.
  Not immediately, but after about 5-10 seconds, peripheral invokes delegate method <code>- (void)peripheralManager:(CBPeripheralManager *)peripheral didReceiveReadRequest:(CBATTRequest *)request</code>. Why is there a delay? How can I eliminate the delay?
   Any thoughts? I've been trying for almost a week now.
   Appreciate every helps, thanks</p>
  
  <h2>central</h2>
  
  <pre><code>- (void)sendBtnClick:(id)sender
  {
      USCPeerBtn *btn = (USCPeerBtn *)sender;
      CBPeripheral *peripheral = btn.connectedPeripheral;
      if (!peripheral) {
          return;
      }
  
      [self.charachterMDict enumerateKeysAndObjectsUsingBlock:^(id  _Nonnull key, id  _Nonnull obj, BOOL * _Nonnull stop) {
  
          if (key == peripheral) {
              [(CBPeripheral *)key readValueForCharacteristic:(CBCharacteristic *)obj]; // read
              *stop = YES;
          }
      }];
  }
  </code></pre>
  
  <h2>periperal</h2>
  
  <pre><code>// CBPeripheralManagerDelegate
  - (void)peripheralManager:(CBPeripheralManager *)peripheral  didReceiveReadRequest:(CBATTRequest *)request
  {
      NSLog(@"didReceiveReadRequest");
  }
  </code></pre>