martin-ger / esp_mqtt

MQTT Broker/Bridge on the ESP8266
MIT License
293 stars 68 forks source link

Telnet Console Timeout #25

Closed rebel7580 closed 6 years ago

rebel7580 commented 6 years ago

Is there a way to prevent the telnet console from timing out? Somewhat annoying to have to restart the session.

Thanks.

martin-ger commented 6 years ago

In line 399 of user_main.c you can change the timeout-val.

espconn_regist_time(pespconn, 300, 1); // Specific to console only

The manual says:

sint8 espconn_regist_time(
        struct espconn *espconn, 
        uint32 interval, 
        uint8 type_flag
)

uint32 interval: timeout interval; unit: second; maximum: 7200 seconds

If timeout is set to 0, timeout will be disabled and ESP8266 TCP server will not disconnect if a TCP client has stopped communication. This usage of timeout=0, is deprecated.

rebel7580 commented 6 years ago

Sorry I forget to respond to your response so it could be closed.