Code Monkey home page Code Monkey logo

nrf52-ibeacon's Introduction

nrf52-ibeacon

Sample iBeacon implementation for the nRF52 chipset.

The build environment uses CMake and assumes an nRF52 Development Kit from Nordic Semiconductor.

Usage

Press Button 1 on the DK to start advertising in a loop. LED 2 should light up.

In the default configuration, the beacon will advertise for 3 seconds (LED 3 on) followed by 17 seconds of silence.

In each advertising pulse, the beacon's minor value will increment from 1 to 20.

By default, the beacon broadcasts the following identity:

  • Proximity UUID: 33013f7f-cb46-4db6-b4be-542c310a81eb
  • Major: 204
  • Minor: 1 .. 20

Building the firmware

Create a CMakeEnv.cmake file on the same level as CMakeLists.txt, with the following contents:

set(ARM_NONE_EABI_TOOLCHAIN_PATH "PATH_TO_ARM_GCC_TOOLCHAIN")
set(NRF5_SDK_PATH "PATH_TO_NORDIC_NRF5_SDK")
set(NRFJPROG "PATH_TO_NRFJPROG")

Example using nRF5 SDK 14.2.0, and the most recent version of the GCC ARM toolchain:

set(ARM_NONE_EABI_TOOLCHAIN_PATH "/Users/ahs/local/gcc-arm-none-eabi-7-2017-q4-major")
set(NRF5_SDK_PATH "/Users/ahs/local/nRF5_SDK_14.2.0_17b948a")
set(NRFJPROG "/Users/ahs/local/nRF5x-Command-Line-Tools_9_7_2_OSX/nrfjprog/nrfjprog")

Generate makefiles and build out of source tree:

cmake -H. -B"build"
cmake --build build --target nrf52-ibeacon

Flashing the firmware

cmake --build build --target FLASH_ERASE
cmake --build build --target FLASH_SOFTDEVICE
cmake --build build --target FLASH_nrf52-ibeacon

nrf52-ibeacon's People

Contributors

suzukieng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.