diff --git a/WifiInterface.cpp b/WifiInterface.cpp index 74018b9..9e7e6ed 100644 --- a/WifiInterface.cpp +++ b/WifiInterface.cpp @@ -90,6 +90,11 @@ bool WifiInterface::setup(long serial_link_speed, } #endif +DCCEXParser::setAtCommandCallback(ATCommand); + +// CAUTION... ONLY CALL THIS ONCE +WifiInboundHandler::setup(wifiStream); + return wifiUp; } @@ -109,8 +114,6 @@ bool WifiInterface::setup(Stream & setupStream, const __FlashStringHelper* SSid checkForOK(200, OK_SEARCH, true); } - DCCEXParser::setAtCommandCallback(ATCommand); - WifiInboundHandler::setup(wifiStream); DIAG(F("\n++ Wifi Setup %S ++\n"), connected ? F("OK") : F("FAILED")); return connected;