EmbeddedRelated.com
Forums

Serial terminal (VT100) with automatic save specified data

Started by Stef December 7, 2018
On 2018-12-08 John Speth wrote in comp.arch.embedded:
>> 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? > > It sounds like you've received some good suggestions. A possibly > extreme solution would be to alter Tera Term. The source code is > available somewhere. I've made small modifications to it to suit my > needs over the years.
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
On 2018-12-07, Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> wrote:
> On 2018-12-07 Stef wrote in comp.arch.embedded: >> On 2018-12-07 Andrew Smallshaw wrote in comp.arch.embedded: >> >>> The other option that comes to mind would be local terminal printing, >> >> Interesting, just a simple <ESC>[5i to start and <ESC>[4i to stop? >> Certainly worth looking in to. Thanks. > > 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.
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 andrews@sdf.org
On 2018-12-07, raimond.dragomir@gmail.com <raimond.dragomir@gmail.com> wrote:
> > 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.
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 andrews@sdf.org
On 2018-12-10 Anssi Saari wrote in comp.arch.embedded:
> Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> writes: > >> 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. > > There should be open source implementations around. The one I remember > using in Linux is lrzsz at https://ohse.de/uwe/software/lrzsz.html. Of > course, I have no idea how hard it would be to adapt that to your > system.
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: When things just can't possibly get any worse, they will.
On 2018-12-10 Andrew Smallshaw wrote in comp.arch.embedded:
> On 2018-12-07, Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> wrote: >> On 2018-12-07 Stef wrote in comp.arch.embedded: >>> On 2018-12-07 Andrew Smallshaw wrote in comp.arch.embedded: >>> >>>> The other option that comes to mind would be local terminal printing, >>> >>> Interesting, just a simple <ESC>[5i to start and <ESC>[4i to stop? >>> Certainly worth looking in to. Thanks. >> >> 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. > > 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.
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.