When communicating Telnet with binary data, the IAC (0xFF) bytes received from uart are not escaped.
It seems Telnet escaping is implemented only in telnet->uart direction. I'm not sure where, but somewhere in "espbuffsend" should be a check for the conn_mode (conn->conn_mode == cmTelnet) and escaped the received IAC from uC.
The use case: I'm using Telnet commands to put STM32 in DFU mode, than I upload the new binary using the DFU protocol. This part works fine, but when I try to verify the image, the Telnet socket breaks on invalid commands (because 0xFF is not escaped, the Telnet client try to parse command).
When communicating Telnet with binary data, the IAC (0xFF) bytes received from uart are not escaped. It seems Telnet escaping is implemented only in telnet->uart direction. I'm not sure where, but somewhere in "espbuffsend" should be a check for the conn_mode (conn->conn_mode == cmTelnet) and escaped the received IAC from uC. The use case: I'm using Telnet commands to put STM32 in DFU mode, than I upload the new binary using the DFU protocol. This part works fine, but when I try to verify the image, the Telnet socket breaks on invalid commands (because 0xFF is not escaped, the Telnet client try to parse command).