Shell echo off

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Shell echo off

1,027 Views
dcantero
Contributor II

How can I disable the MQX shell echo?

I´m working with MQX 4.1 and I need to disable shell echo. I have changed the "BSP_DEFAULT_IO_OPEN_MODE" define in "twrk70f120m.h" removing the IO_SERIAL_ECHO flag:

    #define BSP_DEFAULT_IO_OPEN_MODE                          (void *) (IO_SERIAL_XON_XOFF | IO_SERIAL_TRANSLATION /* | IO_SERIAL_ECHO*/)

but after that the shell stops working!!!!

I have revised the code in "serl_pol.c" (for polled serial device) but i havent found an easy way to disable serial echo.  

Some ideas??????

Thanks in advance!!!!!

0 Kudos
2 Replies

473 Views
soledad
NXP Employee
NXP Employee

Hi David,

You can use ioctl IO_IOCTL_SERIAL_SET_FLAGS to read current flags, clear

IO_SERIAL_ECHO from the read value and write the new flag using ioctl IO_IOCTL_SERIAL_GET_FLAGS.


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

473 Views
trailman
Contributor V

Hi,

I don't know if it's still true with MQX4.1, but with MQX3.4 and MQX3.7, the IO_IOCTL_SERIAL_SET_FLAGS ioctl was only working for the serial line, but not when connected to the shell from a remote machine through the MQX TELNET server.

I had to fix that to implement a login password with echo disabled (for obvious reasons), and to add some more professional class features to the shell prompt such as history, command recall, command line edition, ...

See this post for more info, if needed  : Unprofessional Shell behavior

0 Kudos