Ubuntu :: Accessing Parallel Ports From Perl Program

Dec 11, 2010

I am trying to write to the parallel port pins from a Perl program running Ubuntu Linux, to light up led's on a bread board. I've already accomplished this on this same box using a C program, but I cannot get my code below to work. I believe the problem is with the line:
$parport = Device::ParallelPort->new('auto:0');
I've tried different variables between the ('') ticks, but nothing has worked. I use Perl on my web pages for forms, but this has stumped me.

Code is below:
#!/usr/bin/perl require "subparseform.lib"; &Parse_Form; print "Set-cookie:
cart_id=1234; user_id=123;
"; print "Content-type: text/html
"; use strict; use CGI; use Device::ParallelPort;
# use Device::ParallelPort::drv; # use Device::ParallelPort::drv::linux # use Device::ParallelPort::drv::parport
# Set up your parallel port object and tell it what driver to use.
#my $parport = Device::ParallelPort->new('auto:0'); print "It works!!!";

View 1 Replies


ADVERTISEMENT

General :: Lighting LEDS Using Parallel Ports?

Oct 1, 2010

I would like to add a driver to /dev which can light the LEDS using the parallel port. Where I should start from. I am trying to learn device driver programming, which is quite difficult for me now.

View 8 Replies View Related

Programming :: Build Hardware Operated Through Parallel Ports?

Oct 15, 2010

Never done it before, don't know how but its due next week. I am a computer systems student and have been required to built a hardware that will be operated by a program in G++ through the parallel ports. The hardware, thats a piece of cake, the software, now that's were the real problem is. I don't even know were to start.

View 2 Replies View Related

OpenSUSE Install :: 11.4 - Cannot Configure Local Printer (No Parallel Ports)

Mar 13, 2011

After a fresh install of suse 11.4, Yast cannot configure my local printer (Epson Epl-5700) because there is no parallel port available. How can I make parallel ports work?

View 5 Replies View Related

Programming :: Perl - Multiple Child Processes In Parallel?

Sep 3, 2010

I'm looking for a way in Perl to be able to take a list of servers, ssh multiple commands to it and store the results. If I do this process serially, sometimes one server will hang the whole script and if it doesn't, it still takes hours to complete.

I'm thinking what I need to do is make a parent loop that calls out a separate process that passes the server name to the child sub process and then executes all the commands I have defined in its own process. If one server 'hangs', at least that won't stop the script from doing all the other servers in the list.

I'm guessing using the fork() command would serve me best, however, all the online descriptions I have found have been vague at best.

View 4 Replies View Related

Programming :: Opening Ports With Perl?

May 12, 2011

im working on a perl script to automate the setup on a few machines. Does any one know how to open ports using perl?

ps: The systems are redhat so id be editing the iptables file..

View 6 Replies View Related

Ubuntu :: Compile Parallel C Program With MPI Codes?

Jun 20, 2011

I have a simple testing program like this:

/*The Parallel Hello World Program*/
#include <stdio.h>
#include <mpi.h>

[code]...

My program is, I can't compile this program using gcc, and I can't find something like pgcc in ubuntu. How should I compile this program? After compiling, what should I do to run this program? Can I use something like mpirun to run it? I want to try to use both cores of my computer to run it and make it shows Node 1 also besides Node0.

View 3 Replies View Related

OpenSUSE Hardware :: Permissions For Accessing Serial Ports?

Feb 3, 2010

I am unable to access a serial port as normal user in OS 11.2. The ownership for the port,/dev/ttyS0 belongs to root:dialout. Group dialout has RW permissions.So,I guess the user has to belong to 'dialout' group.Even after a user is included in dialout port,still the user is unable to access,"Permission is Denied".

Before OS 11.2,I used to make the users members of group "uucp" to get serial port access.I tried that also in OS 11.2,without luck.So,I have to be root to access it. This requirement itself seems to be one of the fossils of old time Linux where for normal usage of PC resources,one needed elevated privileges.I guess the trend now is to let the user do all PC work,but in a safe way.

View 1 Replies View Related

Programming :: C Program - To Make Scripts That Can Talk To Server's Parallel Port

Jun 27, 2010

I need to make some C program under linux to make some scripts that can talk to my Server's Parallel port by sending some quare signal as high or low, so what i can do ?

View 4 Replies View Related

Ubuntu :: Restrict A Certain Program From Accessing Certain Files

Jul 28, 2010

Everytime I start Rhythmbox it starts to scan my USB HardDrive (which contains 50,000+ files) for media. I searched around, and it seems that there is nothing one can do stop that using any Rhythmbox options, switches, etc. Is there a way to prevent a process (in this case Rhythmbox)from using a certain resource (the path to my USB Drive)? I'm thinking APPArmor or SELinux may be the way to do it.

