WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: A serial terminal  (Read 3717 times)

Offline ajcashin

  • Newbie
  • *
  • Posts: 6
A serial terminal
« on: May 20, 2020, 12:54:06 AM »
A few years back I started messing with microprocessors (PIC16F628A to be exact). I set the processor up to output serial data at 9600 baud, received on a laptop running Puppy Linux and a graphical terminal emulator. I don't remember its name. All that happened was the serial data was displayed in the terminal emulator, and optionally captured to hard disk as a text file. The data was received as a message every second, collected over hours or days, copied to a USB stick for analysis elsewhere.

The laptop died, and I acquired a Compaq Armada 1700 (built last century) so tried to set up the same system again. Not enough memory so I started messing with Tiny Core. With the latest version it did a Kernel Panic and wouldn't run. I read here a similar problem, the solution was to back off to 6.4.1 so I tried that and it worked. The CD drive I think reads at x1 so it takes quite a while to boot so I copied the system to hard drive booting via GRUB. The Compaq does not have a configurable BIOS, it has programs in a special partition on the disk that need to be retained and I can get to them using a GRUB chainloader. So now I have a GUI system that boots from disk.

Is there a similar terminal emulator that will run in the Tiny Core GUI?

I should add I'm on a steep learning curve here. I set up the original system not having much of a clue and it worked. So may need a bit of handholding to get this working. I think minicom does what I want but would prefer a GUI, easier to use.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 933
Re: A serial terminal
« Reply #1 on: May 20, 2020, 01:51:40 AM »
Hi, ajcashin!

There are a lot o terminal emulators in TinyCore repo, but prior to test which is more appropriate to You, try aterm. It is installed by default so You can use it under X desktop immediately.
A few words about serial ports. TinyCore Linux has busybox package as its essential part, and busybox has microcom utility, You can try it too, it is quite simple.

So, start aterm, and enter
Code: [Select]
microcom --help
to see available (a few but sufficient for basic tasks) command line options.

And if You are starting to learn TinyCore, the best first step is "Into the Core" book, You can download it from the Book section on the TinyCoreLinux site.


Offline ajcashin

  • Newbie
  • *
  • Posts: 6
Re: A serial terminal
« Reply #2 on: May 20, 2020, 04:21:46 AM »
And if You are starting to learn TinyCore, the best first step is "Into the Core" book, You can download it from the Book section on the TinyCoreLinux site.
I did download the book, there's a lot to take in and it's early days. I got enough from it to get to where I am. But still working through it.

I gather aterm is just invoking a shell from within a GUI, sort of like not loading the GUI in the first place. I've been using it already to look at permissions and stuff. Microcom is a command line utility, not really what I wanted. I think the program I was using is gtkterm. It was easy to control just with mouse clicks, and invoked the file browser for when I wanted to capture the input to a file.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 933
Re: A serial terminal
« Reply #3 on: May 20, 2020, 04:41:20 AM »
I've proposed aterm and microcom, because they are already present in the default TinyCore installation. I saw the specs of Your Armada - it is quite an aged box. I have one such dinosaur - Toshiba with Pentium MMX and 64M of RAM, running exactly the same TC 6.4.1 ) and for the same reason ) And there is no network capabilities on it, besides PPP through serial port (I didn't made this), so I copy extensions from the repo on the other box to the flash drive and then load them locally.

When I was trying Puppy, there was Rox-term in it as the default terminal. And yes, microcom is CLI utility, and You can redirect data recieved by it into the file using standard redirections,
Code: [Select]
microcom /dev/ttyS0 > myfile.txt
« Last Edit: May 20, 2020, 04:52:04 AM by jazzbiker »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: A serial terminal
« Reply #4 on: May 20, 2020, 05:05:31 AM »
Hi jazzbiker
Since the OP wants the data displayed and saved to a file you could add the  tee  command. I'm not certain of the syntax, but I
think it's something like this:
Code: [Select]
microcom /dev/ttyS0 | tee -a myfile.txt
Or here's another way:
Code: [Select]
microcom /dev/ttyS0 > myfile.txt &
tail -f myfile.txt

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 933
Re: A serial terminal
« Reply #5 on: May 20, 2020, 05:24:28 AM »
Hi, Rich!

You're quite right, as usual ) I was not attentive reading original post and missed that data must be displayed OR stored, thanks!

