Do you have a question? Post it now! No Registration Necessary
Subject
- Posted on
December 7, 2018, 12:09 pm

For a test setup, I have created a small UI using the serial port
connected to a VT100 capable terminal (Tera Term).
I use the VT100 commands to create a "nice" (for certain values of nice)
looking output. This works OK.
But now I periodically (every few seconds) have an amount of data that
needs to be stored on the PC. A CVS like output with a 100 lines or so.
I can just spit this out after the menu, surrounded by some division lines
and copy paste out of the terminal, or dig through the log file (with
thousands of VT100 commmands between the data). But there must be an
easier way.
Do you know of a way (in Tera Term or other terminal) to automatically
save this data? Using some kind of modem protocol for instance?
Preferrably the data does not even show up on the screen and may be
even the file name could be set by the serial data.
connected to a VT100 capable terminal (Tera Term).
I use the VT100 commands to create a "nice" (for certain values of nice)
looking output. This works OK.
But now I periodically (every few seconds) have an amount of data that
needs to be stored on the PC. A CVS like output with a 100 lines or so.
I can just spit this out after the menu, surrounded by some division lines
and copy paste out of the terminal, or dig through the log file (with
thousands of VT100 commmands between the data). But there must be an
easier way.
Do you know of a way (in Tera Term or other terminal) to automatically
save this data? Using some kind of modem protocol for instance?
Preferrably the data does not even show up on the screen and may be
even the file name could be set by the serial data.
--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
He who foresees calamities suffers them twice over.
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
He who foresees calamities suffers them twice over.

Re: Serial terminal (VT100) with automatic save specified data

Terminal programs typically support downloads via zmodem which is a
protocol that allows automatic downloads and you can set the filename in
your system. I haven't used tera term in a few years but I'd assume file
transfers like that are supported. Of course, you'd have to implement
zmodem in your system.

Re: Serial terminal (VT100) with automatic save specified data
On 2018-12-07 Anssi Saari wrote in comp.arch.embedded:

Zmodem looks indeed capable of what I want to do and is supported by
Tera Term. But implementing it is not that easy it seems. I'll have to
see if it's worth the trouble for this test setup. Thanks.

Zmodem looks indeed capable of what I want to do and is supported by
Tera Term. But implementing it is not that easy it seems. I'll have to
see if it's worth the trouble for this test setup. Thanks.
--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
And it should be the law: If you use the word `paradigm' without knowing
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
And it should be the law: If you use the word `paradigm' without knowing
We've slightly trimmed the long signature. Click to see the full one.

Re: Serial terminal (VT100) with automatic save specified data
On 2018-12-10 Anssi Saari wrote in comp.arch.embedded:

Also found a piece of Zmode code that refers to lrzsz. All open source,
but a serious bit of code to add to a project. For now th PuTTY solution
with printing does what I asked for.

Also found a piece of Zmode code that refers to lrzsz. All open source,
but a serious bit of code to add to a project. For now th PuTTY solution
with printing does what I asked for.
--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
Chisolm's First Corollary to Murphy's Second Law:
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
Chisolm's First Corollary to Murphy's Second Law:
We've slightly trimmed the long signature. Click to see the full one.

Re: Serial terminal (VT100) with automatic save specified data

The likes of X/Y/Zmodem have already been mentioned, don't know
what your specifc terminal emulator would support. Xmodem is
easiest to implement with the proviso that you don't have exact
control over file size, for text data that is unlikely to be a
serious issue though.
The other option that comes to mind would be local terminal printing,
many terminal emulators can save this to a file automatically, I
know PuTTY can for example. That's trivially easy to implement
for ANSI terminals such as the VT100, one control code to switch
to the printer, output the text and another to switch back to screen
output.
--
Andrew Smallshaw
snipped-for-privacy@sdf.org
Andrew Smallshaw
snipped-for-privacy@sdf.org

Re: Serial terminal (VT100) with automatic save specified data

Does X modem als allows the sender to set the filename?

