GithubHelp home page GithubHelp logo

inakidml / zephyr-dwm1001 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rt-loc/zephyr-dwm1001

0.0 1.0 0.0 1.56 MB

Open source DWM1001 + Zephyr example implementations

Home Page: https://rtloc.com

License: GNU General Public License v3.0

C 84.88% C++ 15.12%

zephyr-dwm1001's Introduction

DWM1001 & Zephyr

This project contains examples on how to use the Ultra Wideband (UWB) and Bluetooth hardware based DWM1001 module together with Zephyr RTOS. It's an adaptation of Decawave's examples distributed along with their driver.

Note upfront: this readme isn't finished yet. It will be improved & extended the following days/weeks.

Getting Started

What's required?

OS

Linux, Mac or Windows!

Hardware

You will need at least one DWM1001-dev board and a micro-USB cable.

Software

There's quite a lot to install if you haven't already. First we're going to build the firmware, after which we can flash it on the board.

Building

Make sure you have CMake (min 3.13.1) and ninja installed on your PC. If you don't have these tools yet, follow the instructions from zephyr here. Note that you don't really need 'west'.

Next up is the toolchain. Instructions can be found here here. Best is to install GNU ARM Embedded as described. Pay attention not to install the toolchain into a path with spaces, and don't install version 8-2018-q4-major (both as described in the warnings). After configuring the environment variables you're almost good to go.

Flashing

In order to flash the boards, you will need nrfjprog. This tool is also available on all 3 main OS's. You can find it here. After installing, make sure that your system PATH contains the path to where it is installed. Typically for Windows this is:

C:\Program Files\Nordic Semiconductor\nrf5x\bin

Zephyr

Now that the development system is set up, we just need Zephyr and the examples itself. They are spread over two github repositories. You can start by downloading the Zephyr distribution that contains the DWM1001 BSP:

Download or clone the zephyr distribution:

git clone https://github.com/RT-LOC/zephyr

Now change your active directory:

cd zephyr

Now source the script zephyr-env.sh (linux & macOS) or run zephyr-env.cmd to make sure all the environment variables are set correctly.

Build your first application

The second github repository is the one that contains the specific DWM1001 example code. Download or clone this repository to your local computer:

git clone https://github.com/RT-LOC/zephyr-dwm1001

Now that we have installed zephyr, we can start building the real examples. We will proceed here with building the first simple example. Note that the procedure to follow for all the other examples is identical.

First let's create a build directory and jump to it.

cd examples/ex_01a_simple_tx
mkdir build
cd build

We configure the build system with Ninja as follows:

cmake -GNinja -DBOARD=nrf52_dwm1001 ..

And we actually build or firmware with ninja:

ninja

Flash

Now let's flash the binary file that we just built onto the board. Make sure you have nrfjprog properly installed and that it is in the system PATH.

Erase the flash:

nrfjprog --family nrf52 --eraseall

Program the binary file on the board:

nrfjprog --family nrf52 --program zephyr/zephyr.hex

Perform a soft reset of the MCU:

nrfjprog --family nrf52 --reset

Examples

The following examples are provided (checkbox checked if all functionality of the example is fully functional):

  • Example 1 - transmission
  • ex_01a_simple_tx
  • ex_01b_tx_sleep
  • ex_01c_tx_sleep_auto
  • ex_01d_tx_timed_sleep
  • ex_01e_tx_with_cca
  • Example 2 - reception
  • ex_02a_simple_rx
  • ex_02b_rx_preamble_64
  • ex_02c_rx_diagnostics
  • ex_02d_rx_sniff
  • ex_02e_rx_dbl_buff
  • Example 3 - transmission + wait for response
  • ex_03a_tx_wait_resp
  • ex_03b_rx_send_resp
  • ex_03c_tx_wait_resp_leds
  • ex_03d_tx_wait_resp_interrupts
  • Example 4 - continuous transmission
  • ex_04a_cont_wave
  • ex_04b_cont_frame
  • Example 5 - double-sided two-way ranging
  • ex_05a_ds_twr_init
  • ex_05b_ds_twr_resp
  • ex_05c_ds_twr_resp_ble
  • Example 6 - single-sided two-way ranging
  • ex_06a_ss_twr_init
  • ex_06b_ss_twr_resp
  • Example 7 - acknownledgements
  • ex_07a_ack_data_tx
  • ex_07b_ack_data_rx
  • Example 8 - low power listen
  • ex_08a_low_power_listen_rx
  • ex_08b_low_power_listen_tx
  • Example 9 - bandwidth power
  • ex_09a_bandwidth_power_ref_meas
  • ex_09b_bandwidth_power_comp
  • Example 10 - GPIO
  • ex_10a_gpio
  • Example 11 - IO
  • ex_11a_button
  • ex_11b_leds
  • Example 12 - BLE
  • ex_12a_ble

What's next?

  • Examples completion
  • (Mobile) readout app

zephyr-dwm1001's People

Contributors

fredericmes avatar fremes avatar wimmar avatar

Watchers

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