Offline ajcashin

  • Newbie
  • *
  • Posts: 6
Re: A serial terminal
« Reply #6 on: May 20, 2020, 06:54:42 AM »
Thanks guys. I had thought about command line but I was hoping for something GUI.

I gave the old Armada an extra 64Mb memory salvaged from the laptop that died (it was newer, but not by much). I have been able to load Legacy OS 2017 into another partition but it takes ages to do anything. Tiny Core with GUI loaded is using about half the memory and fast so I think there's plenty of resources for what I want, just have to find it (or make it?). Hoping someone else had the same problem and solved it.

I've been fortunate that TC found the Ethernet card, a PC card in the card dock (previously called PCMCIA). The lead was lost so I've soldered some wires to the card from an RJ45 socket (also pulled from the dead laptop). Some guy figured out where, I just did what he did and it worked.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 933
Re: A serial terminal
« Reply #7 on: May 20, 2020, 07:12:28 AM »
Hi, ajcashin!

But You mentioned gtkterm, my guess was, that it is terminal emulator for GUI desktop?
If You are online, try lxterminal, maybe...
Why do You controverse X desktop and cli? They are close relatives )


« Last Edit: May 20, 2020, 07:17:52 AM by jazzbiker »

Offline ajcashin

  • Newbie
  • *
  • Posts: 6
Re: A serial terminal
« Reply #8 on: May 20, 2020, 06:03:32 PM »
Maybe terminal is the wrong name for what I am seeking. I want a GUI window that acts like a dumb terminal communicating through the serial port. It seems the word terminal also includes GUI windows that act like a CLI.

A bit of searching brings up a package cutecom.tcz which sounds like what I want. But when I use the Apps window it doesn't come up. I haven't been able to find the actual package, just lists with it as an entry.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: A serial terminal
« Reply #9 on: May 20, 2020, 06:40:31 PM »
Hi ajcashin
Maybe  putty.tcz  will do what you want? There's also  minicom.tcz , but it looks to be more command line orientated.


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: A serial terminal
« Reply #10 on: May 20, 2020, 11:39:49 PM »
cutecom was last available in TC 4.x. So like gtkterm or others not packaged, you'd need to build it. This would be pretty slow on such a computer, better to use a faster one, even a VM.
The only barriers that can stop you are the ones you create yourself.

Offline ajcashin

  • Newbie
  • *
  • Posts: 6
Re: A serial terminal
« Reply #11 on: May 21, 2020, 12:18:25 AM »
cutecom was last available in TC 4.x. So like gtkterm or others not packaged, you'd need to build it. This would be pretty slow on such a computer, better to use a faster one, even a VM.
Or I could install TC 4 instead of TC 6? It's an old machine so TC 4 would know about the hardware. I had a quick look at putty but it looked like overkill. And yes, minicom would need a lot of keystrokes. It looks like I'm doing something out of the ordinary. I was hoping for a quick fix but it is now suck it and see time. Thanks for the input. If I find a good solution, I'll post it.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: A serial terminal
« Reply #12 on: May 21, 2020, 09:43:21 AM »
Sure, you can install TC 4. With Linux already installed, you don't even have to burn cds - download the kernel and initrd to your boot dir, edit bootloader. I recommend separate tce dirs if you intend to keep TC 6.
The only barriers that can stop you are the ones you create yourself.

Offline ajcashin

  • Newbie
  • *
  • Posts: 6
Re: A serial terminal
« Reply #13 on: May 22, 2020, 09:05:36 PM »
Getting messy. TC 4 doesn't have the driver for my Ethernet card. I know which driver, and it's in the list of drivers, just not in the distro. I don't know how to install cutecom or the Ethernet driver from a USB stick. The method is probably in the TC Book, I just haven't got there yet.

To see if GTKterm was what I used before, I loaded up Lubuntu on another machine with 512Mb memory and downloaded GTKterm. It confirms it was what I was using. Lubuntu took forever to load and ran like a dog, won't be going the Ubuntu derivatives again. I have a server which started with Ubuntu 12.04 and stupidly 'upgraded' progressively to 18.04. It worked fine up to 16.04 but now seizes up. Not a memory problem, if I monitor it, CPU usually less than 10% and memory around 800MB in a 2GB machine. Too complex for me. A project for another day.

I'm not asking for help (yet), just explaining that I may not be posting that 'good solution' any time soon.