ArduinoBLE icon indicating copy to clipboard operation
ArduinoBLE copied to clipboard

Docs: mention the requirement to discoverService() before reading a characteristic

Open nevyn opened this issue 2 years ago • 0 comments

At: https://www.arduino.cc/reference/en/libraries/arduinoble/bledevice.characteristic/

It would be helpful to mention in the main documentation body for BLEDevice.characteristic() that the API requires you to either BLEDevice.discoverAttributes() or BLEDevice.discoverSerivce() first. It is hinted at from the example, but it's really easy to miss.

It could also be mentioned in the conceptual documentation over at https://www.arduino.cc/reference/en/libraries/arduinoble/ that characteristics need to be discovered before being queried. There are sections about notifying and writing characteristics, but no section about basic reading of characteristics; that could be a good place to mention it.

Thanks!

nevyn avatar Jul 14 '23 06:07 nevyn