View 2 Replies View Related

Networking :: Bad: Two Sockets Of Different Ports In A Single Program?

Mar 4, 2011

I am trying to make a file proxy server...that is any request of file a client makes goes to the proxy server...it checks it in cache if not there then asks main server for the file. to act as a server for client and as client for server...how to do it in a single program. I tried with 2sockets with different ports one for client-proxy server and one for proxyserver-main server.But it does not workAm i doing something wrong or is there any other method

View 2 Replies View Related

Ubuntu :: Accessing Local Filesystem Kills Program

Sep 16, 2010

I searched online, but I was unable to find anything on this. I recently tried to install a program, but it did not work. After that, anytime I would open a folder that is located on the local computer, it would close out of Nautilus. I thought that was the extent of the problem, but I just discovered that if I click "Open" on any program, it closes that program out. I was able to plug in a jumpdrive and browse the files on it, but as soon as I clicked on a folder that was local, it would kill the program. I am using 8.10, by the way.

View 1 Replies View Related

Ubuntu :: Access Postgres Through A PERL Program?

Jul 25, 2010

I am very much interested in Postgres db.
I have installed the DBI and DBD drivers.
Created the Tables.
Can any one help me ..how to access POSTGRES through a PERL program.

View 1 Replies View Related

Ubuntu Servers :: How To Refuse Accessing Parent Directory In FTP Client Program

Feb 18, 2010

I am runnung ubuntu 9.10 desktop edition as a server. I am using a FTP client program to upload some files(index.html, background.png, etc) and everything is fine with that. And currently all my files are in /home/myname/ folder. What I want is whenever I log in with my ubuntu account in the FTP client program, I can actually see the list or contents of the very root directory.

In other word, I can see every folder like /bin, /boot, /etc, /root, so on in the FTP software and I can download it. I don't want to allow to access the parent(or root) directory. Is there any possible way to set up the sutff?

View 2 Replies View Related

Debian :: Build A .deb File Which Will Contain Perl Program?

Aug 18, 2010

I'd like to build a .deb file which will contain my Perl program. I just want it to be deployed with dpkg -i on debian systems later. So it's just a matter of having the good arborescence in my .deb package. For that purpose, in the debian/rules file, I'm declaring some dh_install lines in the install rule.

My issue is that I know how to achieve my goal, but only with writing a ton of dh_install lines (one line, for one file...)

example :
clean:
dh_testdir
dh_clean
install: build

[Code].....

View 4 Replies View Related

Ubuntu Multimedia :: Perl Audio Converter - Program Doesn't Appear In Menu

Mar 16, 2010

I installed Perl Audio Converter, The system recognizes the install, When I type perl in the terminal it says "Perl is already the newest version" And the perl files appear in my "bin" directory, However the program does not appear in the menu, Is this a common problem?, How do I fix it?

View 1 Replies View Related

Server :: Perl Program To Filter Emails For Specific Rules

Feb 4, 2010

Please what will it take me to write a perl full functioning program to filter emails for specific rules? Will that be possible? The actual thing am trying to get is to write a perl program and attach to a mail server so that, when the mails come in, the perl script get call and then the perl program will let another external program that is not on the server run and check or filter the mails.

View 8 Replies View Related

Software :: Perl Program Can't Convert A Csv File (with Japanese Characters) / What To Do?

Jan 20, 2011

I use the below perl program csv2xls.pl can convert a csv to xls file , it works fine , but I found that it only work for all English characters , I tried to use it to convert a csv file ( with Japanese characters ) , it does work , I also tried the perl "unicode_utf16_japan.pl" , it also did not work , can advise what can i do ?

View 13 Replies View Related

Programming :: Talented Coder To Program Bash / Perl App That Plays SWF On HTML Page?

Feb 10, 2011

Everyone knows that it is like impossible to use mplayer to watch an *.html file. OK.

For instance here is a cool example of lot of streaming for firefox
http://watchtvlivestreaming.com/tvlive/b5499

Code...

Anyone is there a talented bright coder, coming from hell -because it is really difficult, to make such console program ?

View 1 Replies View Related

Hardware :: Multiserial Ports Identification / How Many Ports Are There

Dec 17, 2010

I'm writting an app for desktop and embedded linux and I need to get information about the multiserial port, and I need to know which port is been used (by a printer, por example).The multiserial I'm using is an Altera Corporation Device 0004, and I just need to tell how many ports are there and how many is been used.

View 3 Replies View Related

Ubuntu :: Switch Back To /usr/bin/perl After Installing Second Perl?

Aug 14, 2010

