From 59a1a8eb1b819546c265f27752446ca08de5bedc Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Tue, 27 Oct 2020 07:33:04 +0100 Subject: [PATCH] turn off tcp server to reset connections --- WifiInterface.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WifiInterface.cpp b/WifiInterface.cpp index c751cab..b718b4b 100644 --- a/WifiInterface.cpp +++ b/WifiInterface.cpp @@ -233,6 +233,8 @@ bool WifiInterface::setup2(const __FlashStringHelper* SSid, const __FlashStringH } } + StringFormatter::send(wifiStream, F("AT+CIPSERVER=0\r\n")); // turn off tcp server (to clean connections before CIPMUX=1) + checkForOK(10000, OK_SEARCH, true); // ignore result in case it already was off StringFormatter::send(wifiStream, F("AT+CIPMUX=1\r\n")); // configure for multiple connections if (!checkForOK(10000, OK_SEARCH, true)) return false;