- iOS Devices with BLE support and running iOS Version 7.0 or later, including:
iPhone 6+/6/5s/5c/5, iPhone 4S, iPad Air/3rd-Gen/4th-Gen, iPad mini, iPod Touch (5th-Gen)
- Android Devices with BLE support and running Android Version 4.3 or later, such as: Nexus 4, Nexus 5 and Nexus 7
(please visit our Android Support page for list of compatible Android devices)
- A host machine with Arduino IDE installed:
Mac, Windows or Linux PC
Hardware Setup (BLE Nano only)
The MK20 USB board is designed to make it easy to deploy firmware to BLE Nano
Solder the connectors for MK20 USB board and BLE Nano
Mount BLE Nano onto MK20 USB board
Install Windows Driver (first time only)
MK20 USB board can be connected to your computer as both a serial port and a removable mass storage disk. On Mac and Linux, this will happen by automatically.
For Windows, you need to install the mbed Windows serial port drive.
Setup mbed Environment
- Go to
mbed official website
. Click on the top-right button to Login or signup if you do not have an mbed acount yet
- Connect RedBearLab nRF51822 or BLE Nano with MK20 USB Board to your PC, the PC should detect a removable mass storage disk named MBED.
- Open the disk, you'll find a file named mbed.htm. Open the file a Browser.
- The Brower will open the corresponding platform page of the board you are using and add the board to your platform list automatically.
- Click on the "Compiler" at top-right corner. It will open the online development environment, then click on the button at top-right corner
- On the popped up window, select the platform you are using at bottom-left corner as your target platform. After you choose the platform, it will show the detail informations about the board. Click on the "Select Platform" at top-right corner to continue.
Build Blinky Application
- Click on the "Menubar > Import" and choose "Programs" to be imported. it will search all the programs stored in the mbed server. Select "mbed_blinky" and click on "Import" button to import the program.
- Rename the program if you wish and check the box to update all libraries to the latest revision, click "Import" to continue.
- After import the program, make sure the current platform at top-right corner is the board that you are using.
BLE Nano only, not required in the future
Open the main.cpp to edit, BLE Nano's on-board LED is connected to P0_19, so we change the LED object from "LED1" to "P0_19"
- Click on the "Menubar > Compile" to compile the program. If everything is ok, it will pop up a message box to let you download the generated hex file for the board you are using.
- Open the MBED disk and drag the downloaded hex file and drop it into the disk. After the file is uploaded, the LED on the board should start blinking.
Build Beacon Application
- Click on the "Menubar > Import" and choose "Programs" to be imported. Type "nRF51822" in the search box. It will search all the relative programs stored in the mbed server. Select "BLE_Beacon" and click on "Import" button to import the program.
- Rename the program if you wish and uncheck the box, not to update the libraries to the latest revision, as the latest BLE library version may prompt errors when compiling, click "Import" to continue.
- Open the main.cpp to edit, we change the Beacon's advertising UUID to 0xE2C56DB5-DFFB-48D2-B060-D0F5A71096E0 which is the default UUID used by a lot of samples.
- Make sure the current platform at top-right corner matches the board that you are using, click on the "Menubar > Compile" and download the hex file.
- Open the MBED disk and drag the downloaded hex file into the disk. Your BLE Nano or RedBearLab nRF51822 board becomes a BLE Beacon.
*You must register your BLE Nano or RedBearLab nRF51822 board first before you could access our pre-release library, you will find a product registration card inside the product box with the instruction on how to register.
Setup Arduino IDE and Library
- Download Arduino IDE version 1.5.7 from Arduino website and install it to your PC
- Download RedBearLab nRF51822 add-on for Arduino IDE 1.5.7, which including the nRF51822 board configuration and library
- Merge the "hardware" folder that under "(downloaded packet path)..\arduino-1.5.x" to the "hardware" folder that under "(Arduino 1.5.7 installation path)..\arduino-1.5.7". Merge the folders and replace the files that are existed, no worry, our files do not overwrite the existing boards configuration and libraries. Then in your Arduino IDE folder, inside hardware/arduino, you should see three folders:
- Open Arduino IDE 1.5.7. Under "Menubar > Tools > Board" you will see the ReaBearLab boards being added. Choose the board you are using as your target board (we use BLE Nano for demonstration).
- Connect RedBearLab nRF51822 or BLE Nano mounted on MK20 USB board to your PC, a removable mass storage disk named MBED should appear. On Arduino IDE, under "Menubar > Tools > Port" you will see a comport number for your board.
- Follow the instruction on the README.md page of the RedBearLab nRF51822 add-on to finish the setup.
Build Blink application
- Open the Blink sketch: "File > Examples > 01.Basics > Blink".
- Then upload the sketch, clicking on the Right Arrow button at the IDE toolbar to begin uploading (it will compile first).
- After uploaded the sketch, the LED on the board should start blinking.