Interesting, just a simple <ESC>[5i to start and <ESC>[4i to stop?
Certainly worth looking in to. Thanks.
--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
Receiving a million dollars tax free will make you feel better than
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
Receiving a million dollars tax free will make you feel better than
We've slightly trimmed the long signature. Click to see the full one.

Re: Serial terminal (VT100) with automatic save specified data
On 2018-12-07 Stef wrote in comp.arch.embedded:

Did some testing. Interesting, but not quite there yet.
Tera Term asks where it should print to and you can only select an actual
printer. Same for PuTTY, select a printer and output goes there. The
PuTTY log can only log 'all' or 'printable characters', the latter
meaning the non-printing chars and escape sequences are omitted from the
log. Have not found an option yet to only log/print to file what is
between the <ESC>[5i and <ESC>[4i.

Did some testing. Interesting, but not quite there yet.
Tera Term asks where it should print to and you can only select an actual
printer. Same for PuTTY, select a printer and output goes there. The
PuTTY log can only log 'all' or 'printable characters', the latter
meaning the non-printing chars and escape sequences are omitted from the
log. Have not found an option yet to only log/print to file what is
between the <ESC>[5i and <ESC>[4i.
--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
Once, I read that a man be never stronger than when he truly realizes how
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
Once, I read that a man be never stronger than when he truly realizes how
We've slightly trimmed the long signature. Click to see the full one.

Re: Serial terminal (VT100) with automatic save specified data

Hmm, you appear to be correct, I must have mis-remembered.
However, I've just had a play on this Win10 machine, setting up a
generic plain text printer outputting to FILE:. Worked quite
nicely, didn't even ask for a filename but used a default. It's
a separate file for each output job though, which may or may not
work out well for you. The same would be true for X/Y/Zmodem as
well though.
--
Andrew Smallshaw
snipped-for-privacy@sdf.org
Andrew Smallshaw
snipped-for-privacy@sdf.org

Re: Serial terminal (VT100) with automatic save specified data
On 2018-12-10 Andrew Smallshaw wrote in comp.arch.embedded:

Just set up a Generic / text only printer and selected that in PuTTY.
And indeed, on the VT100 printing commands the output is printed to
file. All seperate files with automatic names, just like I wanted.
The file names are of course not very discriptive:
"PuTTY remote printer output (x).prn" with 'x' increasing on each job.
But in the print job I put a header with date and time and other info
so the jobs are recognizable. Very usable for my testing, thanks again.

Just set up a Generic / text only printer and selected that in PuTTY.
And indeed, on the VT100 printing commands the output is printed to
file. All seperate files with automatic names, just like I wanted.
The file names are of course not very discriptive:
"PuTTY remote printer output (x).prn" with 'x' increasing on each job.
But in the print job I put a header with date and time and other info
so the jobs are recognizable. Very usable for my testing, thanks again.
--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
You will be traveling and coming into a fortune.
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
You will be traveling and coming into a fortune.

Re: Serial terminal (VT100) with automatic save specified data

The easier way would have been a real software for the PC.
But you invested in a no-pc-software solution and you dig now
for a work-around.
Maybe a python script or something like that to extract
your real data from the log file full of VT100 commands?
But this is also a kind of pc software...

Re: Serial terminal (VT100) with automatic save specified data
On 2018-12-07 snipped-for-privacy@gmail.com wrote in comp.arch.embedded:

How would this be easier? It requires developing a PC application.
Remember this is just for testing. The final device will just have
a start button and a few indicator lights. But during testing having
some intermediate results is required.
And yes, I can just search the logs for the data. I was just hoping
there is an easier solution for this temorary 'problem'.

How would this be easier? It requires developing a PC application.
Remember this is just for testing. The final device will just have
a start button and a few indicator lights. But during testing having
some intermediate results is required.
And yes, I can just search the logs for the data. I was just hoping
there is an easier solution for this temorary 'problem'.
--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
(null cookie; hope that's ok)
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
(null cookie; hope that's ok)

Re: Serial terminal (VT100) with automatic save specified data

For many infrastructure devices I'd say the generic software approach
is to be preferred, it allows the user to use whatever platform
they want and removes a requirement on the developer to provide
ongoing support for that element at least. If the device is not
some commodity tat but a three, four or five figure peice of plant
or instrumentation it could well be expected to last twenty or
thirty years. Good luck using that 16 bit control app that was
originally supported on Windows 98.
And no, it's not just oddball stuff from smaller specialists that
this covers. Cisco comes to mind, sure, if it's on the network
you can FTP or SFTP across a new firmware image, but if it isn't
(it's been bricked for example) you are back to the console port
and uploading the image via Zmodem.
--
Andrew Smallshaw
snipped-for-privacy@sdf.org
Andrew Smallshaw
snipped-for-privacy@sdf.org

Re: Serial terminal (VT100) with automatic save specified data
On 2018-12-08 John Speth wrote in comp.arch.embedded:

A bit on the extreme side indeed. ;-)
Maybe some simple hack to change the VT100 print to log instead of print
would not be too complicated. But I would first need to get a build going,
I don't even think I have a compiler for Windows software ready for use.
Sounds like too much work for the tests I need to do now. But good to keep
in mind that it is a possiblity. I assume you mean source from this page:
https://ttssh2.osdn.jp/index.html.en

A bit on the extreme side indeed. ;-)
Maybe some simple hack to change the VT100 print to log instead of print
would not be too complicated. But I would first need to get a build going,
I don't even think I have a compiler for Windows software ready for use.
Sounds like too much work for the tests I need to do now. But good to keep
in mind that it is a possiblity. I assume you mean source from this page:
https://ttssh2.osdn.jp/index.html.en
--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
HTTPD Error 4004 : very old Intel cpu - insufficient processing power
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)
HTTPD Error 4004 : very old Intel cpu - insufficient processing power
Site Timeline
- » "Device-to-smartphone" and "smartphone-to-device" technologies
- — Next thread in » Embedded Programming
-
- » Makefile or not?
- — Previous thread in » Embedded Programming
-
- » Ceramic capacitor failure
- — Newest thread in » Embedded Programming
-
- » AR CD-04 CD player display
- — The site's Newest Thread. Posted in » Electronics Repair
-