@@ -1909,6 +1909,37 @@ bool COMMAND::execute_command (int cmd, String cmd_params, tpipe output, level_a
1909
1909
case 810 :
1910
1910
web_interface->blockserial = false ;
1911
1911
break ;
1912
+ case 900 :
1913
+ parameter = get_param (cmd_params, " " , true );
1914
+ #ifdef AUTHENTICATION_FEATURE
1915
+ if (auth_type == LEVEL_GUEST) {
1916
+ ESPCOM::println (INCORRECT_CMD_MSG, output, espresponse);
1917
+ response = false ;
1918
+ }
1919
+ #endif
1920
+ if (parameter.length () == 0 ) {
1921
+ if (CONFIG::is_com_enabled) {
1922
+ ESPCOM::print (F (" ENABLED" ), output, espresponse);
1923
+ } else {
1924
+ ESPCOM::print (F (" DISABLED" ), output, espresponse);
1925
+ }
1926
+ } else {
1927
+ if (parameter == " ENABLE" ) {
1928
+ CONFIG::DisableSerial ();
1929
+ if (!CONFIG::InitBaudrate ()){
1930
+ ESPCOM::print (F (" Cannot enable serial communication" ), output, espresponse);
1931
+ } else {
1932
+ ESPCOM::print (F (" Enable serial communication" ), output, espresponse);
1933
+ }
1934
+ } else if (parameter == " DISABLE" ) {
1935
+ ESPCOM::print (F (" Disable serial communication" ), output, espresponse);
1936
+ CONFIG::DisableSerial ();
1937
+ } else {
1938
+ ESPCOM::println (INCORRECT_CMD_MSG, output, espresponse);
1939
+ response = false ;
1940
+ }
1941
+ }
1942
+ break ;
1912
1943
1913
1944
default :
1914
1945
ESPCOM::println (INCORRECT_CMD_MSG, output, espresponse);
0 commit comments