Rapid prototyping on mbed BLE
mbed comes from a heritage of rapid prototyping and allows you to test code and ideas on BLE devices very easily. For a truly awesome BLE experience, however, you’ll need to pair mbed with tools for rapidly prototyping the app side of your solution. This article reviews tools that you might find useful in the early stages of development:
Feed user interaction directly to the BLE device using hardware inputs, for example a touchscreen.
Use generic BLE apps to see information sent from the device and send simple commands.
Once your prototype works as you wanted, you can invest some more time in your user input, including creating full-fledged apps.
mbed supports a wide range of components, and many of them can be used to prototype user interaction. For example, touch screens, wireless controllers or the buttons on the mbed board itself can be used for simple inputs.
Evothings isn’t an mbed tool, but since it’s designed for the Internet of Things it works quite well with our BLE-enabled boards. It gives you the Evothings Studio on which to build your prototyping app, and an enveloping Evothings App that lets you run the app you built on your smartphone without custom-building it for each OS. You’ll see Evothings from time to time in our own samples, such as the custom GAPP service sample.
Generic BLE apps
You can use a generic BLE app to see information sent by your device. In our samples we often use one of the following:
These apps scan for nearby BLE devices and display the information received from their advertising mode. They can also establish a connection (connected mode), receive notifications and send user input to the device. You can see an example of this in our actuator service template, where we use the nRF Master Control Panel to send a new value to a read/write characteristic:
Debugging isn’t a prototyping technique, but since you can use it to show that your code works, it can be used as a first step or even as a proof of concept.
Using the mbed interface chip
You can use the mbed Interface Chip to receive messages from either
pyOCD. These are reviewed as part of our debugging with the interface chip section.
Using the UART service
The UART Service can be used to debug directly over the BLE connection (with the aid of an app). For more information, see our debugging with the UART service section.
Third party sniffers can intercept BLE communication on your phone or on dedicated hardware. For more information, see our debugging with sniffers section.