Code Monkey home page Code Monkey logo

esp-nimble-cpp's Introduction

Latest release Release Version Release Date

Need help? Have questions or suggestions? Join the Gitter

esp-nimble-cpp

NimBLE CPP library for use with ESP32 that attempts to maintain compatibility with the nkolban cpp_uitls BLE API.

An Arduino version of this library, including NimBLE, 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 refactored to use the NimBLE stack. In addition, this library will be more actively developed and maintained
to provide improved capabilites and stability over the original.

Testing shows a nearly 50% reduction in flash use and approx. 100kB less ram consumed vs the original!
Your results may vary

What is NimBLE?

NimBLE is a completely open source Bluetooth Low Energy stack produced by Apache.
It is more suited to resource constrained devices than bluedroid and has now been ported to the ESP32 by Espressif.

Installation

ESP-IDF v4.0+

Download as .zip and extract or clone into the components folder in your esp-idf project.

Run menuconfig, go to Component config->Bluetooth enable Bluetooth and in Bluetooth host NimBLE.
Configure settings in NimBLE Options.
#include "NimBLEDevice.h" in main.cpp.
Call NimBLEDevice::init(""); in app_main.

ESP-IDF v3.2 & v3.3

The NimBLE component does not come with these versions of IDF (now included in 3.3.2 and above).
A backport that works in these versions has been created and is available here.
Download or clone that repo into your project/components folder and run menuconfig. Configure settings in main menu -> NimBLE Options.

#include "NimBLEDevice.h" in main.cpp.
Call NimBLEDevice::init(""); in app_main.

Using

This library is intended to be compatible with the original ESP32 BLE functions and types 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.

Also see Improvements_and_updates for information about non-breaking changes.

Full API documentation and class list can be found here.

Using with Arduino as an IDF component and CMake

When using this library along with Arduino and compiling with CMake you must add add_compile_definitions(ARDUINO_ARCH_ESP32=1)
in your project/CMakeLists.txt after the line include($ENV{IDF_PATH}/tools/cmake/project.cmake) to prevent Arduino from releasing BLE memory.

Acknowledgments


esp-nimble-cpp's People

Contributors

h2zero avatar wakwak-koba avatar davidjrobertson avatar gkoh avatar lknop avatar boozer2 avatar ketan avatar j4m3s avatar huming2207 avatar deepak4395 avatar davidlehrian avatar corneliusmunz avatar bascy avatar mr-mime avatar asukiaaa avatar aronrubin avatar doudar avatar

Watchers

James Cloos 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.