Software prerequisites
- Segger Embedded Studio for ARM (SES). Tested with v4.12, all versions are available here. At some point after launch, it will request a license. Fortunately, it's free for nRF development - just fill all fields and request it.
- nRF SDK 12.3.0.
Download and unzip it anywhere (e.g.
C:/Dev/nRF5_SDK_12.3.0_d7731ad
), then in SES go to Tools -> Options -> Building -> Global macros and set NRF_SDK_12_PATH to path chosen above (e.g.NRF_SDK_PATH=C:/Dev/nRF5_SDK_12.3.0_d7731ad
). - Some additional files are required which aren't yet present in nRF SDK 12.3.0 (and more modern SDKs doesn't support nRF51 chips). To get
them download nRF SDK 15.3.0, unzip it
somewhere and copy
modules
subfolder to the nRF SDK 12.3.0 folder.
To open the project in SES, open ble_blinky_client_beacon.emProject
(this is a SES project file).
Hardware setup
Requirements:
- One of nRF devkits.
- nRF51 beacon.
Connect VDD
, GND
, SWDIO
and SWDCLK
according to the
devkit and beacon pinouts.
Behaviour
On button press, for 1 seconds tries to discover advertising BLE devices fullfilling the following:
- Device name is
Nordic_Blinky
. - RSSI is very high (device typically should be just a few centimetres away).
- Device exposes blinky service/characteristic.
If found, sends a characteristic write to the device and disconnects.
Notes
Based on nRFs BLE Blinky Client Application Example.