Giter VIP home page Giter VIP logo

dwm1001_firmware_localization's Introduction

DWM1001 Firmware for Localization

NOTE: This set of projects require Zephyr Version 2.5.

This project contains examples on how to use the Ultra Wideband (UWB) and Bluetooth hardware based DWM1001 module together with Zephyr RTOS. Specifically, this repository is the one of examples to esimate tag's position through triangulation between a tag and anchors. Thus, to run this example, you need at least four dwm1001 board (1 tag, 3 anchors).

This repository is based on

The major changes from these original sources are:

  • Write example code for localization with trianulation.
  • Change many lines to build it on Zephyr RTOS 2.5.
  • Make GUI with our custum BLE communication.

If you wanna more insight about DWM firmware, you should visit above repositories. Then, you can find other examples.

NOTE: If you wanna see UART example instead of BLE communication, Please move to "uart" branch in this repository.

Getting Started

What's required?

OS

Linux 18.04 (I tested it on only Linux. But, I think it will be run if you install python3.x and Zephyr on Windows and Mac OS.)

Hardware

'DWM1001-dev', 'DWM1001c', 'MDEK1001'. But, again, to run this example, you need at least four boards.

Software

  • Zephyr RTOS (to build the firmware): Follow the instructions from Zephyr here

  • nRF-Command-Line-Tools_10_12_1_Linux-amd64 (to download the frimware to the board): You can find it here

  • wxPython (for GUI):

pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/ wxPython
sudo apt-get install git curl libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-2.0-0
  • Gatt Client (for BLE communication) Reference:
sudo pip3 install gatt
sudo apt-get install python3-dbus

Download of Tag's Firmware

This firmware has the following functions

  • Distance estimation between tag and each anchors (default: 3)
  • BLE communication between tag and other device (such as computer, RasberryPi, etc)

You can find source code of the tag's firmware, as follow:

cd apps/ss_initiator

To build this example

mkdir build
cd build
make

To Download this example to your DWM board

make flash

NOTE: If you get error messages from the above procedure, you should check your Zephyr RTOS version.

NOTE: The firmware of Tag is to communicate with each anchors (default, three anchors). If you wanna change the number of anchors, please modify the following line in main.c

#define NUM_ANCHOR 3

Note: The BLE(Bluetooth Low Energy)'s name is automatically set as "DWM1001_TAG". And the default Cahracterisitcs UUID is de259bcd-1d7c-48db-a7e3-4759ac040002

Download of Anchor's Firmware

This firmware has the following function

  • Communication btw tag

You can find source code of the anchor's firmware, as follow:

cd apps/ss_respondor

To build this example

mkdir build
cd build
make

To Download this example to your DWM board

make flash

NOTE: If you get error messages from the above procedure, you should check your Zephyr RTOS version.

NOTE: The firmware of each anchors has id. So you should change the id of each anchor in main.c.

int my_id = 1; //1, 2, 3 

GUI

If you succesfully run a tag and anchors, you can use GUI system which is based on https://github.com/amalabey/dwm1001-gatt-client

To operate GUI, the first step is

cd gui

For detecting your Tag's BLE mac address

echo "power on" | sudo bluetoothctl
sudo python3 dwm1001.py --discover

Then you can find the mac address of your tag (The default tag name is DWM1001-Tag) Please change the mac address in dwm1001.py and LocationTrackerWorker.py

mac_address='e3:ec:26:c3:38:45'

Finally, to run GUI

sudo python3 main.py

Then you can find this window on your computer image

For Debugging

If you are developing on a Linux or OSX system and have installled the JLink package, then you can use the rtt.sh script (in the root directory) to start console instance.

dwm1001_firmware_localization's People

Contributors

ggory15 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.