Tuesday, December 29, 2009

Gui front end for parallel port controller in Linux

A graphical front end for the parallel port controller in Linux was my dream and I just satisfied it in my Xmas vacation. I used Qt framework from Nokia. I just put here everything I did. Of course you are allowed to download and use it under GPL (GNU General Public License). You are appreciated to modify source code according to your needs.
Now the program supports only on Linux platforms even though qt frame work is independent of platform. The reason is that, parallel port controlling is directly depend upon the OS you are used. You can easily control your parallel port in MS DOS environment, but things become worse when you try in Windows XP. Since the program calls the ioperm() function, you should have root privileges. Otherwise an abrupt exiting of the program occur. You only need to do the following things:
  • Be root, and start the program by ./parport2. Try to open it from terminal at least for the first time in order to track bugs.
  • Click 'Initialize' to call ioperm(). If you are not root, then the program abruptly exits while you click it.
  • Nothing will be happened at outside while you click in 'Initialize'.
  • You can use 8 switches to turn on or off the output data ports.
  • The current output value in decimal is displayed on lineEdit.
Most probably the executable version will not work in your system unless your system configuration matches with mine. So it is recommended to compile entire program using qt. You need to have qmake installed in your system (qt-dev-tools). The compiling instructions for qt program is beyond the scope of this post.

Download parport.tar.gz (1.4MB)

I tested it in my PC and worked without any problem.
Warning: Take care while you play with parallel port. Very rarely, the after effect may fatal.
Note:- This program is intended for educational purposes only. May not be updated until anyone report a bug or a request to modify.

5 comments:

xiaolaba said...

hi, it is possible tell what Qt setup used to be recompile this code, we have try Qt GUI applicaition and Qt console, did not work out to compile in success

Tom Varghese Konikkara said...

Reply to xiaolaba
I've used Qt IDE from Nokia. Please specify the error message showing during build and the Linux distro you have used.

Anonymous said...

There is a compilation bug because the png files are missing

André

Tom Varghese Konikkara said...

Reply to André
Thanks André. I have uploaded the corrected source code. Keep visiting.

Anonymous said...

Would it be possible to create a reading version instead? Any help would be greatly appreciated.