BLE Characteristic UUID issues sending Data


I’m still having issues trying to send hexidecimal commands to my bluetooth app i’m writing. I get the error above, In one post this was a bug but I still can’t get it to work.

#include <bluefruit.h>
#include <Adafruit_NeoPixel.h>

#define NUM_LEDS_CH1 160  // Number of LEDs in channel 1
#define NUM_LEDS_CH2 160  // Number of LEDs in channel 2
#define NUM_LEDS_CH3 80   // Number of LEDs in channel 3
#define NUM_LEDS_CH4 80   // Number of LEDs in channel 4
#define NUM_LEDS_CH5 60   // Number of LEDs in channel 5

#define DATA_PIN_CH1 13   // Data pin for channel 1
#define DATA_PIN_CH2 11   // Data pin for channel 2
#define DATA_PIN_CH3 8    // Data pin for channel 3
#define DATA_PIN_CH4 6    // Data pin for channel 4
#define DATA_PIN_CH5 4    // Data pin for channel 5

Adafruit_NeoPixel strip_ch1 = Adafruit_NeoPixel(NUM_LEDS_CH1, DATA_PIN_CH1, NEO_GRB);
Adafruit_NeoPixel strip_ch2 = Adafruit_NeoPixel(NUM_LEDS_CH2, DATA_PIN_CH2, NEO_GRB);
Adafruit_NeoPixel strip_ch3 = Adafruit_NeoPixel(NUM_LEDS_CH3, DATA_PIN_CH3, NEO_GRB);
Adafruit_NeoPixel strip_ch4 = Adafruit_NeoPixel(NUM_LEDS_CH4, DATA_PIN_CH4, NEO_GRB);
Adafruit_NeoPixel strip_ch5 = Adafruit_NeoPixel(NUM_LEDS_CH5, DATA_PIN_CH5, NEO_GRB);

BLEDis bledis;
BLEService ledControlService = BLEService(0x180A);
BLECharacteristic patternChar = BLECharacteristic(0x2A57);   // Pattern selection
BLECharacteristic colorChar = BLECharacteristic(0x2A58);

What am i doing wrong?

Hello @rhino-led
The issue is happening because the UUID is not set correctly.
If the documentation only gives four characters for the value, they are assuming you’ll use the default characteristic UUID.

It is discussed more in this previous topic: Trying to connect Bluetooth BP cuff, but struggling with the "characteristic UUID" stuff - #4 by muneer

using nrf connect i see this set as the uuid, am i missing something? or looking in the wrong place?

Hi @rhino-led
Use this as your UUID: 00002A58-0000-1000-8000-00805F9B34FB

The default is 00000000-0000-1000-8000-00805F9B34FB
If the manufacturer is giving you only 4 digit then it is assumed that you need to use the default UUID. It starts with 8 hexadecimal digits and you need to add your 4 digit hexadecimal number as the second part of it. So instead of all zeros it would be 0000 plus your code 2A58

Similar post

This is where i get disconnected, You can see the C+ code above with the 2A58.

Your saying in thunkable use “00002A58-0000-1000-8000-00805F9B34FB” as the UUID to send over?

@rhino-led Yes, set '00002A58-0000-1000-8000-00805F9B34FB” as the UUID on the BLE blocks.

Do you see an error when you try to send data?

Could you please share a screenshot of your blocks?

the first post had my block from thunkable. I did change it to have the full value as you said and this is what happens when i click on the box to trigger sending data to my custom pcb board

Updated block