title: RxBluetooth unable to establish connection with device
body: <p>I would like to use <a href="https://github.com/IvBaranov/RxBluetooth" rel="nofollow noreferrer">RxBluetooth</a> to transfer some text between two Android devices.
  I'm able to scan and see nearby devices, though while trying to connect to one of them I face the following failure:</p>
  
  <hr>
  
  <p><em>D/BluetoothUtils:</em> isSocketAllowedBySecurityPolicy start : device null</p>
  
  <p><em>W/BluetoothAdapter:</em> getBluetoothService() called with no BluetoothManagerCallback</p>
  
  <p><em>D/BluetoothSocket:</em> connect(), SocketState: INIT, mPfd: {ParcelFileDescriptor: FileDescriptor[65]}</p>
  
  <p><strong>java.io.IOException: read failed, socket might closed or timeout, read ret: -1</strong></p>
  
  <hr>
  
  <p>This is the code I run in order to establish a connection with a selected <code>BluetoothDevice</code>:</p>
  
  <pre><code>mRxBluetooth.observeConnectDevice(bluetoothDevice, UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"))
              .subscribeOn(mSchedulerProvider.io())
              .observeOn(mSchedulerProvider.ui())
              .subscribe(new Consumer&lt;BluetoothSocket&gt;() {
                  @Override
                  public void accept(BluetoothSocket bluetoothSocket) throws Exception {
                      // Unable to reach here.
                  }
              }, new Consumer&lt;Throwable&gt;() {
                  @Override
                  public void accept(Throwable throwable) throws Exception {
                      // I reach this point with the message:
                      // java.io.IOException: read failed, socket might closed or timeout, read ret: -1
                  }
              })
  </code></pre>
  
  <p>Bluetooth is enabled on both devices, as I'm able to discover one from the other.</p>
  
  <p>Permissions I use are:</p>
  
  <pre><code>&lt;uses-feature
      android:name="android.hardware.bluetooth_le"
      android:required="true"/&gt;
  
  &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt;
  &lt;uses-permission android:name="android.permission.BLUETOOTH"/&gt;
  &lt;uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/&gt;
  </code></pre>
  
  <p>Thank you.</p>