Wednesday, January 20, 2010

How does control the parallel port through internet ?

i maked a program in C# .NET ,where i control the parallel port .


But printer port is controled by mouse/keyboard.Some LEDs are connected to the port ......


But i want control the printer port throuhg internet .


Let suppose ,i make a website ,where i put some buttons ,when i click on the buttons then LEDs on/off connected to the port.


Note that ,website open in PC 1 and c# program is installed on PC2 and also LEDs connected to the parallel port of PC2.


In short


website-----------%26gt;c# program----------------%26gt;printer port


click button -------%26gt; get input from website ------%26gt; LED on/offHow does control the parallel port through internet ?
Learn about CGI (Common Gateway Interface) - that would be the easiest way to modify your program to work with the web.





http://en.wikipedia.org/wiki/Common_Gate鈥?/a>





You would install Apache (or another HTTP server) and create a web page with a form. If your C# program is installed as a CGI program, it will be run each time the form is submitted.





Be careful! This means that more than one copy of your program may be running at once, if several people submit the form almost at the same time. Make sure that you use some sort of semaphore or locking to avoid two copies of your program working with the parallel port at once (unless you have carefully planned how that might work).

No comments:

Post a Comment