Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ble-beacon

BLE beacon based on nRF51822 MCU.

dcf77_clock_assembled

Capabilities

  • Bluetooth Low Energy 4.2 compatible
  • Switching between Apple's iBeacon and Google's Eddystone beacon standards
  • Compatible with nRF Beacon and nRF Beacon for Eddystone mobile applications
  • Additional data included in scan response for iBeacon (voltage and temperature)
  • Ability to switch to connectable mode and, when connected:
    • set advertised manufacturer data (major and minor version, company ID, UUID, and reference RSSI for iBeacon mode)
    • configure advertising interval
    • enable or disable LED indication
    • handle Nordic LED Button Service
    • perform Buttonless DFU over BLE (Nordic Secure DFU)

System architecture

Pure bare-metal architecture using nRF5 SDK, SoftDevice, and the Application Scheduler library.

c4_level_2_diagram

BLE Services

Service Service UUID Characteristic Characteristic UUID Properties Permissions Descriptors Description
Advertising Data Battery Service (BAS) 0x180F Broadcast Battery level advertised in BLE advertising packet
Advertising Data Health Thermometer Service 0x1809 Broadcast Temperature advertised in BLE advertising packet
Nordic LBS 00001523-1212-efde-1523-785feabcd123 Button 00001524-1212-efde-1523-785feabcd123 Read, Indicate Read CCC (0x2902) Button state
Nordic LBS 00001523-1212-efde-1523-785feabcd123 LED 00001525-1212-efde-1523-785feabcd123 Write Write Authenticated LED control
Beacon Config 955a1523-0fe2-f5aa-a094-84b8d4f3e8ad Beacon UUID 955a1524-0fe2-f5aa-a094-84b8d4f3e8ad Read, Write Read, Write iBeacon UUID (16 bytes)
Beacon Config 955a1523-0fe2-f5aa-a094-84b8d4f3e8ad Calibration 955a1525-0fe2-f5aa-a094-84b8d4f3e8ad Read, Write Read, Write Measured RSSI @1m (int8, dBm)
Beacon Config 955a1523-0fe2-f5aa-a094-84b8d4f3e8ad Major & Minor 955a1526-0fe2-f5aa-a094-84b8d4f3e8ad Read, Write Read, Write Major + Minor (2x uint16, big-endian)
Beacon Config 955a1523-0fe2-f5aa-a094-84b8d4f3e8ad Manufacturer ID 955a1527-0fe2-f5aa-a094-84b8d4f3e8ad Read, Write Read, Write BLE company identifier (e.g. 0x004C for Apple iBeacon)
Beacon Config 955a1523-0fe2-f5aa-a094-84b8d4f3e8ad Connection Interval 955a1528-0fe2-f5aa-a094-84b8d4f3e8ad Read, Write Read, Write Preferred connectable advertising interval (uint16, ms)
Beacon Config 955a1523-0fe2-f5aa-a094-84b8d4f3e8ad LED Config 955a1529-0fe2-f5aa-a094-84b8d4f3e8ad Read, Write Read, Write LED behavior configuration
Eddystone Config a3c87500-8ed3-4bdf-8a39-a01bebede295 Capabilities a3c87501-8ed3-4bdf-8a39-a01bebede295 Read Read Supported frames, slots, features
Eddystone Config a3c87500-8ed3-4bdf-8a39-a01bebede295 Active Slot a3c87502-8ed3-4bdf-8a39-a01bebede295 Read, Write Read, Write Currently selected advertising slot
Eddystone Config a3c87500-8ed3-4bdf-8a39-a01bebede295 Advertising Interval a3c87503-8ed3-4bdf-8a39-a01bebede295 Read, Write Read, Write Advertising interval (ms)
Eddystone Config a3c87500-8ed3-4bdf-8a39-a01bebede295 Radio Tx Power a3c87504-8ed3-4bdf-8a39-a01bebede295 Read, Write Read, Write Radio transmit power (dBm)
Eddystone Config a3c87500-8ed3-4bdf-8a39-a01bebede295 (Advanced) Advertised Tx Power a3c87505-8ed3-4bdf-8a39-a01bebede295 Read, Write Read, Write Calibrated Tx power in frame
Eddystone Config a3c87500-8ed3-4bdf-8a39-a01bebede295 Lock State a3c87506-8ed3-4bdf-8a39-a01bebede295 Read, Write Read, Write Beacon lock status
Eddystone Config a3c87500-8ed3-4bdf-8a39-a01bebede295 Unlock a3c87507-8ed3-4bdf-8a39-a01bebede295 Read, Write Read, Write Unlock challenge/response
Eddystone Config a3c87500-8ed3-4bdf-8a39-a01bebede295 Public ECDH Key a3c87508-8ed3-4bdf-8a39-a01bebede295 Read Read Public key for secure config
Eddystone Config a3c87500-8ed3-4bdf-8a39-a01bebede295 EID Identity Key a3c87509-8ed3-4bdf-8a39-a01bebede295 Read Read Identity key for EID
Eddystone Config a3c87500-8ed3-4bdf-8a39-a01bebede295 ADV Slot Data a3c8750a-8ed3-4bdf-8a39-a01bebede295 Read, Write Read, Write Frame data (UID/URL/TLM/EID)
Eddystone Config a3c87500-8ed3-4bdf-8a39-a01bebede295 (Advanced) Factory Reset a3c8750b-8ed3-4bdf-8a39-a01bebede295 Write Write Reset configuration to defaults
Eddystone Config a3c87500-8ed3-4bdf-8a39-a01bebede295 (Advanced) Remain Connectable a3c8750c-8ed3-4bdf-8a39-a01bebede295 Read, Write Read, Write Keep device connectable flag
Buttonless DFU Service (Exp) 8e400001-f315-4f60-9fb8-838830daea50 Buttonless DFU 8e400001-f315-4f60-9fb8-838830daea50 Write, Notify Write CCC (0x2902) Trigger DFU mode (jump to bootloader)
Secure DFU Service 0xFE59 DFU Packet 8ec90002-f315-4f60-9fb8-838830daea50 Write Without Response Write Firmware data / command objects
Secure DFU Service 0xFE59 DFU Control Point 8ec90001-f315-4f60-9fb8-838830daea50 Write, Notify Write CCC (0x2902) DFU commands and responses

User Interface

  • Button 0 – Switch to connection mode / Enter bootloader on startup

  • LED 0 – Advertising / Connectable advertising / Connected / Bootloader mode indication

  • Button 1 – Button for Nordic LBS

  • LED 1 – LED for Nordic LBS

Tools

  • CMake 3.20.0
  • Ninja 1.11.1
  • Arm GNU Toolchain 13.2.rel1 (Build arm-13.7) 13.2.1 20231009
  • JLink v796k
  • nrfutil 8.0.0

External libraries

  • nRF5 SDK v12.3.0
  • SoftDevice s130_nrf51_2.0.1

Build

Generate ninja files

cmake --preset <hw_version>_<config>

Generate private key for DFU

cmake --build build --target generate_key --parallel

Build project

cmake --build --preset <hw_version>_<config>

External links

nRF51822 revisions

Android nRF Beacon for Eddystone

About

Bluetooth Low Enegry beacon based on nRF51822.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages