Reply by Stef December 13, 20182018-12-13
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.
Reply by Stef December 13, 20182018-12-13
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.
Reply by Andrew Smallshaw December 10, 20182018-12-10
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
Reply by Andrew Smallshaw December 10, 20182018-12-10
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
Reply by Stef December 10, 20182018-12-10
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
Reply by John Speth December 8, 20182018-12-08
> 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. JJS
Reply by Theo December 7, 20182018-12-07
Stef <stef33d@yahooi-n-v-a-l-i-d.com.invalid> wrote:
> Does X modem als allows the sender to set the filename?
Some extensions to Xmodem did, as does Ymodem. Theo
Reply by Stef December 7, 20182018-12-07
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, >> 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. > > 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. -- 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 weak he is. -- Jim Starlin, "Captain Marvel #31"
Reply by Stef December 7, 20182018-12-07
On 2018-12-07 raimond.dragomir@gmail.com wrote in comp.arch.embedded:
> vineri, 7 decembrie 2018, 14:20:42 UTC+2, Stef a scris: >> 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. >> He who foresees calamities suffers them twice over. > > 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...
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)
Reply by Stef December 7, 20182018-12-07
On 2018-12-07 Andrew Smallshaw wrote in comp.arch.embedded:
> On 2018-12-07, Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> wrote: >> >> 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. > > 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.
Does X modem als allows the sender to set the filename?
> 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.
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 being flat broke and having a stomach ache. -- Dolph Sharp, "I'm O.K., You're Not So Hot"