IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

Linux I/O port programming mini-HOWTO

Search Howtos :Match :
Next Previous Contents

8. Troubleshooting

Q1.

I get segmentation faults when accessing ports.

A1.

Either your program does not have root privileges, or the ioperm() call failed for some other reason. Check the return value of ioperm(). Also, check that you're actually accessing the ports that you enabled with ioperm() (see Q3). If you're using the delaying macros (inb_p(), outb_p(), and so on), remember to call ioperm() to get access to port 0x80 too.

Q2.

I can't find the in*(), out*() functions defined anywhere, and gcc complains about undefined references.

A2.

You did not compile with optimisation turned on (-O), and thus gcc could not resolve the macros in asm/io.h. Or you did not #include <asm/io.h> at all.

Q3.

out*() doesn't do anything, or does something weird.

A3.

Check the order of the parameters; it should be outb(value, port), not outportb(port, value) as is common in MS-DOS.

Q4.

I want to control a standard RS-232 device/parallel printer/joystick...

A4.

You're probably better off using existing drivers (in the Linux kernel or an X server or somewhere else) to do it. The drivers are usually quite versatile, so even slightly non-standard devices usually work with them. See the information on standard ports above for pointers to documentation for them.


Next Previous Contents
Search Howtos :Match :
Safesquid proxy server 4.2.2.RC8.14B
Antivirus and content filtering proxy server
Thunderbird 2.0.0.18
An email and newsgroup client with powerful, new junk mail controls
JEdit 4.3pre16
Programmers text editor
Gdm 2.24.1
Reimplementation of the well known xdm program.
Damn Small Linux 4.4.10
Damn Small Linux, 50MB bootable Linux desktop LiveCD
PhpMyAdmin 3.1.0 rc1
Php front-end to MySQL administration
ImageMagick 6.4.5.8
ImageMagick image processing studio
KOffice 2.0 beta3
Integrated office suite for KDE
LimeWire 4.18.8
Gnutella Client
Trac 0.11.2.1
Integrates SCM, Wiki and Issue Tracker
Free IT Magazines, White Papers, eBooks, and more !
Oracle Magazine

Contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more.

eWeek

The essential technology information source for builders of e-business.

BusinessWeek (Digital Edition)

Provides readers a deeper understanding of the trends that drive growth, and what best practices keep them ahead of the competition.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info