title: BLE 4.0 getting the broadcast data from device to phone
body: <p><img src="https://i.stack.imgur.com/dPLDl.jpg" alt="enter image description here"></p>
  
  <p>I have two devices. one Android phone with API level more than 18 and other is blue-tooth device 4.0.</p>
  
  <p>Devices are successfully connected to each other.
  Now flow of command is as follow:
  a. Send the "hello" text to blue-tooth device.</p>
  
  <pre><code>UUID uuid = UUID.fromString("18cda784-4bd3-4370-85bb-bfed91ec86af");
  BluetoothGattCharacteristic selectedChar = selectedGattService.getCharacteristic(uuid);
  mBluetoothLeService.setCharacteristicNotification(selectedChar, true);
  boolean flag = selectedChar.setValue("");
  mBluetoothLeService.writeCharacteristic(selectedChar);
  </code></pre>
  
  <p>In this case I am getting hello through the GATT reciver. what is the meaning of this. </p>
  
  <pre><code>registerReceiver(mGattUpdateReceiver, makeGattUpdateIntentFilter());
      private static IntentFilter makeGattUpdateIntentFilter() {
          final IntentFilter intentFilter = new IntentFilter();
          intentFilter.addAction(BluetoothLeService.ACTION_GATT_CONNECTED);
          intentFilter.addAction(BluetoothLeService.ACTION_GATT_DISCONNECTED);
          intentFilter.addAction(BluetoothLeService.ACTION_GATT_SERVICES_DISCOVERED);
          intentFilter.addAction(BluetoothLeService.ACTION_DATA_AVAILABLE);
          intentFilter.addAction(BluetoothLeService.EXTRA_DATA);
          return intentFilter;
      }
  </code></pre>
  
  <p>b. bluetooth device will perform some operations
  auto done by bluetooth device</p>
  
  <p>c. Result of operation is sent to android phone
  Brodcated by device.
  For this I used notification.</p>
  
  <pre><code>public void setCharacteristicNotification(BluetoothGattCharacteristic characteristic,
              boolean enabled) {
          if (mBluetoothAdapter == null || mBluetoothGatt == null) {
              return;
          }
  
          BluetoothGattDescriptor descriptor = characteristic.getDescriptor(UUID
                  .fromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));
          System.out.println("nov7 descriptordescriptor " + descriptor);
          if (descriptor != null) {
              descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
              mBluetoothGatt.writeDescriptor(descriptor);
          }
      }
  </code></pre>
  
  <p>I am not getting any data. Any idea please.</p>