title: Pairing to a CC2540 Bluetooth LE Device
body: <p>I am trying to connect to a BLE devices based on CC2540 from TI (I have the keyfob from TI, and another device from connectblue OLP425) with my Motorola RAZR, the only succes I had so far is an app named Propagation on the market that I don't have access to the sources.</p>
  
  <p>I tried to connect to the device with this code but the biggest thing I don't understand is the UUID,</p>
  
  <p>I downloaded an app on a iPad 3 and I found a device has the following UUID
  00000000-0000-0000-ff31-1a064f8c5966</p>
  
  <pre><code>private static final UUID SPP_UUID = UUID.fromString("00000000-0000-0000-ff31-1a064f8c5966");
  BluetoothDevice bd  =BluetoothAdapter.getDefaultAdapter().getBondedDevices().iterator().next();
  //I only have I device paired that is the Bluetooth Low Energy Device so using the first Device returned by the iterator is fine.
      try {
          BluetoothSocket bs = bd.createRfcommSocketToServiceRecord(UUID);
          bs.connect();
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  </code></pre>
  
  <p>All I get is a Service discovery failed in logcat</p>
  
  <p>In almost all the example everyone is using </p>
  
  <p>00000000-0000-1000-8000-00805f9b34fb</p>
  
  <p>If I go further in the app it syas that the battery service is UUID 0x180f</p>
  
  <p>I would just like to create an app the read the value of this service which is a simple decimal value</p>
  
  <p>anyone has any succes pairing with a BLE device in the past?</p>
  
  <p>thank you</p>
  
  <p>Jonathan</p>