tangled
alpha
login
or
join now
jcs.org
/
WiFiPPP
0
fork
atom
ESP8266-based WiFi serial modem emulator ROM
0
fork
atom
overview
issues
pulls
pipelines
AT: Try to help modem detection during autobaud
jcs.org
2 years ago
7f9dd2fb
6f8c7332
+24
-5
1 changed file
expand all
collapse all
unified
split
wifippp.ino
+24
-5
wifippp.ino
···
81
81
82
82
/* USR modem mode, ignore input not starting with at or a/ */
83
83
if (curcmdlen == 0 && (b != 'A' && b != 'a')) {
84
84
-
if (b > 127 && (now - last_autobaud > 2000)) {
85
85
-
serial_autobaud();
86
86
-
now = millis();
87
87
-
last_autobaud = now;
84
84
+
#ifdef AT_TRACE
85
85
+
syslog.logf(LOG_DEBUG, "bogus char: 0x%x (%c)", b, b);
86
86
+
#endif
87
87
+
if (b > 127) {
88
88
+
/*
89
89
+
* Help modem auto-detection by just spitting
90
90
+
* out OK in response to hopefully ATs received
91
91
+
* during autobaud
92
92
+
*/
93
93
+
if (!settings->quiet) {
94
94
+
if (settings->verbal)
95
95
+
output("\r\nOK\r\n");
96
96
+
else
97
97
+
output("\r0\r");
98
98
+
}
88
99
}
89
100
return;
90
101
}
···
845
856
846
857
/* find optional single digit after &command, defaulting to 0 */
847
858
cmd_num = 0;
848
848
-
if (cmd[0] >= '0' && cmd[0] <= '9') {
859
859
+
if (cmd[0] == '?') {
860
860
+
cmd_num = '?';
861
861
+
len--;
862
862
+
cmd++;
863
863
+
lcmd++;
864
864
+
} else if (cmd[0] >= '0' && cmd[0] <= '9') {
849
865
if (cmd[1] >= '0' && cmd[1] <= '9')
850
866
/* nothing uses more than 1 digit */
851
867
goto error;
···
910
926
default:
911
927
goto error;
912
928
}
929
929
+
break;
930
930
+
case ' ':
931
931
+
/* skip spaces between commands */
913
932
break;
914
933
default:
915
934
goto error;