November 24, 2024, 05:11:25 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: getting data frm COM Serial Port using C Programs in UNIX  (Read 11245 times)

Offline hitu

  • New Member
  • Posts: 1
getting data frm COM Serial Port using C Programs in UNIX
« on: April 05, 2004, 03:46:44 PM »
Hello! i am Hiten from INDIA.

How can i program the SERIAL COM port using basic C programs in UNIX?

I actually want the address of this port and a small snippet code which will work at my location.

I am using RED HAT 9.0 linux.

i hope some one helps me out by sending a mail at hiten_sethaliya@yahoo.com / hiten_sethaliya@rediffmail.com
thank u!

Offline sudipta_cht

  • Linux Noob !
  • *
  • Posts: 14
getting data frm COM Serial Port using C Programs in UNIX
« Reply #1 on: April 06, 2004, 08:19:04 AM »
Read this before you post another
www.tldp.org/HOWTO/Serial-HOWTO.html

Offline Alien74

  • New Member
  • Posts: 2
getting data frm COM Serial Port using C Programs in UNIX
« Reply #2 on: August 26, 2004, 06:38:21 AM »
I think all the devices are unde /dev directory.
So if u want data from webcam u can just use /dev/video0.
In C u can use commaned like open,send ,recieve to send or recieve data
 :lol:

Offline jeeva

  • Linux Noob !
  • *
  • Posts: 28
you can do
« Reply #3 on: September 08, 2004, 11:50:03 AM »
find  the appropriate file under /dev, find the base address of that particular port, if you can do that, then just use inb() or outb() according to your requirement. good luck!!