Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples/gnrc_border_router: enable setting ZEP topology #20006

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion dist/tools/zep_dispatch/start_network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ start_radvd() {
}

start_zep_dispatch() {
${ZEP_DISPATCH} :: "${ZEP_PORT_BASE}" > /dev/null &
${ZEP_DISPATCH} ${ZEP_DISPATCH_FLAGS} :: "${ZEP_PORT_BASE}" > /dev/null &
ZEP_DISPATCH_PID=$!
}

Expand Down Expand Up @@ -95,6 +95,17 @@ else
USE_ZEP_DISPATCH=0
fi

if [ "$1" = "-t" ] || [ "$1" = "--topology" ]; then
ZEP_DISPATCH_FLAGS+="-t $2 "
shift 2
fi

if [ "$1" = "-w" ] || [ "$1" = "--monitor" ]; then
modprobe mac802154_hwsim
ZEP_DISPATCH_FLAGS+="-w wpan0 "
shift 1
fi

ELFFILE=$1
PREFIX=$2
shift 2
Expand Down
8 changes: 8 additions & 0 deletions examples/gnrc_border_router/Makefile.native.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ endif
# enable the ZEP dispatcher
FLAGS_EXTRAS += -z $(ZEP_PORT_BASE)

ifneq (, $(ZEP_TOPO_FILE))
FLAGS_EXTRAS += --topology $(ZEP_TOPO_FILE)
endif

ifeq (1, $(ZEP_MONITOR))
FLAGS_EXTRAS += --monitor
endif

# Configure terminal parameters
TERMDEPS += host-tools
TERMPROG_FLAGS = $(FLAGS_EXTRAS) $(ELFFILE) $(IPV6_PREFIX)
Expand Down