Showing results for 
Search instead for 
Did you mean: 

PSoC™ 4

Not applicable


I followed the available tutorial and used the PSoC BLE and Android code available at GitHub - cypresssemiconductorco/bleapp.

In the BLE100 app, I'm able to turn on/off the red LED, but the Capsense is not working. When I enable "Notify" the "Capsense value" becomes "No Touch", but the app doesn't show values when I slide the finger in the sensor. However, the Capsense works with the Cysmart app.

The only changes I made were in the file, to be able to search for devices and discover services and characteristics.

What can be the problem?

1 Solution

Hello Jose,

I checked by running the Github Source code and by changing the UUIDs as provided by PSoC Creator. Yes, what you said is true, the LED works, but the Capsense Values aren't getting updated. I checked the code and here is the solution. Change the following function in file:

  public void onCharacteristicChanged(BluetoothGatt gatt,

  BluetoothGattCharacteristic characteristic) {

  String uuid = characteristic.getUuid().toString();


// In this case, the only notification the apps gets is the CapSense value.
  // If the application had additional notifications we could
  // use a switch statement here to operate on each one separately.

if(uuid.equalsIgnoreCase(capsenseCharacteristicUUID)) {
mCapSenseValue = characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_SINT16,0).toString();

  // Notify the main activity that new data is available


So the UUID stored on GATT Database is converted to lower case and the one you provide in the java code if it is in upper case, the .equals() function returns false and hence it doesn't enter the if condition and update the capsense value. Just change .equals() to .equalsIgnoreCase() as highlighted in bold and it will work.



View solution in original post

5 Replies