GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - h2zero/NimBLE-Arduino: A fork of the NimBLE library structured for compilation with Arduino, for use with ESP32, nRF5x.

BranchesTags
Open more actions menu

Latest commit

 

History

766 Commits
766 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
examples
examples
 
 
src
src
 
 
.clang-format
.clang-format
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
NOTICE
NOTICE
 
 
README.md
README.md
 
 
library.properties
library.properties
 
 

Repository files navigation

Release Version Release Date

NimBLE-Arduino

A fork of the NimBLE stack refactored for compilation in the Arduino IDE.

Important

Version 2 is now released! Check out the 1.x to 2.x Migration Guide and Release Notes

Supported MCU's

  • Espressif: ESP32, ESP32C3, ESP32S3, ESP32C6, ESP32H2, ESP32C2, ESP32C5
  • Nordic: nRF51, nRF52 series (Requires using n-able arduino core)

Note for ESP-IDF users: This repo will not compile correctly in ESP-IDF. An ESP-IDF component version of this library can be found here.

This library significantly reduces resource usage and improves performance for ESP32 BLE applications as compared with the bluedroid based library. The goal is to maintain, as much as reasonable, compatibility with the original library but but using the NimBLE stack. In addition, this library will be more actively developed and maintained to provide improved capabilities and stability over the original.

For Nordic devices, this library provides access to a completely open source and configurable BLE stack. No softdevice to work around, allowing for full debugging and resource management, continuous updates, with a cross platform API.

Arduino installation

Arduino Library manager: Go to sketch -> Include Library -> Manage Libraries, search for NimBLE and install.

Alternatively: Download as .zip and extract to Arduino/libraries folder, or in Arduino IDE from Sketch menu -> Include library -> Add .Zip library.

#include "NimBLEDevice.h" at the beginning of your sketch.

Platformio installation

  • Open platformio.ini, a project configuration file located in the root of PlatformIO project.
  • Add the following line to the lib_deps option of [env:] section:
h2zero/NimBLE-Arduino@^2.5.1
  • Build a project, PlatformIO will automatically install dependencies.

Using

This library is intended to be compatible with the original ESP32 BLE functions and classes with minor changes.

If you have not used the original Bluedroid library please refer to the New user guide.

If you are familiar with the original library, see: The migration guide for details about breaking changes and migration.

If you already use this library and need to migrate your code to version 2.x see the 1.x to 2.x Migration Guide.

Full API documentation and class list can be found here.

For added performance and optimizations see Usage tips.

More advanced examples highlighting many available features are in examples/ NimBLE_Server, NimBLE_Client.

Beacon examples provided by @beegee-tokyo are in examples/ BLE_Beacon_Scanner, BLE_EddystoneTLM_Beacon.

Change the settings in the src/nimconfig.h file to customize NimBLE to your project, such as increasing max connections, default is 3 for the esp32.

Debugging

All NimBLE debug configuration options are located in src/nimconfig.h. Uncomment and modify the desired settings before compiling.

Recommended debug configuration

For connection and protocol debugging:

#define MYNEWT_VAL_BLE_HS_LOG_LVL 1
#define MYNEWT_VAL_NIMBLE_CPP_LOG_LEVEL 3
#define MYNEWT_VAL_NIMBLE_CPP_ENABLE_RETURN_CODE_TEXT
#define MYNEWT_VAL_NIMBLE_CPP_ENABLE_GAP_EVENT_CODE_TEXT

Development Status

This Library is tracking the esp-nimble repo, nimble-1.5.0-idf branch, currently @e3cbdc0.

Sponsors

Thank you to all the sponsors who support this project!

If you use this library for a commercial product please consider sponsoring the development to ensure the continued updates and maintenance.

Acknowledgments

  • nkolban and chegewara for the original esp32 BLE library this project was derived from.
  • beegee-tokyo for contributing your time to test/debug and contributing the beacon examples.
  • Jeroen88 for the amazing help debugging and improving the client code.

About

A fork of the NimBLE library structured for compilation with Arduino, for use with ESP32, nRF5x.

h2zero.github.io/NimBLE-Arduino/

Topics

arduinoarduino-ble-libraryarduinobleblebluetoothbluetooth-arduinobluetooth-lebluetooth-low-energyesp32nimblenimble-arduino-librarynrf51nrf52

Resources

Readme
Apache-2.0 license
Activity

Stars

1.1k stars

Watchers

27 watching

Forks

224 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.