title: Android Bluetooth .connect() exception Nexus 7 OBDII adapter
body: <p>I'm using standard API procedures for connecting to a device.  Specifically OBDII bluetooth adapters.</p>
  
  <p>I have two OBDII bluetooth adapters, of different models.  Running the exact same code, the first will pair and connect without issue with every phone/tablet I've tested.  The second will pair and connect fine except with my Nexus 7 running android 4.2</p>
  
  <p>It throws an IOexception: <code>read failed, socket might closed or timeout, read ret: -1</code></p>
  
  <p>Thought this was just something wrong with the device itself or the newer release... But then another piece of software "torque" is able to connect to either adapter from my Nexus 7.</p>
  
  <p>So I'm clearly doing something wrong/different that is only an issue in the later OS???</p>
  
  <p>Any help figuring this out would be greatly appreciated.</p>
  
  <pre><code>    public void run() {
          Log.i(TAG, "BEGIN mConnectThread");
          setName("ConnectThread");
  
          // Always cancel discovery because it will slow down a connection
          mAdapter.cancelDiscovery();
  
          // Make a connection to the BluetoothSocket
          try {
              // This is a blocking call and will only return on a
              // successful connection or an exception
  
              mmSocket.connect(); &lt;=**This is where the exception is thrown
  
          } catch (IOException e) {
              Etype =  "Connection to: " + mmDevice.getName() + " at: "
                      + mmDevice.getAddress() + " failed: " + e.getMessage();
              connectionFailed();
              // Close the socket
              try {
                  mmSocket.close();
              } catch (IOException e2) {
                  Log.e(TAG, "unable to close() socket during connection failure", e2);
              }
              // Start the service over to restart listening mode
              BluetoothChatService.this.start();
              return;
          }
  </code></pre>