This tutorial has been updated, go here for the latest version.
This tutorial will help you get started with a simple BLE service with your new nRF51 Development Kit. The tutorial will explain in detail how to set up and start working with a BLE example project, and how to proceed with testing and using the service. In particular, the tutorial will show how to setup the UART over BLE service.
In order to follow this guide, it is necessary to have read and followed the nRF51 DK user guide. The user guide explains the required tools and software, and how to set them up. It also gives a brief explanation of the layout and hardware of the Development Kit, making it easier to follow this tutorial.
Before the DK can be programmed with a user application, it must be flashed with the correct SoftDevice. The SoftDevice is a preprogrammed hex file that contains all the necessary functions to control the radio. These functions are hidden from the user so that all one has to think about is creating the application. Depending on which chip and SDK is being used, the correct Softdevice must be chosen. To determine which Softdevice you need, the following compatibility matrix can be used. The differences between the softdevices are listed in the SDK documentation.
For this tutorial we will use SoftDevice s130, s130 can act in both peripheral and central roles. In order to figure out which SoftDevice is compatible with which SDK version we can consult the compatibility matrix. We will use s130 version 2.0.0 which is compatible with nRF5 SDK 11.0.0. For further reference the markings on the nRF51 development kit indicate that the chip is revision 3.
Now we need to flash the softdevice onto the development kit. To do this, do the following:
The device is now ready, and can be programmed with a user application.
There are two options for accessing the Nordic SDK, these are the classic .zip structure and something called a Software Pack. We recommend using .zip structure, which is covered in this tutorial.
Navigate to [extract_location]\examples\ble_peripheral\ble_app_uart\pca10028\s130\arm5_no_packs
Open the µVision5 project ble_app_uart_s130_pca10028
If you see the following message, click “yes”.
If you are using the PCA10028 board (nRF51 DK) you can now compile the code and load the program onto the board. If you are using a different board, however, you must change a definition in the project to make it work as expected.
In order to make it easy to port projects between different boards, all projects come with a board support package. In the main.c file, it can be seen that bsp.h is included, which in turn includes boards.h. In the latter file we see some preprocessor directives that check if a certain symbol is defined, and if it is a corresponding header file will be included. These header files are the board-specific files that map the correct pins to the correct external components. For example, on the nrf6310 motherboard, LED_0 is connected to pin 8, while on the PCA_10001 board, LED_0 is connected to pin 18. Porting a project to a different board is then a matter of simply defining the correct board in the project.
In Keil, project defines can be entered in the target options.
In the C/C++ tab, change the BOARD_PCA10028 symbol in the list of Preprocessor Symbols to the board you wish.
The project can now be compiled and flashed onto the development kit.
If everything is working as expected, you can move on to the next tutorial, which will show how to test and debug the ble_app_uart application you have built in this tutorial.
This is one of the Great article I am reading right this psot now. great work and really informative. Carry on with the good work ahead. Thanks for sharing the info with us this info Service host Superfetch
Hey If you are facing Issue regarding windows superfetch in your Project then here is the Detailed guide regarding on it What is Service host Superfetch That's a very Information site they cover all topic of Service host high disk included.
This is one of the best article i am reading right now. great work and really informative and helpful me to. Carry on with the good work ahead. Thanks for sharing the info with us.Service host superfetch
I am using BLE400 motherboard and i followed all the steps and i don't find the LED blink. Please guid me
The nRF51 DK User Guide link is not working! It says page not found.