Giter Site home page Giter Site logo

decawave / uwb-core Goto Github PK

View Code? Open in Web Editor NEW
57.0 10.0 35.0 1.02 MB

Ultrawideband Core

Home Page: http://decawave.com

License: Apache License 2.0

CMake 2.77% Makefile 0.57% C 91.05% GDB 0.18% Batchfile 0.42% Shell 1.04% Assembly 3.22% C++ 0.67% Python 0.09%

uwb-core's Introduction

Decawave logo

uwb-core for MyNewt OS

Build Status

  • See Linux Kernel for building uwb-core as a kernel module
  • See Other RTOS for building uwb-core as a standalone library

Overview

The distribution https://github.com/decawave/uwb-core contains the device driver model for the Decawave Impulse Radio-Ultra Wideband (IR-UWB) transceiver(s) within the Mynewt-OS. The driver includes hardware abstraction layers (HAL), media access control (MAC) layer, Ranging Services (RNG). The uwb-core 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.

Under-the-hood

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

How To Build for mynewt

See the companion repo UWB-Apps for building instructions.

Preparation if using mynewt 1.7

# After running newt upgrade or newt install we need to patch mynewt
cd repos/apache-mynewt-core
git apply ../decawave-uwb-core/patches/apache-mynewt-core/mynewt_1_7_0*.patch

uwb-core's People

Contributors

fjmolinas avatar ncasaril avatar pkettle avatar szymon-czapracki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uwb-core's Issues

Unit-tests needed

This has been moved from Decawave/uwb-core-archive

  • lib/uwb_rng - only testing json-encoding and decoding for now
  • lib/panmaster, handling of callbacks from lib/pan
  • lib/tofdb,
  • ... more to come

Simulated uwb-driver for testing uwb-api

in hw/drivers/uwb we want a mock/sim driver that implements the uwb api and allows the testing of packages making use of it.

suggested package name: hw/drivers/uwb/uwb_sim

Suitable package to use for first test using this new simulated device is either lib/uwb_pan or lib/twr_ss.

uwb_rng_request is possibly not thread safe.

In the uwb_rng_request function at the end it waits for a semaphore to be posted, signaling the end of transactions:

err = dpl_sem_pend(&rng->sem, DPL_TIMEOUT_NEVER); // Wait for completion of transactions
if (err != DPL_OK) {
goto early_exit;
}

But this semaphore is release in tx_comeplete():

switch(rng->code) {
case UWB_DATA_CODE_SS_TWR ... UWB_DATA_CODE_DS_TWR_EXT_END:
RNG_STATS_INC(tx_complete);
if (rng->control.complete_after_tx) {
dpl_sem_release(&rng->sem);
rng_issue_complete(inst);
}
rng->control.complete_after_tx = 0;
return true;
break;
default:
return false;
}
}

This function is then calling all the rng_complete functions, these could be scheduling an another request, or setting the radio to listen is this is done in ISR context or in another thread with a higher priority than the thread that triggered the uwb_rng_request then the first thread will be locked waiting for the semaphore to be released. This could fix itself in the long run, but if the device was set to listen forever then that thread would be definitively blocked.

about the 5G and UWB frequency.

Hello, I am the developer of DW1000. I checked the information and found that the 5G frequency band and many channel frequency bands of DW1000 overlap. I want to ask you something: Will the upcoming 5G affect UWB ultra-wideband communication?

thank u :)

Transition to using bus_driver for SPI

Currently a semaphore in the bsp is used top avoid collisions on the spi bus used for the dwX000 and hal_spi_XX calls used to access the bus.

  • What needs to be changed in bsp's to support the bus_driver_spi?
  • What needs to change in the dwX000_hal?
  • Would this allow us to simplify the linux / mynewt interfacing currently in use in dwX000_hal.c?

Building DWM1001 bootloader fails

I'm attempting to build the bootloader for DWM1001 as shown in the uwb-apps repository, but I'm running into the following error.

system specs:
uwb-apps: master
mynewt: 1.8.0
gcc: 10.3.0

Compiling repos/mcuboot/boot/mynewt/src/main.c
Error: repos/mcuboot/boot/mynewt/src/main.c:
In function 'main': repos/mcuboot/boot/mynewt/src/main.c:254:5:
error: implicit declaration of function 'hal_bsp_deinit'; did you mean 'hal_bsp_init'? [-Werror=implicit-function-declaration]
254 | hal_bsp_deinit();
| ^~~~~~~~~~~~~~
| hal_bsp_init
cc1: all warnings being treated as errors

I could not find the definition or declaration of the deinit anywhere but it is included in the bootloader source for mynewt.

Mynewt 1.8 release upgrade

Go through bsps and code that is affected by the new mynewt release.

  • BSP up to speed with how the latest way of writing them in 1.8, they may have lagged behind
  • Look at making bus-master drivers available in bsps
  • Console and shell api's still the same?
  • Do we need to update the dpl porting layer to match new os_* apis?
  • newtmgr is now smp

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.