![]() |
Forum Index : Microcontroller and PC projects : the best tty console for Linux
Author | Message | ||||
dddns Guru ![]() Joined: 20/09/2024 Location: GermanyPosts: 379 |
Hi all! I was struggling for myself for some time but its so simple as can be. Install the package "cu" and e.g. do a cu -l /dev/ttyUSB0 -s 115200 in a e.g. gnome-terminal and you will get a full featured vt-100 terminal in this shell window. It look like any other shell window but with the prompt of the pico :) the second easiest way is install screen and do e.g. screen /dev/ttyUSB0 115200 if you want to transfer a file through XMODEM, install lrzsz and execute stty -F /dev/ttyUSB0 115200 crtscts to initialize. Then connect to the pico (through cu or screen) and issue e.g. xmodem receive "b:file.bas" then cut the connection. In cu you do that with "~." In screen you do that by hitting "ctrl-a" followed by "k" Then you have time until XMODEM times out to execute e.g. sx file.bas < /dev/ttyUSB0 > /dev/ttyUSB0 The biggest advantage is, that you can do everything in the way you are used to in a shell terminal, from copy to paste. All are mature standard shell tools which exist for every distribution or flavor. This all of cause works without X and a window manager for text console or ssh connection as well. Have fun Edited 2025-02-28 07:51 by dddns |
||||
stanleyella![]() Guru ![]() Joined: 25/06/2022 Location: United KingdomPosts: 2417 |
what's it do? |
||||
dddns Guru ![]() Joined: 20/09/2024 Location: GermanyPosts: 379 |
sorry, I meant to say execute. And the package "screen" needs to be install first. It is a way to have a VT-100 terminal like with terraterm or Putty. Edited 2025-02-28 09:19 by dddns |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1111 |
hi DDDNS, You should have a look at GFXTerm that one of our members wrote - Rob Rozee - latest version is here Just copy down from the link and make executable - the associated manual has all the details. Cheers, Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
tgerbic Regular Member ![]() Joined: 25/07/2019 Location: United StatesPosts: 58 |
I am familiar with screen and other command line linux emulators but I just never warmed up to them, and I also use Windows and hate most term apps on it. I have used putty for years as it is the same on Windows as on Linux, and works for all my VT100 needs. GFXTerm might be nice but I don't see any code to download and try it out. |
||||
dddns Guru ![]() Joined: 20/09/2024 Location: GermanyPosts: 379 |
Hello Doug! I was reading this thread and I gave GFXTerm a try for some hours. It is a nice program and the look and feel is good. If you whantz to use the extra features GFXTerm offers, than there is no way around it. The downside is that it neither exists for 32bit nor arm and you need X. Because I saw some posts of Rasberry Pi users who asked for a solution I thought, I post this to show an easy way. All you need to do is "apt get cu" and you have what you need. Edited 2025-02-28 18:51 by dddns |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4006 |
Download using the link previously posted just before your post. John |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4918 |
Using Putty I have found 1 disadvantage. Putty can dos serial with handshake(RTS/CTS or DTR/DSR), XON/XOFF, or NONE. Typically you use NONE with *Mites. But Putty can NOT add character delay, and en-of-line delay. The only way to slow down communication is to choose a slower baudrate. Some other serial terminal emulators can insert character/eol delays. This is mainly usefull when communicating with software UART's. Volhout P.S. when using linux with multiple (USB) serial ports, I can advise add your USB devices by UDEV rules. Then they get a unique name (i.e. /dev/ttyUSB_my_picomite) so you always connect to the right device. Plenty of instructions how to do so, just google for "udev usb serial". Edited 2025-02-28 19:24 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
dddns Guru ![]() Joined: 20/09/2024 Location: GermanyPosts: 379 |
Is there a way to get around the annoying behavior, that the window closes like imploding when the serial connection gets cut? That is enough for me to not use PuTTY.. and a big plus for GFXTerm, which handles this nicely Edited 2025-02-28 19:47 by dddns |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4918 |
Hi dddns, Actually, you are phrasing it wrong. IF you disconnect a serial device (the RS232 isde), Putty keeps the window open. If you remove the hardware UART (pull the USB plug) Putty closes the channel (this is similar to live extracting an ISA serial card from a PC in the earlier days). Putty does not provide a means to gracefully close the pipes, and re-open the pipes again after the UART is connected again. And honestly, since USB enumeration in linux (historically) potentially assigns a different device number to the re-connected UART, it is the correct way to do. Linux is changing in that perspective. historically ethernet ports where "eth0" "eth1"/ and suffered the same problem. Current linux assigns a unique name to each network interface. Maybe this is on the roadmap for USB/serial devices as well, and a newer version of Putty could be adapted. But... Putty is OLD. It has been around for decades. It will always carry around its legacy. B.t.w. I am very curious how GFXterm behaves when you have 3 windows open, with 3 USB serial ports, and start disconnecting and connecting randomly. Does it still keap each USB interface to the same GFXterm window ? Guess not..... It can only do this if there is only one USB serial interface. Volhout Edited 2025-02-28 20:38 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
dddns Guru ![]() Joined: 20/09/2024 Location: GermanyPosts: 379 |
Hello Volhout, you are completely correct in what you are saying :) The terminal window does not close, so I can keep my fingers on the keyboard and usually I am then 2 keystrokes away to reopen it.. |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |