title: Android BLE readCharacteristic returns always false
body: <p>I am developing and application to read and write in a custom device through Bluetooth BLE. There is no problem for writing. I am able to establish a connections, discover the service and the characteristics. </p>
  
  <p>Note the call to <code>enableRXNotification</code></p>
  
  <pre><code>public void startReceiving() {
      boolean readOk = gatt.readCharacteristic(rx);
      if (!readOk) {
          Log.d("ANUBEBT", "ERROR INITIATING READ CHARACTERISTIC");
      }
  }
  
  public void onServicesDiscovered(BluetoothGatt gatt, int status) {
          super.onServicesDiscovered(gatt, status);
          // Notify connection failure if service discovery failed.
          if (status == BluetoothGatt.GATT_FAILURE) {
              connectFailure();
              return;
          }
  
          // Save reference to each UART characteristic.
          tx = gatt.getService(SERIAL_SERVICE_UUID).getCharacteristic(TX_CHAR_UUID);
          rx = gatt.getService(SERIAL_SERVICE_UUID).getCharacteristic(RX_CHAR_UUID);
  
          enableRXNotification();
  
          // Notify of connection completion.
          notifyOnConnected(context);
      }
  
  public boolean enableRXNotification() {
      if (gatt == null)   return false;
  
      BluetoothGattService SerialService = gatt.getService(SERIAL_SERVICE_UUID);
      if (SerialService == null)  return false;
  
      BluetoothGattCharacteristic RxChar = SerialService.getCharacteristic(RX_CHAR_UUID);
      if (RxChar == null) {
          Log.d("ANUBEBT", "Error getting rx characteristic");
          connectFailure();
          return false;
      }
  
      if (!setCharacteristicNotification(RxChar, true)) {
          Log.d("ANUBEBT", "Error setting rx notification");
  
          connectFailure();
  
          return false;
      }
  
      return true;
  }
  </code></pre>
  
  <p>After that, I have tried to call <code>readCharacteristic</code> but always returns <code>false</code>. I have tried several alternatives:</p>
  
  <ul>
  <li>Press a button and call to readCharacteristic</li>
  <li>call to readCharacteristic in the  <code>onCharacteristicWrite</code> callback (just to make sure there is no pending operations)</li>
  </ul>
  
  <p>Do you know what's going on here? </p>
  
  <pre><code>       @Override
      public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
          super.onCharacteristicWrite(gatt, characteristic, status);
  
          Log.d("ANUBEBT", "onCharacteristicWrite " + status);
          if (status == BluetoothGatt.GATT_SUCCESS) {
              notifyOnCommunicationError(characteristic.getStringValue(0).length(), characteristic.getStringValue(0));
          }
          writeInProgress = false;
          startReceiving();
      }
  </code></pre>