WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Serial Port  (Read 86 times)

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 409
Serial Port
« on: February 10, 2026, 12:01:07 PM »
Hi everyone,

I bought a temperature sensor which when setup ahead of time on another machine, under the application of the next power up, acts as a virtual com port and simply outputs temperature readings in an ascii character string at 9600 bps.

It seems to work on my old TC 3.8.4 (kernel 2.6.33) except as soon as I try to look at the output of the port with;

Code: [Select]
cat /dev/ttyACM0

or with;
Code: [Select]
microcom -s 9600 /dev/ttyACM0

Everything seems okay, but when i Ctrl-C (in case of cat) or Ctrl-X (in case of microcom) my system returns in a very strange state; I do get the command prompt back but typing

Code: [Select]
ls

Returns nothing but an "Input/Output" error, and it seems that my filesystem is completely gone!!??

I am able to

Code: [Select]
sudo poweroff

And turn off gracefully (I hope) but I wonder if anyone has encountered this before and knows a possible solution? I also tried to install a python program "grabserial" but after installation of pyserial library, the program "grabserial" is not working at all, error codes of various types.

And strangely, after exiting "cat" or "microcom"  typing  "dmesg" doesn't show anything telling regarding this.

I did test the sensor on an even older distribution (2.6.21) on as ASUS EEE laptop and it seems to fully work in the sense that I can "cat /dev/ttyACM0" and I see the output strings just fine, and hitting "Ctrl-C" to exit "cat" the system is back to normal, no "lost" filesystem.

Any ideas as to what's going on with my TC 3.8.4 setup regarding this?

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 409
Re: Serial Port
« Reply #1 on: February 10, 2026, 02:18:30 PM »
Hi everyone,

Sorry for all my posting lately, but I think I (FINALLY) got this problem fixed!

After all the problems I've been having lately with the 4GB boot-stick and the temp sensors I guess I got impatient and changed a few things at once, so now I'm not sure which was the culprit but at least it's working now, I think anyway.

In the BIOS, firstly I disabled "ECHI handoff", this actually didn't do anything that I could tell, and then I;

1) In the BIOS, changed "Plug and Play OS" from No to Yes.
2) In the BIOS, under USB Device Management changed "Emulation" from "Auto" to "HDD".
3) I plugged the temperature sensor into a different port (probably irrelevant).
4) Ran the commands as su.

So now, typing

Code: [Select]
sudo microcom -s 9600 /dev/ttyACM0 > test.log

Works!, and even better, hitting Ctrl-X to exit, everything seems stable and normal afterwards! So must have been one of the BIOS settings that was causing me grief?

Now I'm trying to figure out how to add a time stamp to the log file, I tried;

Code: [Select]
sudo microcom -s 9600 /dev/ttyACM0 | date > test.log
And that didn't work at all, I might be able to get by w/o a time stamp there but would be nice to have.

Thanks for listening, and if anyone knows how to append a time onto the microcom output above, that would be great!

Thanks,

David

    [Edit]: Fixed code tag.  Rich
« Last Edit: February 10, 2026, 04:50:00 PM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12561
Re: Serial Port
« Reply #2 on: February 10, 2026, 05:13:55 PM »
Hi MTCAT
Try this:
Code: [Select]
date > test.log; sudo microcom -s 9600 /dev/ttyACM0 >> test.log
This should work too:
Code: [Select]
sudo microcom -s 9600 /dev/ttyACM0 > $(date +"%y%m%d%H%M%S").logThat should create a log file whose name is the date code that looks like:
Code: [Select]
YYMMDDHHMMSS.logThis creates a unique file every time it's run. In a directory listing they
would all be grouped together and sorted from oldest to newest.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 409
Re: Serial Port
« Reply #3 on: Today at 11:05:51 AM »
Hi Rich,

Thanks a lot for the help getting a timestamp into the log file, I'll give your suggestions a try next time I have the system up and running!

Thanks,

David