diff --git a/RetroWiFiModem/RetroWiFiModem.ino b/RetroWiFiModem/RetroWiFiModem.ino index b3b23ef..d4aaa47 100644 --- a/RetroWiFiModem/RetroWiFiModem.ino +++ b/RetroWiFiModem/RetroWiFiModem.ino @@ -204,7 +204,10 @@ void doAtCmds(char *atCmd) { } else if( !strncasecmp(atCmd, "DS", 2) && len == 3 ) { // speed dial a number atCmd = speedDialNumber(atCmd + 2); - } else if( !strncasecmp(atCmd, "H", 1) || !strncasecmp(atCmd, "H0", 2) ) { + } else if( !strncasecmp(atCmd, "H0", 2) ) { + // hang up call + atCmd = hangup(atCmd + 2); + } else if( !strncasecmp(atCmd, "H", 1) && !isDigit(atCmd[1]) ) { // hang up call atCmd = hangup(atCmd + 1); } else if( !strncasecmp(atCmd, "&Z", 2) && isDigit(atCmd[2]) ) { diff --git a/RetroWiFiModem/at_basic.h b/RetroWiFiModem/at_basic.h index f53a0ad..dc99a5a 100644 --- a/RetroWiFiModem/at_basic.h +++ b/RetroWiFiModem/at_basic.h @@ -289,9 +289,6 @@ char *httpGet(char *atCmd) { // ATH go offline (if connected to a host) // char *hangup(char *atCmd) { - if( atCmd[0] ) { - ++atCmd; - } if( tcpClient.connected() ) { endCall(); } else { diff --git a/RetroWiFiModem/support.h b/RetroWiFiModem/support.h index 3744f2b..d4dc1be 100644 --- a/RetroWiFiModem/support.h +++ b/RetroWiFiModem/support.h @@ -504,17 +504,17 @@ SerialConfig getSerialConfig(void) { uint8_t serialConfig = 0; switch( settings.dataBits ) { case 5: - serialConfig = serialConfig = UART_NB_BIT_5 | (~UART_NB_BIT_MASK & serialConfig); + serialConfig = UART_NB_BIT_5 | (~UART_NB_BIT_MASK & serialConfig); break; case 6: - serialConfig = serialConfig = UART_NB_BIT_6 | (~UART_NB_BIT_MASK & serialConfig); + serialConfig = UART_NB_BIT_6 | (~UART_NB_BIT_MASK & serialConfig); break; case 7: - serialConfig = serialConfig = UART_NB_BIT_7 | (~UART_NB_BIT_MASK & serialConfig); + serialConfig = UART_NB_BIT_7 | (~UART_NB_BIT_MASK & serialConfig); break; case 8: default: - serialConfig = serialConfig = UART_NB_BIT_8 | (~UART_NB_BIT_MASK & serialConfig); + serialConfig = UART_NB_BIT_8 | (~UART_NB_BIT_MASK & serialConfig); break; } switch( settings.parity ) { diff --git a/bin/RetroWiFiModem.d1r2_or_d1mini.bin b/bin/RetroWiFiModem.d1r2_or_d1mini.bin index 9f9e955..14cf681 100644 Binary files a/bin/RetroWiFiModem.d1r2_or_d1mini.bin and b/bin/RetroWiFiModem.d1r2_or_d1mini.bin differ