diff --git a/examples/platform-specific/cc2538dk/udp-ipv6-echo-server/Makefile.target b/examples/platform-specific/cc2538dk/udp-ipv6-echo-server/Makefile.target deleted file mode 100644 index 777593c88..000000000 --- a/examples/platform-specific/cc2538dk/udp-ipv6-echo-server/Makefile.target +++ /dev/null @@ -1 +0,0 @@ -TARGET = cc2538dk diff --git a/examples/platform-specific/cc2538dk/udp-ipv6-echo-server/Makefile b/examples/udp-echo-server/Makefile similarity index 62% rename from examples/platform-specific/cc2538dk/udp-ipv6-echo-server/Makefile rename to examples/udp-echo-server/Makefile index 841f43125..31c7af5b8 100644 --- a/examples/platform-specific/cc2538dk/udp-ipv6-echo-server/Makefile +++ b/examples/udp-echo-server/Makefile @@ -2,6 +2,6 @@ CONTIKI_PROJECT = udp-echo-server all: $(CONTIKI_PROJECT) -CONTIKI = ../../../.. -CFLAGS += -DUIP_CONF_ND6_SEND_NS=1 +CONTIKI = ../.. + include $(CONTIKI)/Makefile.include diff --git a/examples/udp-echo-server/README.md b/examples/udp-echo-server/README.md new file mode 100644 index 000000000..0fb5d70e1 --- /dev/null +++ b/examples/udp-echo-server/README.md @@ -0,0 +1,14 @@ +UDP echo server example +======================= +This example demonstrates how to implement a simple UDP-server by +using the original UDP API (as opposed to using the simple-udp module). + +It is anticipated that this example will run on all supported platforms. + +To test, compile and programme your device (or execute on the native +platform). Then you can use netcat, like so: + + $ nc -6u 3000 + +Type something in your console and you should see it echoed back by the +UDP server running on your device. diff --git a/examples/platform-specific/cc2538dk/udp-ipv6-echo-server/udp-echo-server.c b/examples/udp-echo-server/udp-echo-server.c similarity index 92% rename from examples/platform-specific/cc2538dk/udp-ipv6-echo-server/udp-echo-server.c rename to examples/udp-echo-server/udp-echo-server.c index b7f698169..7da3ba036 100644 --- a/examples/platform-specific/cc2538dk/udp-ipv6-echo-server/udp-echo-server.c +++ b/examples/udp-echo-server/udp-echo-server.c @@ -28,18 +28,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** \addtogroup cc2538-examples - * @{ - * - * \defgroup cc2538-echo-server cc2538dk UDP Echo Server Project - * - * Tests that a node can correctly join an RPL network and also tests UDP - * functionality - * @{ - * - * \file - * An example of a simple UDP echo server for the cc2538dk platform - */ +/*---------------------------------------------------------------------------*/ #include "contiki.h" #include "contiki-lib.h" #include "contiki-net.h" @@ -107,7 +96,3 @@ PROCESS_THREAD(udp_echo_server_process, ev, data) PROCESS_END(); } /*---------------------------------------------------------------------------*/ -/** - * @} - * @} - */ diff --git a/tests/02-compile-arm-ports/Makefile b/tests/02-compile-arm-ports/Makefile index bebf7518d..1836943bf 100644 --- a/tests/02-compile-arm-ports/Makefile +++ b/tests/02-compile-arm-ports/Makefile @@ -16,7 +16,7 @@ ipv6/rpl-border-router/cc2538dk \ ipv6/rpl-udp/cc2538dk \ ipv6/coap-example/cc2538dk \ ipso-objects/cc2538dk \ -platform-specific/cc2538dk/udp-ipv6-echo-server/cc2538dk \ +udp-echo-server/cc2538dk \ ipv6/multicast/cc2538dk \ platform-specific/cc2538-common/cc2538dk \ platform-specific/cc2538-common/mqtt-demo/cc2538dk \