Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Serial port monitor

2 views
Skip to first unread message

Chrisjoy

unread,
May 6, 2009, 6:31:05 AM5/6/09
to
Need to communicate via rs-232 to an embedded box,
Preferable something that let me view data in hex.
Any suggestion?

The Natural Philosopher

unread,
May 6, 2009, 7:14:05 AM5/6/09
to
A computer? ;-)

Chrisjoy

unread,
May 6, 2009, 7:36:57 AM5/6/09
to

Assume I've got even an OS installed on it. What software?

The Natural Philosopher

unread,
May 6, 2009, 10:11:53 AM5/6/09
to

What do you want to do with it? type in numbers and see numbers come
back? Or write a script to drive it a bit better, or write a complete
program to screw with it?

There are plenty of TERM programs out there..

Chrisjoy

unread,
May 6, 2009, 10:37:03 AM5/6/09
to
On 6 Mai, 16:11, The Natural Philosopher <t...@invalid.invalid> wrote:
> Chrisjoy wrote:
> > On 6 Mai, 13:14, The Natural Philosopher <t...@invalid.invalid> wrote:
> >> Chrisjoy wrote:
> >>> Need to communicate via rs-232 to an embedded box,
> >>> Preferable something that let me view data in hex.
> >>> Any suggestion?
> >> A computer? ;-)
>
> > Assume I've got even an OS installed on it. What software?
>
> What do you want to do with it? type in numbers and see numbers come
> back? Or write a script to drive it a bit better, or write a complete
> program to screw with it?

No need for scripting. If I could get 10 macros it would be more than
enough. If can choose between typing in ascii and hex, it would be
nice. Preferably I want two windows, one for send and one for receive
where I can choose independently for each, ascii or hex view. If
package is apt, then perfect.

> There are plenty of TERM programs out there..

I found only crap.

The Natural Philosopher

unread,
May 6, 2009, 4:27:34 PM5/6/09
to

Y'know what I would do?


Set up Apache and PHP, and write two php scripts, one to take data and
post it, and one to read it back and hexdump it.

Its the easiest way of doing batch mode reads and writes..to a
window..if you set it to autorefresh, it would be real time enough.

Chrisjoy

unread,
May 7, 2009, 7:05:21 AM5/7/09
to

This is not an acceptable way doint it. I need assurance I get every
single byte regardless which bit combination. No filtering. Not even
suspision of filtering of any kind. Your high level sollution just
doesn't cut it. Do you got an idea of a software that is made
exclusively for my needs, or do I have to go Windows, again?

Maxwell Lol

unread,
May 7, 2009, 9:49:00 PM5/7/09
to
Chrisjoy <ultralibe...@gmail.com> writes:

You can connect to a device as if it was a modem using somthing like
Kermit or zmodem.


Maxwell Lol

unread,
May 7, 2009, 10:04:54 PM5/7/09
to
Chrisjoy <ultralibe...@gmail.com> writes:

> This is not an acceptable way doint it. I need assurance I get every
> single byte regardless which bit combination. No filtering. Not even
> suspision of filtering of any kind. Your high level sollution just
> doesn't cut it. Do you got an idea of a software that is made
> exclusively for my needs, or do I have to go Windows, again?

30 years ago I wrote a C program that opened up a serial port, and
communicated to a RS-232 device. It's very simple.

Here's one sample program
http://www.comptechdoc.org/os/linux/programming/c/linux_pgcserial.html

That way you can do anything.

Now if you just wanted to read the data, converting it into hex,
you perhaps could use something simple like

(stty 19200;cat /dev/tty1) </dev/tty1 | od -x


I don't know what the baud rate/parity of the device is. But you can
set it with stty.

The parenthesis is needed because when the process running stty exits,
it resets the terminal characteristics to the initial value.

Once you know the proper baud, etc, you can specify the values in some
file like /etc/gettytab or /etc/ttytab. I don't know which file. It's
been a while since I've done serial programming.


Jules

unread,
May 8, 2009, 8:49:57 AM5/8/09
to
On Thu, 07 May 2009 22:04:54 -0400, Maxwell Lol wrote:

> Chrisjoy <ultralibe...@gmail.com> writes:
>
>> This is not an acceptable way doint it. I need assurance I get every
>> single byte regardless which bit combination. No filtering. Not even
>> suspision of filtering of any kind. Your high level sollution just
>> doesn't cut it. Do you got an idea of a software that is made
>> exclusively for my needs, or do I have to go Windows, again?
>
> 30 years ago I wrote a C program that opened up a serial port, and
> communicated to a RS-232 device. It's very simple.

Indeed* - that might be the best way to go, unless something like minicom
is good enough (lacks the 'hex' ability, for starters).

* A few years ago I threw some C code together to covert binary/hex and
transfer between the desktop PC and my RS232-based ROM/PAL programmer, and
there really wasn't much to it.

Of course "communicate via rs-232" doesn't explain much as to the nature
of the communication; whether it's pretty much all one-way, a
request-response model, fully bi-directional (i.e. either side can
initiate comms), what char[s] it uses to signal 'end of data' etc.

Standard tools seem to handle line-based request-response pretty well,
but for anything else it's likely into roll-your-own territory.

> Once you know the proper baud, etc, you can specify the values in some
> file like /etc/gettytab or /etc/ttytab. I don't know which file. It's
> been a while since I've done serial programming.

ISTR it varies by distro / getty package, or at least it used to.
(alongside the two you mentioned, I think /etc/gettydefs is a possibility,
too).

cheers

Jules

Chrisjoy

unread,
May 8, 2009, 10:37:18 AM5/8/09
to
On 8 Mai, 14:49, Jules <jules.richardsonn...@remove.this.gmail.com>
wrote:


