diff --git a/dist/tools/zep_dispatch/start_network.sh b/dist/tools/zep_dispatch/start_network.sh index fb9a1a90de..1339ba1625 100755 --- a/dist/tools/zep_dispatch/start_network.sh +++ b/dist/tools/zep_dispatch/start_network.sh @@ -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=$! } @@ -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 diff --git a/examples/gnrc_border_router/Makefile.native.conf b/examples/gnrc_border_router/Makefile.native.conf index 3be2b8774b..947424b8bf 100644 --- a/examples/gnrc_border_router/Makefile.native.conf +++ b/examples/gnrc_border_router/Makefile.native.conf @@ -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)