This distribution contains the example applications for the DW1000 UWB transceiver.
The remainder of this README.md shows how to bring up the elementary twr_node/twr_tag examples.
You will need to download the Apache Newt tool, as documented in the Getting Started Guide.
Prerequisites: You should follow the generic tutorials at http://mynewt.apache.org/latest/tutorials/tutorials.html, particularly the basic Blinky example that will guide you through the basic setup.
git clone git@github.com:Decawave/uwb-apps.git
cd uwb-apps
newt upgrade
command downloads the apache-mynewt-core, decawave-uwb-core, decawave-uwb-dwXXXX driver(s) repo, and mynewt-timescale-lib packages, these are dependent repos of the decawave-uwb-apps project and are automatically checked-out by the newt tools.$ newt upgrade
# Depending on what version of the newt tool you use you
# may have to manually remove git-but artifacts and then rerun
# upgrade. I.e. only if you see an error like:
# "Error: Error updating "mcuboot"..." do:
rm repos/mcuboot/ext/mbedtls/include/mbedtls/ -rf
newt upgrade
To see if you have access to other driver repos, run the setup.sh script under repos/decawave-uwb-core like so:
repos/decawave-uwb-core/setup.sh
# Rerun newt install
newt install
Apply any patches to apache-mynewt-core:
cd repos/apache-mynewt-core/
git apply ../decawave-uwb-core/patches/apache-mynewt-core/mynewt_1_7_0_*
cd -
$ JLinkExe -device nRF52 -speed 4000 -if SWD
J-Link>erase
J-Link>exit
$
or if you have nrfjprog (Nordic Cmd Tools) installed:
$ nrfjprog -f NRF52 -e
(executed from the mynewt-dw1000-app directory).
newt target create dwm1001_boot
newt target set dwm1001_boot app=@mcuboot/boot/mynewt
newt target set dwm1001_boot bsp=@decawave-uwb-core/hw/bsp/dwm1001
newt target set dwm1001_boot build_profile=optimized
newt build dwm1001_boot
newt load dwm1001_boot
(executed from the decawave-uwb-apps directory).
newt target create twr_tag_tdma
newt target set twr_tag_tdma app=apps/twr_tag_tdma
newt target set twr_tag_tdma bsp=@decawave-uwb-core/hw/bsp/dwm1001
newt target set twr_tag_tdma build_profile=debug
newt run twr_tag_tdma 0
(executed from the decawave-uwb-apps directory).
newt target create twr_node_tdma
newt target set twr_node_tdma app=apps/twr_node_tdma
newt target set twr_node_tdma bsp=@decawave-uwb-core/hw/bsp/dwm1001
newt target set twr_node_tdma build_profile=debug
newt target amend twr_node_tdma syscfg=LOG_LEVEL=1:UWBCFG_DEF_ROLE='"0x1"'
newt run twr_node_tdma 0
(executed from the decawave-uwb-apps directory).
nc localhost 19021