I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods
Amazon Honor System Click Here to Pay Learn More
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / Other I-Appliances / 3Com Audrey
controlling audrey remotely

New Messagecontrolling audrey remotely (modified 0 times) sTeeve
Profile
hi folks,
i've figured out how to start BigClock on my audrey from a remote location:
run "http://audreygraphite.steeve.home/BigClock.shtml?1" from any browser. it works. fires up BigClock. Now, how do i turn it off? i've tried "http://audreygraphite.steeve.home/BigClock.shtml?0"...no go. any ideas, anybody?
Oh, i should say this: i had to create an executable .shtml file called "BigClock.shtml". It's content is:

<html><head><title>Shell</title></head><body>
<!--#exec cmd="/nto/bin/BigClock -a 0x40010004 -b6 -m3 -s$QUERY_STRING" -->
</body></html>

Basically, the above command is a direct copy of D. Davis' gpio command:

<html><head><title>Shell</title></head><body>
<!--#exec cmd="/kojak/gpio -a 0x40010004 -b6 -m3 -s$QUERY_STRING" -->
</body></html>

I just changed things so that the command would run BigClock.

04-29-2003 19:34:58

New MessageRE:controlling audrey remotely (modified 0 times) caderoux
Profile | Email
What you want to do is execute a script which finds the process ID of BigClock and then kills it. I don't think BigClock is actually paying any attention to the -s$QUERY_STRING command-ling switch - which your page is passing as -s1.

I don't have my Audreys set up here at the new house, and my QNX is rusty, otherwise I would help more.


Cade Roux
04-30-2003 06:06:10

New MessageRE:controlling audrey remotely (modified 0 times) ptanguay
Profile
Here's an idea... I haven't tried this myself just yet, but I'm pretty certain it would work.

Create 2 scripts - startbigclock and killbigclock

In startbigclock, do

#!/bin/ksh
/nto/bin/BigClock -a 0x40010004 -b6 -m3
echo "$!" >/tmp/bigclock.pid

and in killbigclock, do

pid=`cat /tmp/bigclock.pid`
kill $pid
rm /tmp/bigclock.pid

Note : It's critical to use ` <--- backticks on the pid=... line. That will substitute the content of the file into the pid variable.

So, in a nutshell, save the process id of bigblock, and then retrieve it and kill it. All you need is to make your web scripts invoke startbigclock and killbigclock and you're off to the races.

Let me know if that works out for you.

05-01-2003 13:15:05

New MessageRE:controlling audrey remotely (modified 0 times) caderoux
Profile | Email
Instead of saving off the pid, why not use slay:

slay -f BigClock

(see http://www.qnx.com/developer/docs/qnx_4.25_docs/qnx4/utils/s/slay.html)


Cade Roux
05-02-2003 09:04:09

New MessageRE:controlling audrey remotely (modified 0 times) caderoux
Profile | Email
Try reading up on the SSI at http://www.qnx.com/developer/docs/qnx_6.1_docs/neutrino/utilities/s/slinger.html#syntax

I think this should work in your page:

<html>
<head>
<title>Shell</title>
</head>
<body>

<!--#if "$QUERY_STRING" == "1" goto startclock -->
<!--#if "$QUERY_STRING" == "0" goto stopclock -->
<!--#goto ="done" -->

<!--#label ="startclock" -->
<!--#exec cmd="/nto/bin/BigClock" -->
Clock Started
<!--#goto ="done" -->

<!--#label ="stopclock" -->
<!--#exec cmd="slay -f BigClock" -->
Clock Stopped
<!--#goto ="done" -->

<!--#label ="nothingpassed" -->
Nothing was Passed

<!--#label ="done" -->
Done

</body>
</html>


Cade Roux
05-02-2003 09:14:13

New MessageRE:controlling audrey remotely (modified 0 times) ptanguay
Profile
"Instead of saving off the pid, why not use slay:"

Why, because that's way too simple. :)

Good call, I'd tried killall, didn't know about slay... I'm an Audrey and QNX newbie (but an old unix hack...)

05-02-2003 11:22:38

New MessageRE:controlling audrey remotely (modified 0 times) Seven
Profile
When calling from a browser with...
http://192.168.1.3/runprog.shtml?1


Why would this work...
<html><head><title>runprog</title></head>
<!--#exec cmd="/nto/photon/bin/keyboard" -->
</body></html>


But this NOT WORK...
<html><head><title>runprog</title></head>
<!--#exec cmd="/nto/bin/shutdown" -->
</body></html>

Anyone got any idea?

07-21-2004 22:35:03

New MessageRE:controlling audrey remotely (modified 0 times) skywise
Profile
I've got a simple question for this thread.
Where can I find BigClock?
The only other thread mentioning it has a bad link.

Thanks in advance.

Sky

08-29-2004 08:21:27

New MessageRE:controlling audrey remotely (modified 0 times) sTeeve
Profile
try this:
http://www.shed.com/tutor/audrey/files/BigClock.gz
09-04-2004 09:13:13

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3