From 61551556b44957f761b907fd0bbfa6e5fce25b43 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Wed, 11 Nov 2020 15:01:03 +0100 Subject: [PATCH] tcpTest continued --- cube/User/Src/tcpTest.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cube/User/Src/tcpTest.c b/cube/User/Src/tcpTest.c index b3b141b..2da4bcd 100644 --- a/cube/User/Src/tcpTest.c +++ b/cube/User/Src/tcpTest.c @@ -20,7 +20,9 @@ uint16_t remotePort = 5000; void tcpTestHandler(void *handle) { static uint8_t state = 0; int8_t res = 0; + int32_t res32 = 0; + static uint8_t message[] = "Hello world\n\r"; if (isNetworkAvailable()) { switch (state) { @@ -63,7 +65,14 @@ void tcpTestHandler(void *handle) { state = 255; } break; - + + case 3: + coloredMsg(LOG_YELLOW, "tth, now sending something"); + + int32_t res32 = send(TCPTEST_SOCK, message, strlen(message)); + coloredMsg(LOG_YELLOW, "tth, sent a message, send returns 0x%02x", res32); + + state = 255; case 255: coloredMsg(LOG_YELLOW, "tth, error state, will stop here"); schDel(tcpTestHandler, NULL);