1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

examples/gnrc_border_router: enable setting ZEP topology

This commit is contained in:
Benjamin Valentin 2023-10-20 17:51:05 +02:00
parent 03d3874e51
commit 2f2dcb7e34
2 changed files with 20 additions and 1 deletions

View File

@ -62,7 +62,7 @@ start_radvd() {
} }
start_zep_dispatch() { start_zep_dispatch() {
${ZEP_DISPATCH} :: "${ZEP_PORT_BASE}" > /dev/null & ${ZEP_DISPATCH} ${ZEP_DISPATCH_FLAGS} :: "${ZEP_PORT_BASE}" > /dev/null &
ZEP_DISPATCH_PID=$! ZEP_DISPATCH_PID=$!
} }
@ -95,6 +95,17 @@ else
USE_ZEP_DISPATCH=0 USE_ZEP_DISPATCH=0
fi 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 ELFFILE=$1
PREFIX=$2 PREFIX=$2
shift 2 shift 2

View File

@ -23,6 +23,14 @@ endif
# enable the ZEP dispatcher # enable the ZEP dispatcher
FLAGS_EXTRAS += -z $(ZEP_PORT_BASE) 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 # Configure terminal parameters
TERMDEPS += host-tools TERMDEPS += host-tools
TERMPROG_FLAGS = $(FLAGS_EXTRAS) $(ELFFILE) $(IPV6_PREFIX) TERMPROG_FLAGS = $(FLAGS_EXTRAS) $(ELFFILE) $(IPV6_PREFIX)