9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] serial port programming
@ 2001-02-15 17:10 Sam Ducksworth
  0 siblings, 0 replies; 7+ messages in thread
From: Sam Ducksworth @ 2001-02-15 17:10 UTC (permalink / raw)
  To: 9fans mailing list

i would like to write a simple plan9
program that i can use to pull serial
data from a microcontroller based data
logger that i have constructed. does
anyone know where i could find some
sample code that shows how plan9
handles serial port I/O.

-sam


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] serial port programming
@ 2001-02-16  4:41 anothy
  0 siblings, 0 replies; 7+ messages in thread
From: anothy @ 2001-02-16  4:41 UTC (permalink / raw)
  To: 9fans

in addition to the excelent suggestions already
offered, it sounds like consolefs(4) might be of
interest. it (and clog, on the same page) handles
multiple readers and writers to a set of serial
consoles and (optionally) logging them to files.
it is, of cource, focused on text consoles, but
may be a good starting point.
-α.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] serial port programming
@ 2001-02-15 22:37 rog
  0 siblings, 0 replies; 7+ messages in thread
From: rog @ 2001-02-15 22:37 UTC (permalink / raw)
  To: 9fans

>	look at /sys/src/cmd/ip/ppp/ppp.c:2437,2451

a pity that file only has 2433 lines...



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] serial port programming
@ 2001-02-15 21:47 presotto
  0 siblings, 0 replies; 7+ messages in thread
From: presotto @ 2001-02-15 21:47 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 104 bytes --]

Guess he'll have to wait till next release then...

I'll put the current version on the update page.

[-- Attachment #2: Type: message/rfc822, Size: 1225 bytes --]

From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] serial port programming
Date: Thu, 15 Feb 2001 22:37:39 0000
Message-ID: <20010215213250.DC734199D5@mail.cse.psu.edu>

>	look at /sys/src/cmd/ip/ppp/ppp.c:2437,2451

a pity that file only has 2433 lines...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] serial port programming
@ 2001-02-15 21:24 presotto
  0 siblings, 0 replies; 7+ messages in thread
From: presotto @ 2001-02-15 21:24 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 99 bytes --]

Short answer:

	cat /dev/eia0

Longer answer:

	look at /sys/src/cmd/ip/ppp/ppp.c:2437-2451

[-- Attachment #2: Type: message/rfc822, Size: 3856 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 449 bytes --]

I know the world of computing has forsworn manuals
for a variety of reasons, but it's a valid approach in
Plan 9.

So, read uart(3) first. It explains how to configure
a uart by opening the ctl file and writing simple
strings. You read and write it by reading and writing the
data file. As they used to say on a game show here,
"that's all there is to it".

If you need more, then try

src con

the source of the terminal emulator.


[-- Attachment #2.1.2: Type: message/rfc822, Size: 1693 bytes --]

From: Sam Ducksworth <sam@ducksworth.com>
To: 9fans mailing list <9fans@cse.psu.edu>
Subject: [9fans] serial port programming
Date: Thu, 15 Feb 2001 09:10:07 -0800
Message-ID: <3A8C0D6F.17395EC2@ducksworth.com>

i would like to write a simple plan9
program that i can use to pull serial
data from a microcontroller based data
logger that i have constructed. does
anyone know where i could find some
sample code that shows how plan9
handles serial port I/O.

-sam

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] serial port programming
  2001-02-15 17:18 nigel
@ 2001-02-15 17:35 ` Sam Ducksworth
  0 siblings, 0 replies; 7+ messages in thread
From: Sam Ducksworth @ 2001-02-15 17:35 UTC (permalink / raw)
  To: 9fans

thanks nigel,

nigel@9fs.org wrote:
>
> I know the world of computing has forsworn manuals
> for a variety of reasons, but it's a valid approach in
> Plan 9.

i have no problem with RTFMing. i was just
RTFMing in the wrong place. being a unix guy
i found myself searching for tty and term
related man pages.

>
> So, read uart(3) first. It explains how to configure
> a uart by opening the ctl file and writing simple
> strings. You read and write it by reading and writing the
> data file. As they used to say on a game show here,
> "that's all there is to it".

wow. it really is easy.

>
> If you need more, then try
>
> src con
>
> the source of the terminal emulator.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] serial port programming
@ 2001-02-15 17:18 nigel
  2001-02-15 17:35 ` Sam Ducksworth
  0 siblings, 1 reply; 7+ messages in thread
From: nigel @ 2001-02-15 17:18 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

I know the world of computing has forsworn manuals
for a variety of reasons, but it's a valid approach in
Plan 9.

So, read uart(3) first. It explains how to configure
a uart by opening the ctl file and writing simple
strings. You read and write it by reading and writing the
data file. As they used to say on a game show here,
"that's all there is to it".

If you need more, then try

src con

the source of the terminal emulator.


[-- Attachment #2: Type: message/rfc822, Size: 1693 bytes --]

From: Sam Ducksworth <sam@ducksworth.com>
To: 9fans mailing list <9fans@cse.psu.edu>
Subject: [9fans] serial port programming
Date: Thu, 15 Feb 2001 09:10:07 -0800
Message-ID: <3A8C0D6F.17395EC2@ducksworth.com>

i would like to write a simple plan9
program that i can use to pull serial
data from a microcontroller based data
logger that i have constructed. does
anyone know where i could find some
sample code that shows how plan9
handles serial port I/O.

-sam

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-02-16  4:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-15 17:10 [9fans] serial port programming Sam Ducksworth
2001-02-15 17:18 nigel
2001-02-15 17:35 ` Sam Ducksworth
2001-02-15 21:24 presotto
2001-02-15 21:47 presotto
2001-02-15 22:37 rog
2001-02-16  4:41 anothy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).