The Telnet server provides a simple command-line interface for a remote host via a virtual terminal connection.
Current version of the Telnet server supports maximum of one simultaneously connected Telnet client.
After the FNET Telnet server is initialized by calling the fnet_telnet_init() function, the user application should call the main service polling function fnet_service_poll() periodically in background.
For example:
...
{
fapp_telnet_cmd_table,
"TELNET>",
fapp_shell_on_init,
};
...
void main()
{
...
params.
shell= &fapp_telnet_shell;
params.cmd_line_buffer = fapp_telnet_cmd_line_buffer;
params.cmd_line_buffer_size = sizeof(fapp_telnet_cmd_line_buffer)
if(fapp_telnet_desc)
{
while(1)
{
...
}
}
else
{
fnet_printf(
"\n FNET Telnet server initialization is failed.\n");
}
}
For Telnet usage example, refer to FNET demo application source code.
Configuration parameters: