Skip to content

zhoujing/for_cursor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nRF54L15 BLE Beacon Project

This project implements a BLE beacon application for the nRF54L15 microcontroller using the Nordic Connect SDK (NCS). The beacon alternates between iBeacon and Eddystone-URL advertisement formats every 30 seconds.

Features

  • Dual Protocol Support: Implements both iBeacon and Eddystone-URL beacon protocols
  • Automatic Mode Switching: Alternates between beacon types every 30 seconds
  • LED Indication: Visual feedback through onboard LED
  • Optimized for nRF54L15: Configured specifically for the nRF54L15 hardware
  • Low Power: Optimized advertising parameters for battery operation

Hardware Requirements

  • nRF54L15 Development Kit (nRF54L15DK)
  • Nordic Connect SDK (NCS) v2.7.0 or later

Project Structure

├── CMakeLists.txt              # Main build configuration
├── prj.conf                    # Project configuration
├── west.yml                    # Dependency management
├── sample.yaml                 # Sample documentation
├── src/
│   └── main.c                  # Main application code
└── boards/
    ├── nrf54l15dk_nrf54l15_cpuapp.conf     # Board configuration
    └── nrf54l15dk_nrf54l15_cpuapp.overlay  # Device tree overlay

Build Instructions

Prerequisites

  1. Install Nordic Connect SDK (NCS) v2.7.0 or later
  2. Set up the development environment following Nordic's setup guide
  3. Ensure west and build tools are properly installed

Building

  1. Initialize the west workspace (if not already done):

    west init -m https://github.com/nrfconnect/sdk-nrf --mr v2.7.0
    west update
  2. Navigate to the project directory:

    cd path/to/ble_beacon_project
  3. Build the project:

    west build -b nrf54l15dk_nrf54l15_cpuapp
  4. Flash to the development kit:

    west flash

Building with Custom Configuration

To modify beacon parameters, edit the following files:

  • src/main.c: Change UUID, Major/Minor values, advertising intervals
  • prj.conf: Modify BLE stack configuration
  • boards/nrf54l15dk_nrf54l15_cpuapp.conf: Board-specific optimizations

Beacon Configuration

iBeacon

  • UUID: 6E400001-B5A3-F393-E0A9-E50E24DCCA9E
  • Major: 0x0001
  • Minor: 0x0001
  • Measured Power: -61 dBm

Eddystone-URL

  • URL: https://nordicsemi.com
  • TX Power: -8 dBm

Usage

  1. Power on the nRF54L15DK after flashing
  2. The green LED will start blinking to indicate advertising
  3. The beacon will alternate between iBeacon and Eddystone modes every 30 seconds
  4. Use a BLE scanner app to detect the beacon advertisements

Debugging

Enable RTT logging for detailed debug output:

west build -b nrf54l15dk_nrf54l15_cpuapp -- -DCONFIG_USE_SEGGER_RTT=y

Connect with J-Link RTT Viewer or west debug to see log messages.

Customization

Changing Beacon Parameters

  1. iBeacon UUID: Modify ibeacon_uuid array in src/main.c
  2. Major/Minor: Update the manufacturer data in ibeacon_ad structure
  3. Eddystone URL: Modify the service data in eddystone_ad structure
  4. Advertising Interval: Adjust adv_param.interval_min/max values
  5. Mode Switch Time: Change the timer period in bt_ready_cb()

Power Optimization

For battery-powered applications:

  • Increase advertising intervals
  • Reduce TX power
  • Implement sleep modes between advertisements

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Support

For questions and support:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors