A modernized driver for the Decawave DW3000 UWB transceiver, written in the Rust programming language. We used the crate dw1000 developped for the DW1000 module and changed the registers access and spi functions, added fast command and implemented some high level functions.
Both RTT methods (single and double sided) are working and giving good positioning values. PDoA and TDoA can be enabled optionally (Please read the docs as they require certain configurations!).
Compared to the old dw3000 crate we fixed the GPIOs and LEDs, also got rid of the old unmaintained ieee802154 crate and replaced it with smoltcp.
We mainly test on the ESP32 platform with embassy async framework.
Include this crate in your Cargo project by adding the following to Cargo.toml:
[dependencies]
dw3000-ng = "1.0"Please refer to the API Reference.
Please also refer to the DW3000 User Manual
If you are using this in your academic work, please cite it as follows:
@inproceedings{Jiang24hotmobile,
author = {Jiang, Fan and Dhekne, Ashutosh},
title = {Demo: uFiμ: An open-source integrated UWB-WiFi-IMU platform for localization research and beyond},
year = {2024},
isbn = {9798400704970},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3638550.3643628},
doi = {10.1145/3638550.3643628},
booktitle = {Proceedings of the 25th International Workshop on Mobile Computing Systems and Applications},
pages = {156},
location = {San Diego, CA, USA},
series = {HOTMOBILE '24}
}- Added compatibility with
smoltcp0.12
- Elided the
RegAccessorlifetime - Fixed the wrong trait import when
asyncis enabled/disabled
- Added
init_tracingexample to inspect the SPI transactions happening during the initialization of the DW3000 - Modified
rx_waitto not use_uncheckedand returnErrwhen the decoding of the 802.15.4 frame fails - BREAKING: The library is now both
syncandasynccompatible. The featureasynccan be used to enable the corresponding interfaces.- When
async, the SPI traits are usingembedded_hal_async, otherwiseembedded_hal.
- When
- BREAKING: The delay primitives in the
configfunction are nowembedded_hal/embedded_hal_async::delay::DelayNsinstead ofFnMut(u32) -> Future<Output = ()>
- API change:
confignow takes adelay_us(u32)function to allow non-blocking initialization. - Now the radio init is feature-par with the official DW3000 driver. You should have much better TX/RX performance now.
- Fixed the register definition of
RX_FWTO. RX timeout is now working.
- Fixed important bug in 0.8.3 where we are trying to read the device ID before the device is ready
- Fixed infinite loop in
init()if the SPI device is not ready or connected
- Add parameter
recv_timeto allow delayed receiving by @trembel - Fix
pll_ccregister by @JohannesProgrammiert
- Fixed the
STSregister setup when callingconfig()with STS enabled
- Renamed the
num-traitsfeature torssito better indicate what it does - Added PDoA and TDoA support
- Add field rx_quality to struct Message holding first path signal power by (@elrafoon)
- Fixed STS config values by (@elrafoon)
- Fixed read of the
RX_RAWSTregister
- Added the carrier recovery integrator register
- Fix
DTUNEregister value
- Migrated to
embedded-hal1.0 - Removed explicit manipulations of the SPI CS pin
BSD-3-Clause