Skip to content

Commit 2f2dcb7

Browse files
committed
examples/gnrc_border_router: enable setting ZEP topology
1 parent 03d3874 commit 2f2dcb7

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

dist/tools/zep_dispatch/start_network.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ start_radvd() {
6262
}
6363

6464
start_zep_dispatch() {
65-
${ZEP_DISPATCH} :: "${ZEP_PORT_BASE}" > /dev/null &
65+
${ZEP_DISPATCH} ${ZEP_DISPATCH_FLAGS} :: "${ZEP_PORT_BASE}" > /dev/null &
6666
ZEP_DISPATCH_PID=$!
6767
}
6868

@@ -95,6 +95,17 @@ else
9595
USE_ZEP_DISPATCH=0
9696
fi
9797

98+
if [ "$1" = "-t" ] || [ "$1" = "--topology" ]; then
99+
ZEP_DISPATCH_FLAGS+="-t $2 "
100+
shift 2
101+
fi
102+
103+
if [ "$1" = "-w" ] || [ "$1" = "--monitor" ]; then
104+
modprobe mac802154_hwsim
105+
ZEP_DISPATCH_FLAGS+="-w wpan0 "
106+
shift 1
107+
fi
108+
98109
ELFFILE=$1
99110
PREFIX=$2
100111
shift 2

examples/gnrc_border_router/Makefile.native.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ endif
2323
# enable the ZEP dispatcher
2424
FLAGS_EXTRAS += -z $(ZEP_PORT_BASE)
2525

26+
ifneq (, $(ZEP_TOPO_FILE))
27+
FLAGS_EXTRAS += --topology $(ZEP_TOPO_FILE)
28+
endif
29+
30+
ifeq (1, $(ZEP_MONITOR))
31+
FLAGS_EXTRAS += --monitor
32+
endif
33+
2634
# Configure terminal parameters
2735
TERMDEPS += host-tools
2836
TERMPROG_FLAGS = $(FLAGS_EXTRAS) $(ELFFILE) $(IPV6_PREFIX)

0 commit comments

Comments
 (0)