Skip to content

pkg/bplib: Experimental UWB CLA - #22647

Open
RainbowSimon wants to merge 10 commits into
RIOT-OS:masterfrom
RainbowSimon:bplib-cla-uwb
Open

pkg/bplib: Experimental UWB CLA#22647
RainbowSimon wants to merge 10 commits into
RIOT-OS:masterfrom
RainbowSimon:bplib-cla-uwb

Conversation

@RainbowSimon

Copy link
Copy Markdown
Contributor

Contribution description

This adds an experimental, non standard, CLA (Convergence Layer Adapter) for bplib. This allows sending bundles over UWB using decadriver.

This could be generalized to a 802.15.4 CLA, since the communication itself is not UWB specific.

The other CLAs have an example instead of a test, here I thought this might (in its current state) be a little too specific and experimental to be put into the example folder.

Testing procedure

Added tests/pkg/bplib_cla_uwb to test this. One needs two boards with decadriver compatible UWB modules.

Then, using e.g. the bp send 0 "Hello World" shell command, one can see the bundle arrive on the other side, meaning it was successfully sent though a BPv7 encoded bundle over the CLA via the UWB PHY.

Issues/PRs references

no

Declaration of AI-Tools / LLMs usage:

AI-Tools / LLMs that were used are:

  • none

This implements an experimental CLA used over UWB with decadriver. The
CLA logic itself is not UWB specific, but could apply to all 802.15.4
frames, so this could be generalized in future efforts.
A manual execution test between two boards with decadriver compatible
modules.
@github-actions github-actions Bot added Area: doc Area: Documentation Area: tests Area: tests and testing framework Area: pkg Area: External package ports labels Sep 1, 2026
@crasbe crasbe added Type: new feature The issue requests / The PR implemements a new feature for RIOT CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR AI: Not Used AI was stated to not be used in this PR/Issue labels Sep 1, 2026

@crasbe crasbe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much again :)

I haven't tested it yet, but some initial comments from the first review round are below.

Don't worry about the failing buildsystem sanity check static test, that will be fixed once #22645 is merged.

Comment thread pkg/bplib/cla/uwb/include/bplib_cla_uwb.h
Comment thread pkg/bplib/cla/uwb/include/bplib_cla_uwb.h Outdated
Comment thread pkg/bplib/cla/uwb/include/bplib_cla_uwb.h
Comment thread pkg/bplib/cla/uwb/include/bplib_cla_uwb.h Outdated
Comment thread pkg/bplib/cla/uwb/include/bplib_cla_uwb.h Outdated
Comment thread tests/pkg/bplib_cla_uwb/main.c Outdated
Comment on lines +182 to +188
dw3000_hw_init();
dw3000_hw_init_interrupt();
dw3000_hw_reset();

dwt_probe((struct dwt_probe_s *)&dw3000_probe_interf);
uint32_t dev_id = dwt_readdevid();
printf("[deca init] detected device id: %"PRIx32"\n", dev_id);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to adapt the error checking from the other UWB test here too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Comment thread tests/pkg/bplib_cla_uwb/main.c Outdated
Comment thread tests/pkg/bplib_cla_uwb/Makefile.board.dep Outdated
Comment on lines +24 to +26
MSG="Warning: No default decadriver configuration for \"$(BOARD)\"."\
"Make sure to set all CFLAGS manually!"
$(shell $(COLOR_ECHO) "$(COLOR_YELLOW)$(MSG)$(COLOR_RESET)" 1>&2)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MSG="Warning: No default decadriver configuration for \"$(BOARD)\"."\
"Make sure to set all CFLAGS manually!"
$(shell $(COLOR_ECHO) "$(COLOR_YELLOW)$(MSG)$(COLOR_RESET)" 1>&2)
$(call echowarn,("Warning: No default decadriver configuration for \"$(BOARD)\"."\
"Make sure to set all required CFLAGS manually!"))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course out of scope of this PR but is there a way to put default configurations and detection thereof into decadriver?
Like this every example involving decadriver needs to warn and also have the Makefile.board.dep

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The general philosophy is to keep board-dependant stuff out of the general modules and rather keep it in the examples.

Comment thread tests/pkg/bplib_cla_uwb/README.md Outdated
@riot-ci

riot-ci commented Sep 1, 2026

Copy link
Copy Markdown

Murdock results

✔️ PASSED

64d4331 fixup tests; remove external modules line

Success Failures Total Runtime
11307 0 11308 13m:14s

Artifacts

@crasbe

crasbe commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The tests/pkg/bpib_cla_uwb/Makefile.ci:

BOARD_INSUFFICIENT_MEMORY := \
    airfy-beacon \
    b-l072z-lrwan1 \
    blackpill-stm32f103c8 \
    blackpill-stm32f103cb \
    bluepill-stm32f030c8 \
    bluepill-stm32f103c8 \
    bluepill-stm32f103cb \
    e104-bt5010a-tb \
    e104-bt5011a-tb \
    hifive1 \
    hifive1b \
    i-nucleo-lrwan1 \
    im880b \
    lsn50 \
    maple-mini \
    nucleo-c031c6 \
    nucleo-c071rb \
    nucleo-f030r8 \
    nucleo-f031k6 \
    nucleo-f042k6 \
    nucleo-f070rb \
    nucleo-f072rb \
    nucleo-f103rb \
    nucleo-f303k8 \
    nucleo-f334r8 \
    nucleo-g031k8 \
    nucleo-l011k4 \
    nucleo-l031k6 \
    nucleo-l053r8 \
    nucleo-l073rz \
    olimexino-stm32 \
    samd10-xmini \
    saml10-xpro \
    saml11-xpro \
    slstk3400a \
    spark-core \
    stk3200 \
    stm32f030f4-demo \
    stm32f0discovery \
    stm32l0538-disco \
    yunjia-nrf51822 \
    #

@crasbe crasbe added the CI: no fast fail don't abort PR build after first error label Sep 1, 2026
@crasbe crasbe added the State: needs rebase State: The codebase was changed since the creation of the PR, making a rebase necessary label Sep 9, 2026
@RainbowSimon

Copy link
Copy Markdown
Contributor Author

Can I rebase? I think I added all current review points

@crasbe

crasbe commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Yes 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI: Not Used AI was stated to not be used in this PR/Issue Area: doc Area: Documentation Area: pkg Area: External package ports Area: tests Area: tests and testing framework CI: no fast fail don't abort PR build after first error CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR State: needs rebase State: The codebase was changed since the creation of the PR, making a rebase necessary Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants