Using an X Windows Terminal as an RS232 debug interface

In all my embedded DSP based products I use an RS232 port (driven with printf) as a means of seeing whats going on inside a CPU or DSP.

I am looking for a way to increase the flexability of the displayed data since there is often data from differnt processes all competing for my attention before it scrolls off the screen.

I was considering using an X Windows terminal emulator program (which I know very little about at this point) as a means for interacting with my embedded projects. It would be great if I could fire up an Xwindows terminal emulator program on my Windows PC, choose COM2,

19200 8N1 and BAM! display graphical data from a small embedded device. Since the available memory left over for debug-related code tends to be on the order of a few kbytes, the embedded device would only be sending printfs containing the most basic of Xwindows commands.

Has anyone done something similar to this? Is there a better way to get a tiny embedded device to control a standardized graphical debug interface?

Thanks,

-howy

Reply to
howy
Loading thread data ...

What? It isn't at all clear what you mean by "fire up an X Windows terminal emulator program on my Widnows PC". You want to run an Xterm and have it run and display on your windows machine or run on your Windows machine and display elsewhere?

Huh? X Windows terminal emulators don't typically do graphics (unless you count xterm's Tektronix 4xxx emulation). They're just text terminals.

You seem to be laboring under a fundamental misunderstanding of what a X Windows terminal emulator does. It's typically just a ANSI terminal emulator that runs under X Windows. It doesn't do graphical X protocol stuff via the serial port.

X Windows terminal emulators aren't graphical (except for xterm's emulation of an old Tektronix storage-tube terminal).

--
Grant Edwards                   grante             Yow! My pants just went to
                                  at               high school in the Carlsbad
                               visi.com            Caverns!!!
Reply to
Grant Edwards

That may explain my confusion when trying to Google for info on this concept.

Back in the late 1980's to early 1990's when Unix work stations transitionsed from text-based to graphical interfaces (at least thats when I saw it happening in college), I was under the impression that the graphical user interface was based on a stream of ASCII commands similar to PostScript. Maybie it WAS postscript... But at any rate these graphical dumb terminals were communicating over a network using a human-readable ASCII protocol (similar to the concept of HTML but much more user readable).

Was I on drugs or was there some GUI interface that used an ASCII serial stream at its lowest level (not HTML but similar in concept)?

-howy

Reply to
howy

You're probably thinking of Display Postscript, not X.

Still, it sounds like you need something more like syslog than X or DP. All that means is that each printf() gets an extra parameter or two that says where the message is coming from, and it's "level" (verbosity, severity, whatever). You store all the messages on the development machine, and you can filter them later.

You'd need to design a simple encapsulation protocol, but that shouldn't be hard. A few bytes for a header with type/size, then many bytes for the message.

Reply to
DJ Delorie

You may be thinking of "display postscript", a scheme unrelated to X Windows that Sun used in it's first foray into GUIs.

formatting link
formatting link

Or you might be thinking of AT&T's MGR windowing system: it was based on in-band escape sequences.

formatting link
formatting link
formatting link

MGR was a cute little system. I had it running under a Unix v7 clone on an 80286 for a while. It didn't require any networking facilities at all -- everything was done in-band via ptys. The X protocol is binary and runs over either TCP or Unix domain sockets. You could establish a PPP connection and then send X protocol commands from the embedded system to an X server running on the host (under Windows or Unix).

That sounds like either MGR or Display Postscript to me (though I know little about the latter). The X protocol is a pretty complex binary protocol that runs over network connections.

--
Grant Edwards                   grante             Yow!  I want to so HAPPY,
                                  at               the VEINS in my neck STAND
                               visi.com            OUT!!
Reply to
Grant Edwards

Except I think he wants to do graphical stuff...

--
Grant Edwards                   grante             Yow!  I just bought
                                  at               FLATBUSH from MICKEY
                               visi.com            MANTLE!
Reply to
Grant Edwards

OK, thanks I will look into that.

