Good $daytime,

> Date: Sat, 2 Jan 1999 13:44:04 -0500 (GMT)
> From: Saraf Aalhad Ashok <[EMAIL PROTECTED]> 
> To: Vitaly Fedrushkov <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED], [EMAIL PROTECTED] 
> Subject: Re: novice: problem with serial I/O

> * I don't know how to do it any other way! Since I've programmed in
> assembly and C on DOS, and don't know much about termios.

Do you plan to stay :)

> * I'm developing a system for connecting together several 8051 based
> clients on an RS 485 physical layer. I've finished the rough draft
> of the specifications of the protocol that the system would
> use. However I am also considering an implemetation of the modbus
> protocol, since it is a widely accepted standard for SCADA systems.

Commodity PCs use RS-232, typically w/o synchronous options.  I can't
tell for sure, but RS-485 hardware may differ significantly from what
you are doing now.

None the less, I think of terminal I/O as the only right
(portable) approach to a problem.

> It would be great if I could get some pointers from you as to how I
> could go about doing this using termios.

Some time ago I learnt to drive termios myself.  Try `info libc` or
`info glibc` (depends on your distribution), and look at section
titled 'Low-Level Terminal Interface'.

> Also currently , my first goal is to write two simple programs, One
> program sending data to a serial port and that serial port being
> connected via a null modem cable to another serial port which is
> being monitored by another program which takes in incoming data and
> either shows it on the screen or appends it / writes it to a file.
> It's taking me a long time just to do this . Could you please tell
> me how to go about doing it?

Look at examples there, particularly within 'noncanonical mode'
discussion.

> I'd like to know whether and how termios facilities could be used
> for implementing the modbus protocol on a Linux machine.

Again, never worked with modbus.  However, I am interfacing with AVR
based controllers, and implemented SECS-1 protocol without any
trouble.

  Regards, 
  Willy.

--
"No easy hope or lies        | Vitaly "Willy the Pooh" Fedrushkov
 Shall bring us to our goal, | Information Technology Division
 But iron sacrifice          | Chelyabinsk State University
 Of Body, Will and Soul."    | mailto:[EMAIL PROTECTED]  +7 3512 156770
                   R.Kipling | http://www.csu.ac.ru/~willy  VVF1-RIPE

Reply via email to