From 9aa0df66946e4944e3f8f755b27546c2ddbf6f81 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 14 May 2021 14:50:01 +0200 Subject: [PATCH] examples/gcoap: add support for socket ZEP --- examples/gcoap/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/examples/gcoap/Makefile b/examples/gcoap/Makefile index 10595e1d8629..52c4dcdc7184 100644 --- a/examples/gcoap/Makefile +++ b/examples/gcoap/Makefile @@ -35,6 +35,21 @@ DEVELHELP ?= 1 # Change this to 0 show compiler invocation lines by default: QUIET ?= 1 +# Instead of simulating an Ethernet connection, we can also simulate +# an IEEE 802.15.4 radio using ZEP +USE_ZEP ?= 0 + +# set the ZEP port for native +ZEP_PORT_BASE ?= 17754 +ifeq (1,$(USE_ZEP)) + TERMFLAGS += -z [::1]:$(ZEP_PORT_BASE) + USEMODULE += socket_zep + + ifneq (,$(ZEP_MAC)) + TERMFLAGS += --eui64=$(ZEP_MAC) + endif +endif + include $(RIOTBASE)/Makefile.include # For now this goes after the inclusion of Makefile.include so Kconfig symbols