BLEClass has no member named sendData


#1

I’m trying to flash the local communixation example program below to a Bluz DK.

void loop()
{
System.sleep(SLEEP_MODE_CPU);

if (Particle.connected() && millis() - timeLastSent > 2000) 
{
uint8_t data[3] = {0x01, 0x02, 0x03};
BLE.sendData(data, sizeof(data));
timeLastSent = millis();

digitalWrite(LED, ledOn ? LOW : HIGH);
ledOn = !ledOn;
}

}

The error I get is :

bluzdksenddata.cpp: In function ‘void loop()’:
bluzdksenddata.cpp:19:9: error: ‘class BLEClass’ has no member named 'sendData’
System.sleep(SLEEP_MODE_CPU);
^

make[2]: *** […/build/target/user/platform-103bluzdksenddata.o] Error 1
make[1]: *** [user] Error 2
make: *** [/mnt/compile-service-shared-workspace/103_bluz_40_1/firmware/modules/bluz/user-part/makefile] Error 2

I am able to upload other simple programs without errors.
Can anyone help me?


#2

That feature requires 1.1.47 to be used. Are you using the Web IDE? Can you click on the Devices screen and make sure the device you are compiling for has 1.1.47 selected?


#3

Yes, I tried with 1.1.47 and it flashes OK. Thank you.