How to equip Spresense with Bluetooth Low Energy (BLE)

Connectivity based on Bluetooth Low Energy (BLE) is ideal when only local connectivity is needed and the amount of data to be transferred is limited and only sent periodically. This connectivity option consumes very little power.

To equip the Spresense development board with BLE, we simply plug the add-on board (created by Rohm) onto the main board of Spresense.

In this tutorial we'll be doing a simple serial communications test using BLE. Here is the list of components we'll use in the steps below:

  • Spresense main board
  • BLE add-on board (made by Rohm)
  • A USB micro cable
  • A smartphone

Note: To use the UART pins on the main board when attached to the extension board, connect a 2.54mm pitch jumper to pin 1 and 2 on JP10 of the extension board to disable the extension board UART. For more details see How to use the UART.

Step 1

Start by downloading this repository: https://github.com/RohmSemiconductor/Arduino

We will use the sample in the “MK71251-02” folder.

Open the “MK71251-02.ino” sketch in the Arduino IDE and upload it to Spresense through the USB cable.

Step 2

Open the serial monitor of the Arduino IDE and set the baud rate to 115200.

Step 3

To communicate with the Spresense board, we download the app “BLE Tool” from Lapis Semiconductor to the smartphone.

Open the app and locate the device in the list with the name “LapisDev”. (This is the BLE name of the Spresense unit set by the “MK71251.cpp” file.)

Step 4

Connect to the device from the smartphone and open the Serial Port Profile.

Step 5

Now you can type “Hello” and press “Send” and you will see the characters transmitted using BLE to the serial monitor. If you send a capital ‘Z’, then the Spresense unit will send the characters “WRITING TEST” back to the smartphone.

The BLE add-on board uses AT commands to control the communication. To get the full AT command specification, register and log in to the Lapis Semiconductor support site: https://www.lapis-semi.com/cgi-bin/MyLAPIS/regi/login.cgi