title: How to write value to BLE device from iPhone using blemanager?
body: <pre><code>- (void)bleManagerPeripheral:(CBPeripheral *)peripheral didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error
  {
      NSString * str = @"0A0B";
      NSString * hexStr = [NSString stringWithFormat:@"%@",[NSData dataWithBytes:[str cStringUsingEncoding:NSUTF8StringEncoding]
                                                                          length:strlen([str cStringUsingEncoding:NSUTF8StringEncoding])]];
  
      for(NSString * toRemove in [NSArray arrayWithObjects:@"&lt;", @"&gt;", @" ", nil])
          hexStr = [hexStr stringByReplacingOccurrencesOfString:toRemove withString:@""];
  
      NSData *data =  [hexStr dataUsingEncoding:NSUTF8StringEncoding];
      [peripheral setNotifyValue:YES forCharacteristic:characteristic];
  
      [peripheral writeValue:data forCharacteristic:characteristic type:CBCharacteristicWriteWithResponse];
  }
  </code></pre>
  
  <p>I want to send a message or command to BLE machine like Tea-Maker Machine but device is not responding to my message and I am getting following error:</p>
  
  <blockquote>
    <p>Error Domain=CBATTErrorDomain Code=3 "Writing is not permitted." UserInfo={NSLocalizedDescription=Writing is not permitted.}</p>
  </blockquote>
  
  <p>My question is how to send data from our iOS app (iPhone) to the BLE machine by using blemanager?</p>