Source code for serial port


 
Thread Tools Search this Thread
Top Forums Programming Source code for serial port
# 1  
Old 12-16-2008
Source code for serial port

Hi,

I am working with sun Solaris 5.9 and in my application,I have to communicate with Serial port(i.e /dev/term/a).
So I need source code to by which I can do the following things--
1)check the port is available or not.If it dosn't find the port,it should throw the error message(i.e. port not found!!)
2)If it finds then it should check wether any device is connected or not.

please help me on this.you can tell me code on C/C++.

Thanks in advance...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Cabling and adapters to communicate to service processor serial port from Windows PC with USB port.

Hello, I have an unloaded T5140 machine and want to access the ILOM for the first time and subsequently the network port after that., and then load Solaris 10 the final January 2011 build. The first part is what confuses me -the cabling. I am coming from a Windows machine (w/appropriate... (5 Replies)
Discussion started by: joboy
5 Replies

2. Solaris

Using PC serial port from ReflectionX

I am using ReflectionX on a windows PC to run an application on a Solaris box. The application uses the serial port and expects a definition like: /dev/ttyb Is there a way to use the PC serial port through ReflectionX? PC is running Windows-XP Solaris Box is: Sun Microsystems sun4u... (1 Reply)
Discussion started by: deanjennings
1 Replies

3. Solaris

How to enable Serial port on ILOM, when Network Port is enabled in parallel

Hi Everyone, In my environment, I have few T5220. On the iLOM Management Card, I have both Network and Serial port are cabled, I don't have any issues while I try to connect using Network Management port, but when I try to connect the serial port for the same server which is actually connected... (3 Replies)
Discussion started by: bobby320
3 Replies

4. Shell Programming and Scripting

Need help with serial port

Hi, I have a external board connected to my serial port. I need to execute "shutdown -r now" command when system boot up. When system boots up it requires a username ans password. Then I need to run my command. I can use rc script but that is rebooting system before it asks for username and... (0 Replies)
Discussion started by: charlie.arya
0 Replies

5. Windows & DOS: Issues & Discussions

Telnet to a serial port

Hello all. I have an old computer with M$-DOS 7. I want to use it like a dumb terminal, with telnet. I need to connect it to my desktop These are my questions: How can i configure the serial port on dos? How can i telnet form dos to the serial port? How can i set up a telnet server on the... (12 Replies)
Discussion started by: mghis
12 Replies

6. Solaris

Serial port on the T5140

What is the serial port on the T5140 used for. (4 Replies)
Discussion started by: pgsanders
4 Replies

7. AIX

Serial port in AIX

Hi, How can i configure my modem in AIX thru serial port (sa0-->tty0) I have two port serial card configured as sa0 I created tty1 which port is tty0 and which port is tty1 how can i know?? (1 Reply)
Discussion started by: pchangba
1 Replies

8. UNIX for Advanced & Expert Users

how to port a package to huge source code having its own make and compilers

In general for intalling a package like we do ./configure, make , make install But if we want to integrate the package with a huge source base what are the things to be taken care could some one have a light on purpose of ./configure , make and make install along with above question. I... (1 Reply)
Discussion started by: Gopi Krishna P
1 Replies

9. Solaris

Serial port problem

I am working with solaris 9 sparc and I want to connect physical device in serial port but when I am connecting it,It is showing the error window saying-- So can any1 tell me the reason or is there any package I have to add to work with serial port??? (2 Replies)
Discussion started by: smartgupta
2 Replies

10. Programming

serial port reading

Hai there, Can any one provide me with a ansi c source code for opening com1 or com2 and read data. The port is connected to another serial communication device on rs232 port. The o/s is Sco Unix 5.0.6 Matter urgent Viswanath (0 Replies)
Discussion started by: viswanath
0 Replies
Login or Register to Ask a Question
OUTB(2) 						     Linux Programmer's Manual							   OUTB(2)

NAME
outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - port I/O DESCRIPTION
This family of functions is used to do low-level port input and output. The out* functions do port output, the in* functions do port input; the b-suffix functions are byte-width and the w-suffix functions word-width; the _p-suffix functions pause until the I/O completes. They are primarily designed for internal kernel use, but can be used from user space. You compile with -O or -O2 or similar. The functions are defined as inline macros, and will not be substituted in without optimization enabled, causing unresolved references at link time. You use ioperm(2) or alternatively iopl(2) to tell the kernel to allow the user space application to access the I/O ports in question. Failure to do this will cause the application to receive a segmentation fault. CONFORMING TO
outb() and friends are hardware-specific. The value argument is passed first and the port argument is passed second, which is the opposite order from most DOS implementations. SEE ALSO
ioperm(2), iopl(2) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 1995-11-29 OUTB(2)