Thanks for suggestions folks. The job is now done. Altso this time I
had to go Windowz. One google search gave me at the first three pages,
hits to ten different programs, many freeware, fulfilling all my
needs: macros, hex and ascii view, seperate windows for Rx and Tx. The
first one I downloaded was shareware where hex type and view where
grayed out for non paying custommers (but I could have used it because
octal was functional). The second I downloaded was freeware for basic
version, which was more than good enough for me. Same search looking
for a Linux app, ended up in three dead ends, where I gave up.

Not that I'm surprised. I've been here done this before. Last time was
when I needed an easy to use calculator for complex numbers. Linux was
a dead end that time too. Windows gave me two easy to use (and
install) programs and the job was done before I got the first answer
from usenet, which suggested something (to me) useless shit. It
doesn't mean I want to kill *nix. Only that it doesn't cut it for IT
pros at his desktop in his day to day work. In the server room, as a
router, web-server or file-server, it's great to have *nix, but at the
desktop it's crap for people with special interests. If it was like MS
overprized their products, I would be more interested in *nix, but
they don't. OS I get for $100 and Office $300. If this breaks your
budget your work on the comp cannot be profitable enough to justify
you leveling up from pen and paper. This is a Nix vs Win war and the
latter won a walk-over victory, at the desktop.

Thanks again folks, helping me yet again confirming my hypothesis. One
can only hope that someone inside *nix' hardcore, is able to
understand that inexpencive usually means only milk and bread or
crap.

Michael Black

unread,
May 8, 2009, 10:44:30 AM5/8/09
to
On Fri, 8 May 2009, Chrisjoy wrote:

> Not that I'm surprised. I've been here done this before. Last time was
> when I needed an easy to use calculator for complex numbers. Linux was
> a dead end that time too. Windows gave me two easy to use (and
> install) programs and the job was done before I got the first answer
> from usenet, which suggested something (to me) useless shit. It
> doesn't mean I want to kill *nix. Only that it doesn't cut it for IT
> pros at his desktop in his day to day work. In the server room, as a
> router, web-server or file-server, it's great to have *nix, but at the
> desktop it's crap for people with special interests. If it was like MS
> overprized their products, I would be more interested in *nix, but
> they don't. OS I get for $100 and Office $300. If this breaks your
> budget your work on the comp cannot be profitable enough to justify
> you leveling up from pen and paper. This is a Nix vs Win war and the
> latter won a walk-over victory, at the desktop.
>

Here's a solution, don't use Windows. Once you can't fall back to
that other operating system, either you look further or then start doing
what Linux is about, taking the open source code and modifying it for
your needs.

You had no real incentive for looking since you saw Windows as an option.

I've never run Windows, so it's never an option.

Michael

Chrisjoy

unread,
May 8, 2009, 11:05:18 AM5/8/09
to

No, thanks, I'm a reasonable guy. Computers are all about getting work
done to me, and got no value by itself. Neither do I see open source
as a value by itself.

> You had no real incentive for looking since you saw Windows as an option.
>
> I've never run Windows, so it's never an option.

Such religious stupidity I leave to the morons.

Robert Riches

unread,
May 8, 2009, 10:11:56 PM5/8/09
to

I smell a troll.

Plonk!

--
Robert Riches
spamt...@verizon.net
(Yes, that is one of my email addresses.)

The Natural Philosopher

unread,
May 9, 2009, 5:51:01 AM5/9/09
to

Oh you wont lose data, just response times.

There's enough buffering in a linux kernel to tale a LOT of serial data..

I wouldn't go windows. There it unlikely that it even bothers to look at
a serial port.

Chrisjoy

unread,
May 9, 2009, 9:07:44 PM5/9/09
to

I'm not worry about large enough buffers. You will not understand what
this is all about before you made your first embedded application with
communication between a µC and PC.

> I wouldn't go windows. There it unlikely that it even bothers to look at
> a serial port.

I allready did go Windows, and it helped me get done with the work.

Chrisjoy

unread,
May 9, 2009, 9:10:23 PM5/9/09
to
On 9 Mai, 04:11, Robert Riches <spamtra...@verizon.net> wrote:

You will get fewer false positives if you tuned your troll sensor
above the noice floor.

> Plonk!

Does this mean I will never get an immature and idiotic answer from
you again?

The Natural Philosopher

unread,
May 9, 2009, 10:07:03 PM5/9/09
to

I made my first communication between a - well it was an Intel
development machine coupled to an ICE plugged into an 8086
socket..er..about 20 years ago?


>> I wouldn't go windows. There it unlikely that it even bothers to look at
>> a serial port.
>
> I allready did go Windows, and it helped me get done with the work.

Jolly good.

WE used RM86 IIRC.

Bit like CP/M.

What astounds me, is that of you expect to program a uP, you cant even
write a basic monitor.

Or are you just trolling..

Chrisjoy

unread,
May 9, 2009, 11:59:00 PM5/9/09
to
On 10 Mai, 04:07, The Natural Philosopher <t...@invalid.invalid>

That must have been about ten years after I wrote my first program for
8085.

> >> I wouldn't go windows. There it unlikely that it even bothers to look at
> >> a serial port.
>
> > I allready did go Windows, and it helped me get done with the work.
>
> Jolly good.
>
> WE used RM86 IIRC.
>
> Bit like CP/M.

Is it hard to adapt your answer to what you are replying to?

> What astounds me, is that of you expect to program a uP, you cant even
> write a basic monitor.

I don't see how knowing my way around µCs should help me write a
monitor under an OS. Is it anything else you want to unveil about your
lack of knowledge, stupid?

> Or are you just trolling..

First I wasn't, but now I am. I'm trolling about you *nix guys not
able to come up with a simple monitor for rs-232.

0 new messages