Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 5 months ago.
Some characteristics missing BLE
I have a BLE service class that looks like the one shown below. It has six characteristics. However, when connecting to the hardware via LiteBlue app, only the first two of the six characteristics are shown. There are other bluetooth services running at parallel. Is it because the limits for number of characteristics have been reached or some other reasons? Please help.
class ExampleService {
public:
ExampleService(BLEDevice &ble);
void setVal1(float val);
void setVal2(float val);
void setVal3(float val);
void setVal4(float val);
void setVal5(float val);
void setVal6(float val);
private:
BLEDevice* _ble;
float val1;
float val2;
float val3;
float val4;
float val5;
float val6;
GattCharacteristic val1Char;
GattCharacteristic val2Char;
GattCharacteristic val3Char;
GattCharacteristic val4Char;
GattCharacteristic val5Char;
GattCharacteristic val6Char; };
Question relating to:
1 Answer
9 years, 5 months ago.
Please accept my apologies for the delay in responding. There may be limits on the number of characteristics and descriptors a particular port of the BLE_API can support. This arises from the desire to control memory consumption. For Nordic port, this is currently defined in the file nRF51GattServer.h to be 24. https://github.com/mbedmicro/nRF51822/blob/master/nRF51GattServer.h#L48 It might be that you've exhausted that limit by having other services in your application. Please update that limit in your sources and recompile.