'BleUuid' does not name a type

I was going to experiment with BLE on the Argon so I started with the UART example code from https://docs.particle.io/tutorials/device-os/bluetooth-le/#uart-peripheral

However, when I try to compile in Workbench or Wed IDE, I get a series of errors related to BLE types, for example:

'BlePeerDevice' does not name a type
'BleCharacteristic' does not name a type

Is there a library to include that is not in the documentation? The Argon is running 1.3.0-rc.1

It might be that your Argon has device OS 1.3.0-rc.1 installed, but are you actually targeting that version in your build?
Check the target setting of your device in Web IDE.

Thanks @ScruffR! That was exactly the problem! I was targeting v 1.2.1 in Web IDE

Followup about Workbench: I had been targeting 1.3.0-rc.1, but in the bottom bar it still said 1.2.0. I manually installed the toolchain for 1.3.0-rc.1 and now I’m able to flash 1.3.0-rc.1 in Workbench as well! Even though there are no errors, in the code window I still see

identifier “BleAdvertisingData” is undefined

Is there something else I need to update?

Thanks!

That's probably another instance of IntelliSense not picking up all the sources available for the compiler.
If it builds, it builds - don't care when IntelliSense claims it wouldn't :wink:

1 Like