Skip to content

Commit 4ce38ca

Browse files
author
Antti Kauppila
committed
Added debug for AT handler
1 parent 4b19641 commit 4ce38ca

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

components/wifi/esp8266-driver/ESP8266/ESP8266.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,8 @@ nsapi_error_t ESP8266::send(int id, const void *data, uint32_t amount)
637637

638638
//We might receive "busy s/p..." and "OK" from modem, so we need to check that also
639639
_ok_received = false;
640+
//TODO: remove this
641+
_parser.debug_on(true);
640642
_parser.oob("OK", callback(this, &ESP8266::_oob_ok_received));
641643

642644
if (!_parser.recv(">")) {
@@ -650,10 +652,12 @@ nsapi_error_t ESP8266::send(int id, const void *data, uint32_t amount)
650652
}
651653
tr_debug("send(): Didn't get \">\"");
652654
ret = NSAPI_ERROR_WOULD_BLOCK;
655+
_parser.debug_on(false);
653656
goto END;
654657
}
655658
_ok_received = false;
656659
_parser.remove_oob("OK");
660+
_parser.debug_on(false);
657661

658662
if (_parser.write((char *)data, (int)amount) >= 0 && _parser.recv("SEND OK")) {
659663
ret = NSAPI_ERROR_OK;
@@ -1225,6 +1229,7 @@ void ESP8266::_oob_connection_status()
12251229

12261230
void ESP8266::_oob_ok_received()
12271231
{
1232+
tr_debug("_oob_ok_received called");
12281233
_ok_received = true;
12291234
}
12301235

0 commit comments

Comments
 (0)