Skip to content

Latest commit

 

History

History
135 lines (105 loc) · 8.39 KB

README.md

File metadata and controls

135 lines (105 loc) · 8.39 KB

mynewt-dw1000-core

Build Status

Overview

The distribution https://github.com/decawave/mynewt-dw1000-core contains the device driver model for the Decawave DW1000 Impulse Radio-Ultra Wideband (IR-UWB) transceiver within the Mynewt-OS. The driver includes hardware abstraction layers (HAL), media access control (MAC) layer, Ranging Services (RNG) and light weight IP (lwip) stacks. The DW1000 driver and Mynewt-OS combine to create a hardware and architecture agnostic platform for IoT Location Based Services (LBS). This augmented with the newtmgt management tools creates a compelling environment for large-scale deployment of LBS. The newt management tool uses a repo methodology for package management. The driver contained herein becomes a dependent repo for any DW1000 related project and is automatically included in projects as required––the https://github.com/decawave/mynewt-dw1000-apps showcases this relationship.

This repo also contains the board support package (BSP) for the Decawave dwm10001 module and dwm1001-dev kit. The dwm1001 includes a nrf52832 and the dw1000 transceiver. dwm1001-dev is a breakout board that supports a Seggar OB-JLink interface with RTT support. The mynewt build environment provides a clean interface for maintaining these BSPs, and the contained DWM1001 BSP can serve as a template for other DW1000 enabled platforms. The dwm1001-dev and the driver contained herein provide a clean out-of-the-box experience for UWB LBS products.

A single dw1000 transceiver can be used to form a 6LowPAN mesh network while concurrently measuring distance between nodes. Dual DW1000 devices can be used to measure Range and Azimuth also known as Angle-of-Arrival (AoA). With this intent, this driver is thread-safe and multi-instance. The driver has a hierarchical architecture and is partitioned into functional groups.

Under-the-hood

The mynewt-dw1000-core driver implements the MAC layers and exports a MAC extension interface for additional services, this MAC interface is defined in the struct _dw1000_mac_interface_t found in (../master/hw/driver/dw1000/include/dw1000_dev.h)

Ranging Services (RNG)

Ranging services binds to the MAC interface--this interface exposes callbacks to various events within the ranging process. The driver currently support the following ranging profiles;

Default Config:

Config Description Value
PRF Pulse Repetition Frequency 64MHz
PLEN Preamble length 128
NPHR Number of symbols 16
SDF start of frame deliminator length 8
DataRate Data Rate 6.8Mbps

RNG profile:

profile Description Benchmark
twr_ss Single Sided Two Way Ranging 1110us
twr_ds Double Sided Two Way Ranging 2420us
twr_ds_ext DS-TWR /w extended data payload 2775us

NRNG profile:

profile Description Benchmark
nrng_ss n TWR_SS ranges with 2*n+2 messages 1860us for n=4, 2133us for n=6
nrng_ds n TWR_DS ranges with 2*n+2 messages TBD us for n=4

Clock Calibration Packet (CCP) Service

The CCP service is the metronome with the system and defines the superframe events. The CCP service has a master and slave profiles. CCP is used in conjunction with Wireless Clock Synchronization (WCS) library and the TDMA library.

Time Division Multiple Access (TDMA) Service

The TDMA library subdivides the superframe into slots. The architecture is a synchronous design with all node/tags confining their transmission to within their assigned slot. The number of slots in the resulting architecture is user defined, and as such consideration should be given to the benchmarks above.

Wireless Clock Synchronization (WCS) Service

With the exception of explicitly wired synchronization, the various clock within the system drifts over time and temperature. The Double Sided Two Way Ranging (DS-TWR) scheme inherently compensates for the clock drift. The WCS service provides a mechanism for explicitly measuring the relative clock skew and compensating for same. With WCS a single-sided two way ranging (SS-TWR) achieves comparable performance to a DS-TWR scheme. With WCS all time measurements are referenced to the master clock, this simplifies the TDOA architecture by distributing the clock synchronization function across nodes.

Light Weight IP (lwIP) Service

Project Status

The mynewt-dw1000-core repo is still a work in progress with the following extension in development:

New Fetures Description schedule
TDOA Time Difference of Arrival profiles 18Q4
PDOA Phase Difference of Arrival profiles 18Q4
OpenThread Shim MAC extension supporting OpenThread stack 18Q4

Current BSPs and supported hardware

File Description

├── dw1000
│   ├── pkg.yml                 // Project file
│   ├── src
│   │   ├── dw1000_cli.c        // Command Line interface 
│   │   ├── dw1000_dev.c        // Driver instance
│   │   ├── dw1000_gpio.c       // GPIO interface
│   │   ├── dw1000_hal.c        // Hardware abstraction
│   │   ├── dw1000_mac.c        // MAC lower layer
│   │   ├── dw1000_otp.c        // One Time Programming API
│   │   ├── dw1000_phy.c        // Physical layer controller
│   │   ├── dw1000_pkg.c        // Mynewt pkg API
│   └── syscfg.yml              // Project config
├── bsp                         // Board Support Packages
│   ├── dwm1001                 // BSP for DWM1001 TWR/TDOA Module
│   ├── dwm1002                 // BSP for DWM1002 Dual DW1000 PDOA Node
│   ├── dwm1003                 // BSP for DWM1002 TWR/PDOA/IMU TAG
│   ├── lps2mini                // BSP for LPS2MINI board from <https://loligoelectronics.com>
│   └── lps2nano                // BSP for LPS2NANO board from <https://loligoelectronics.com>
├── ccp                         // Clock Calibration Packet synchronization 
├── dsp                         // Signal Proceesing library
├── lwip                        // Light weight IP extension
├── openthread                  // OpentThread libraries (As static libraries.No source code available)
├── nrng                        // N ranges in 2*N+2 messages
├── rng                         // TWR toplevel API
├── tdma                        // Time Devision Multiplex API
├── twr_ds                      // Double Sided TWR
├── twr_ss                      // Single Sided TWR
├── twr_ds_ext                  // Double Sided TWR with extended payload
├── twr_ss_ext                  // Single Sided TWR with extended payload
└── wcs                         // Wireless clock synchronization

Building

See the companion repo https://github.com/decawave/mynewt-dw1000-apps for building instructions. Recall that the above driver is a dependent repo and will be built from within that parent project.