Git Product home page Git Product logo

ncs-ble-fundamentals's Introduction

nRFConnectSDK BLE Fundamentals

Nordic Semiconductor has deprecated the old nRF5 SDK and now all the new features are developed for their new SDK called nRF Connect which is based on Zephyr RTOS: an open-source real-time operating system for connected and resource-constrained embedded devices. This repository is for my hands-on during the Bluetooth LE Fundamentals course, which can be found here.

SDK version and hardware used during the course

During lesson 6, I used extra hardware to run the nRF Sniffer application to detect and analyze Bluetooth LE packets:

NOTE: Wireshark desktop application was also used during lesson 6 to detect and explore BLE packets.

Bluetooth LE Controller used during the course

As the image below illustrates, the Bluetooth LE (BLE) stack can be divided into two main components: the BLE Host and the BLE Controller. Regarding the BLE controller, the nRF Connect SDK contains two implementations of BLE controller:

  • SoftDevice Controller
  • Zephyr BLE Controller

This means users can use the open-source Zephyr BLE controller implementation, which is vendor independent. This course use the SoftDevice Controller developed by Nordic itself, as it was designed specifically for the nRF52, nRF53 and nRF54 SoCs.

Build and flash Instructions

You must use the nRF Connect for VS Code extension or use the west tool, which is part of the Zephyr RTOS build system:

Using nRF Connect for VS Code extension

  1. Add or open an existing application in the nRF Connect for VS Code extension.

  2. Add a build configuration and choose the correct board to ensure the correct device-tree files are used. Then click the build option.

  3. Connect your board and flash the application by clicking the flash button if you are using the nRF Connect for VS Code extension.

Using west tool

  1. Locate your application path.

  2. Build your application using the following command:

     west build --build-dir <custom_build_directory> -b <board_name> <path_to_your_project> --pristine
    
    • build-dir flag: to specify a custom build directory. If you don't which to specify a custom build directory for the build output you can ommit this flag.
    • b flag: to specify board you are using. In this course I used nRF52840DK so replace <board_name> with nrf52840dk_nrf52840. Your can find more details about board names here.
    • pristine flag: use the pristine build option whenever you have made changes to your input files (as opposed to application/source code files), such as the prj.conf, to make sure that these changes are included in the new build. If you are only making changes to your source code then you can just use the regular non-pristine build option and ommit this flag.
  3. Flash your application using the following command:

     west flash -d <build-path> --erase
    
    • erase flag: this command clears the full flash memory before programming. To erase only the areas of flash memory that are required for programming the new application you have to ommit this flag. With such approach, the old data in other areas will be retained.

More info:

ncs-ble-fundamentals's People

Contributors

gc0rreiab avatar

Watchers

 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.