I recently reinstalled the B module for perl. Now I found out it didn't just do that, it installed a whole new copy of perl into /usr/local/bin/perl. When I type 'which perl' at the terminal, it says '/usr/local/bin/perl' instead of '/usr/bin/perl'. Normally, this wouldn't bother me. But I installed the one in local/bin without threading support. The one that comes with the system already is build with threading support, which is why I want to switch back to the system perl, and possibly remove the one in /usr/local/bin.

So how do I change it so that the result of 'which perl' returns as '/usr/bin/perl'? And what do I have to do to remove /usr/local/bin/perl?

The reason I need threading support is because I'm designing a file copier that copies several chunks of a file simultaneously to speed up the copying process. Guaranteed a useful script if it works.

View 7 Replies View Related

CentOS 5 Server :: Move 5.5 To /usr/bin/perl So Root Based On Perl 5.12.1?

Aug 11, 2010

I am new here and want to lern CentOS. Current I have installed CentOS 5.5 x64 and Perl 5.8.8. Now i have install Perl 5.12.1 which located to /usr/local/bin/perl. But how I can move it to /usr/bin/perl so root based on Perl 5.12.1?

View 7 Replies View Related

Debian :: Launch The Perl Config \ Seems To Be That It Does Not Regonize Perl?

Jul 7, 2010

I am trying to launch the perl config, but when I do so I can an weird error.It seems to be that it does not regonize perl ?

conf.pl: line 11: =: command not found
conf.pl: line 19: my: command not found
conf.pl: line 20: syntax error near unexpected token `{'

[code]...

View 2 Replies View Related

Fedora Hardware :: Tell If USB Ports Are 2.0 Ports?

Aug 11, 2010

How can I tell if my USB ports are 2.0 ports?

View 1 Replies View Related

OpenSUSE :: Difference Between Perl And Perl-devel?

Jun 28, 2010

I'm new in perl programming and linux OS. What is the difference between perl and perl-devel? What does mean devel? Iwant to install Catalyst and before install as required I have to check if make, gcc and perl-devel are installed in my system. make and gcc are installed. But I have to install perl-devel. First I searched for make, gcc and perl-devel in YAST Software Management and search did not find perl-devel. I visited the software.opensuse.org and wrote "perl-devel" and searched. The result was many similar zips with a prefix perl-devel and I can not choose one for needed perl-devel.

[Code]...

View 5 Replies View Related

Fedora Networking :: /usr/bin/perl: Symbol Lookup Error: /usr/bin/perl: Undefined Symbol: PL_use_safe_putenv

Apr 8, 2009

I am trying to setup the wlan access for my Fedora 9 system. I installed ndiswrapper. But when I run

Code:

ndiswrapper -l

i am getting the error

Code:

/usr/bin/perl: symbol lookup error: /usr/bin/perl: undefined symbol: PL_use_safe_putenv

View 11 Replies View Related

CentOS 5 Server :: Unable To Give "Perl Path" To Run Perl CGI Script

Jun 2, 2011

I am unable to run perl-cgi script in my cent os Apache server. I have used locate perl command in terminal window and it gives following result:

[code]....

tell which is the path to perl for example "usr/bin perl"

View 13 Replies View Related

General :: Use "#!/usr/bin/perl" In The Beginning Of A Perl Script

Dec 17, 2010

I have a small problem with Perl and Apache.

If I use "#!/usr/bin/perl" in the beginning of a perl script the script won't work if the script is at all complicated. Simple scripts like "Hello World" works.

But if I use "#!/usr/bin/perl -w" in the beginning all scripts work?

If I don't use the -w this is whats in the logs:

(2)No such file or directory: exec of '/home/test.net/html/cgi-bin/uh/meny.pl' failed

Premature end of script headers: meny.pl

When I use the -w in the script the error-log shows me this.

meny.pl: Name "main::http_path_cgi" used only once: possible typo at /home/test.net/html/cgi-bin/uh/meny.pl line 24.

View 1 Replies View Related

Ubuntu Networking :: Using 2 PCs To Run Parallel (passwordless Ssh Without IP)

Feb 18, 2011

I want use two computer to run OpenFOAM or Fluent software.These two computers are connected via a cross cable. I have access to another by "ssh maysam@192.168.1.1" OR "ssh 192.168.1.1" The problem is i should have access to another PC by "ssh maysam-desktop" command which can run parallel. maysam-desktop is name of anothe PC and maysam is name of its user.

View 1 Replies View Related

Ubuntu :: Setting Up USB-parallel Cable

Mar 2, 2011

I'd like to connect a parallel port printer to my new desktop and have got a Connectland C36 cable that shows up as: Bus 003 Device 002: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port.I've tried the URI /dev/usb/lp0 but I don't mange to set the printer working. May I need any driver?

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved