I have an Artemis Redboard ATP (Arduino 1.8.12) and have BLE working using events thanks to the excellent examples that were provided. To my surprise, getting it to work was much easier than I thought it would be; the hardest part was making the compiler happy (ain’t it always?).
My goal is to use BLE to interact with a ‘machine’ to view its data, and issue commands for debugging and testing using an Android device.
I know how to add BLE services and characteristics before starting BLE. What I need to know is how to add and remove them while BLE is running; in response to log in/out events, menu navigation, etc. Has anyone done this?
TIA!
Gyz
This might be outside the scope of our support team’s expertise; maybe someone from the community might be able to assist. Unfortunately, most of my experience with the Bluetooth on the Artemis is limited this example: https://learn.sparkfun.com/tutorials/ar … etooth-led
If you are using nRF connect, I do know you have to refresh services to see changes because the connections are cached. Otherwise, the best I can do is point you to Arduino’s resources since they maintain the BLE library:
- [https://www.arduino.cc/en/Reference/ArduinoBLE](https://www.arduino.cc/en/Reference/ArduinoBLE)
- [https://github.com/arduino-libraries/ArduinoBLE](https://github.com/arduino-libraries/ArduinoBLE)
- [https://forum.arduino.cc/](https://forum.arduino.cc/)
@Gyzmologist
Why would you try to add/remove BLE services after the BLE instance has been started?
BLE allows for a bunch of different services running concurrently each with a bunch of characteristics and the Artemis boards have plenty of memory to handle all that.
Did not dive deep in ArduinoBLE yet, but yes ArduinoBLE is really easy to get started with.
Me personally am disappointed by Mbed’s BLE… but still did not invest time in learning advanced usage of ArduinoBLE…
Do you have any experinces/data to share what is the highest data throughput between 2 Artemis boards programmed in ArduinoBLE? Good throughput rates could inspire me to deep-dive ArduinoBLE and perhaps could answer your original question then.