hmmm, interesting... Thanks.
When I try a command that would normally give:
78 34
in cutecom I am getting:
x4 which seems ok.
But - If I want to read a position from the device in cutecom I get a response like:
78 01 04 50
But whilst doing: cat /dev/ttyS0
I only get
x (thats an x...
Hi All -
I am having some troubles reading from a serial device in perl. I can send commands with the following code:
my $e1 = '\x'."$_[0]";
my $e2 = '\\'."$_[1]";
my $e3 = '\\'."$_[2]";
my $e4 = '\\'."$_[3]";
my $e5 = '\\'."$_[4]";
my $e6 = '\\'."$_[5]";
#### Send Command Bytes
system...
Hi - thanks for the reply. I tried what you said above and it got rid of half the error. However I am now still getting:
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../crt1.o: In function `_start':
init.c:(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
I dont...
Hi All -
Have been trying to get this code running. It is the first example in on this page: http://www.easysw.com/~mike/serial/serial.html
#include <stdio.h> /* Standard input/output definitions */
#include <string.h> /* String function definitions */
#include <unistd.h> /* UNIX...
thanks for the reply. I changed what you suggested and also noticed I was missing an = sign in one of the lines. So now the word count program compiles, but it does nothing?? No word count, it just takes input and thats it??
#include <stdio.h>
#define IN 1
#define OUT 2
main ( )
{
int c...
Hi all,
I am really new to c, and I am stepping through a C manual, the "Prentice Hall, C Programming Language" book and I am having frustrating problems with alot of the early examples.
Like this simple word count program will not compile:
#include <stdio.h>
#define IN 1
#define OUT 2...
Thanks fishiface for taking the time to walk through the code.
The first bit of code which you reduced from 12 lines to 4 was really interesting and has given me insight into some of the shortcuts possible. I have now applied the foreach and push functions on lots of parts of the rest of the...
Hi Fishiface, thanks for the reply.
basically I am trying to write a small gtk-perl program stylized to my needs which aims to make accessing lots of different wireless networks easy.
The idea behind the question basically comes from the need to find all wireless devices available, then have...
Hi All,
I am relatively new to programming and am having some trouble with the following issue. Logically it seems all that would need to be done would make a variable variable and my problem would be solved. Here is the relevant part of my code;
@devices = ($device, @devices); }...
Hi All,
Having a bit of a problem with the login section of a site I am working on. As in the title I have the following two scripts.
(htdocs)/test/new/login_man.php
(htdocs)/test/new/myaccount.php
myaccount.php, uses a logincheck that basically says, if user logged in then continue... and...
Hi Thanks again for your message. I solved the problem just as I received your last message.
Thanks anyway was having real problems searching for a solution to 'running external programs in perl' in google, just kept giving me perl command line option tutes etc...
Ended up having a close look...
Hi - thanks for the reply.
The normal interaction from a bash shell would look like this:
#nokia_ctl gsm sendSMS
Please type the message (max 160 chars)
Hello this is the message - bye.
Please type the receiver number
+61411666888
Please type the SMS center number
+6421600601
D211: Command...
Hello all,
I have been looking for the last hour or two on information on how to pass commands onto a normal program that would normally take input from a bash command line.
How can I run the program from perl and enter the predefined info into the input fields automatically.
I have tried...
Hello,
Have set up a few simple scripts lately on some new servers and PHP does not appear to be working the same way. I cannot seem to do this anymore:
IN a form
<td><a href=<?php echo $PHP_SELF ?>?id=<?php echo $myrow["id"] ?>&link=yes>Edit</a> </td>
I can no use this URL variable with a...
Thanks for your replies rharsh and mikevh very helpful thanks.
I didnt have the Term::ReadKey module so I had to figure out how to install it, done now and the first script from you, mikevh, does exactly as I wanted...
Thanks very much
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.