title: Android 4.3 BLE
body: <p>Anyone having issues on using the Nexus 4 to connect to a BLE Device?  I am using a BLE module based off of the TI CC2540.  I was able to connect to the BLE device, discover services, write to characteristics, and write to descriptors for notifications.  Then all of a sudden I am not able to connect to the device anymore.  I unpaired the device from the phone, did a factory reset as well, and nothing seems to work.</p>
  
  <p>I also was following what others did in this post <a href="https://stackoverflow.com/q/17870189/2418669">Android 4.3 Bluetooth Low Energy unstable</a></p>
  
  <p>I disabled wifi, retstarted the Bluetooth module on the phone by disabling it and then enabling it.  Like I said above this worked for a while, but now I cannot connect to the device using the connectGatt method.  I also have the Samsung G4 that used the Samsung BLE SDK with Android 4.2.2 working with this same Bluetooth module which works still.</p>
  
  <p>The main thing that I can see in the logcat is that a null pointer exception occurs when I do call the connectGatt(this, false, mBleGattCallback) is this:</p>
  
  <pre><code>10-07 16:29:04.745: DEBUG/BtGatt.GattService(1090): onConnected() - clientIf=4, connId=4, address=3C:2D:B7:84:F8:83
  10-07 16:29:04.745: DEBUG/BluetoothGatt(13165): onClientConnectionState() - status=0 clientIf=4 device=3C:2D:B7:84:F8:83
  10-07 16:29:04.745: WARN/BluetoothGatt(13165): Unhandled exception: java.lang.NullPointerException
  </code></pre>
  
  <p>I can see the code that is being called from the AOSP here: <a href="https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/bluetooth/BluetoothGatt.java" rel="nofollow noreferrer">https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/bluetooth/BluetoothGatt.java</a></p>
  
  <p>Which seems strange since I hand the callback to the connect call which is not null.  Anyone have any ideas?</p>