I was hoping there was a standard terminal emulator protocol (like a graphical version of a VT100 terminal) that would allow me to place a few buttons, graphs, and text windows on the PC's screen and maybe even accept user input commands like button press events and keyboard input - over a low bitrate serial stream.

-howy

Reply to
howy

Ok, not syslog then. That's for debug messages and the like.

Sounds more like Display Postscript, unless you want to do X over PPP, but that's pretty heavy-weight.

Reply to
DJ Delorie

Il 21/08/2007 0.48, howy ha scritto:

Check EmWare's EMIT. If you have little space left on your micro, could be an easy way to add a graphical interface.

Basically, your micro sends events and receives commands with a proprietary protocol. On the PC, a gateway renders this in a dynamic web page, that could be delivered also on the net, or locally.

The

formatting link
site doesn't point to the company anymore...

Anyone knows if it's still in businness ?

Reply to
Antonio Pasini

Web server?

Not done it myself, but there are several projects implementing cut-down "tiny" web servers on small micros (even PICs). In your case you could use SLIP over RS232.

--

John Devereux
Reply to
John Devereux

I guess those were actually TEK terminal graphics command streams or similar.

But serious confusion of terms is reigning here. There are various different things called "terminals". So I guess it's time for a little excursion to history.

First, there were relatively dumb keyboard+screen devices that served as mere human interfaces devices to a central multi-user computer, typically on a point-to-point serial line. Since they were at the endpoint of a long-ish cable, it was only fitting that they ended up being called "terminals". The canonical example is DEC's VT100. Some of these terminals were enhanced with graphical vector-drawing capabilities as a separate mode of operation (e.g. the TEK4010). I've never seen it done, but some people certainly must have used this to implement early GUIs, although it poses quite an amount of stress on the host computer.

Then came the next major step: The X Window System, a.k.a. X11. The key differences are that more intelligence was shifted to the terminal end of the chain to reduce load on the host, and the point-to-point connection was replaced by general-purpose networking. Thus the "X terminal" was born: a special-purpose user-interface computer running the "X Server". X11-enabled "client" programs can be started on any computer and have their user interface on any X server on the network. The X terminal also implements protocols to start such client sessions on remote machines. When you hear buzzwords like "thin client" or "network computer", it helps to think "X Terminal"

Gradually the roles of X terminal and "main computer" merged, and the result was the Unix/X11 workstation, most of which these days are Linux PCs.

Now, just about the most important X11 client programs is XTerm, the "X Windows Terminal emulator". Now hold on to your hat for the explanation of what it does: XTerm emulates an old-style dumb terminal in an X11 window to show up on an X Terminal. In other words, it's a virtual VT100 that runs on a "real" computer, and provides the user interface to a command-line program inside a window. In particular, it's not an emulator of an X terminal, but a terminal emulator that is an X client.

And then of course there's the kind of "terminal program" you're really looking for: a serial communications program. That's the kind of program you would run to connect to a RS232 device and display its output. The canonical one used to be Kermit, with minicom a close second.

Reply to
Hans-Bernhard Bröker

I use AT&T's FMLI (the source is now available in OpenSolaris) on a variety of projects to build curses-based GUIs -- graphs are only possible using characters from the extended set but it would do what you suggest. I have a demo "ascii oscilloscope" program written in C for the i8096 on my site and also a GUI running on the 'zipit' based on FMLI if your interested.

Regards,

Michael

Reply to
msg

OK, I guess was some what mis-informed from the beginning. I asked the original question half assuming someone would say, "sure you can do it that way, but here is the way every one else is doing it...".

I remember seeing an ad for a LCD touch screen that had a GUI scripting language built into it. Maybe I will see if they are still in business. Otherwise I might have to roll my own (or pay someone else to do it for me).

Thanks for you help everyone,

-howy

Reply to
howy

Are you thinking of Amulet?

formatting link

Robert

--
Posted via a free Usenet account from http://www.teranews.com
Reply to
Robert Adsett

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.