Link to home
Start Free TrialLog in
Avatar of Bazavilvazo
Bazavilvazo

asked on

Sending data to COM2 in UNIX Lynx with C

hi!!
do someone know how can i send and receive data throw the com2 in a UNIX Lynx system???
the manuals don't work... i mean programing it with C
Avatar of Bazavilvazo
Bazavilvazo

ASKER

any help with be VERY useful!!
com2 should be associated to a device, and since devices are just handled like a file, then the normal input/output operations should work in UNIX.

Now, how to do it properly can be found if you get any program in the internet that handles serial communication protocols (kermit for example) and analyze its code.


The OS whose name you are trying to think of is "Linux".

YOu can send data out of the serial port just with
"cat data > /dev/ttyS1"
In un*x, everything is just a file, this includes the serial ports.  Use stty(1) to set the serial port's baud rate etc, appropriately.   If you want to do that in C, see "man termios".

ASKER CERTIFIED SOLUTION
Avatar of grantk
grantk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial