Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#147152 - 05/03/2003 23:24 How to start PC-application with empeg over LAN?
fossi
journeyman

Registered: 12/01/2003
Posts: 64
Loc: Germany
Is there anybody out there to help me with this idea:

From the empeg menue I would like to have something like a menue entry which sends a command over LAN and starts an application on my home PC.

Background:
My empeg is connected over WLAN to the home network. But the empeg is only accessable when not powered down.
On my home PC I have a script to convert routes for gpsapp and tranfer them automatically via ftp to the empeg.
When starting in the morning I calculate the routes but then have to go to the garage, start the empeg, go back to the PC and start the script to transmit the routes.
This is the process I would like to shorten by sending a command from the empeg which starts the script on the home PC automatically.

Any idea on that? Are there any standard applications for that purpose?

Juergen

Top
#147153 - 05/03/2003 23:41 Re: How to start PC-application with empeg over LA [Re: fossi]
matthew_k
pooh-bah

Registered: 12/02/2002
Posts: 2298
Loc: Berkeley, California
How about having your script look for your empeg every 30 secconds untill it finds it, and then upload the routes and exit?

Matthew

Top
#147154 - 06/03/2003 00:16 Re: How to start PC-application with empeg over LA [Re: matthew_k]
fossi
journeyman

Registered: 12/01/2003
Posts: 64
Loc: Germany
Also a possibility!
Do you have any idea how to do it within a batch-file? somehow with ping-commands?


Top
#147155 - 06/03/2003 00:50 Re: How to start PC-application with empeg over LA [Re: fossi]
mtempsch
pooh-bah

Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
Do you have any idea how to do it within a batch-file? somehow with ping-commands?


Should be easy enough if you have the empeg on a fixed IP.
I'm not very good at .bat files (assuming you use Windows) - instead I'd use Perl, capture the output of a packet count limited ping command (see below) and grep it for stuff indicating that the machine is available (like "64 bytes") and if present go ahead and ftp the routes. If you want to run this on your computer in the morning before going out to the car you could have it loop the ping+check along with a sleep, until it finds the empeg, then ftp and when done, exit.

Machine available:

tempsch:~$ ping -c 3 192.168.1.31
PING 192.168.1.31 (192.168.1.31): 56 data bytes
64 bytes from 192.168.1.31: icmp_seq=0 ttl=128 time=0.2 ms
64 bytes from 192.168.1.31: icmp_seq=1 ttl=128 time=0.2 ms
64 bytes from 192.168.1.31: icmp_seq=2 ttl=128 time=0.2 ms

--- 192.168.1.31 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.2/0.2/0.2 ms


Machine unavailable:

tempsch:~$ ping -c 3 192.168.1.15
PING 192.168.1.15 (192.168.1.15): 56 data bytes

--- 192.168.1.15 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss


/Michael
_________________________
/Michael

Top
#147156 - 06/03/2003 01:41 Re: How to start PC-application with empeg over LA [Re: mtempsch]
fossi
journeyman

Registered: 12/01/2003
Posts: 64
Loc: Germany
Many thanks for your help!

I also found this one:
http://www.ericphelps.com/batch/samples/waitfor.txt

Works perfectly ... another great feature with the empeg!

Juergen


Top
#147157 - 06/03/2003 08:08 Re: How to start PC-application with empeg over LA [Re: mtempsch]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
use Perl, capture the output of a packet count limited ping command
Why wouldn't you just use Net::Ping instead of wasting time executing an external command with the possibility of misinterpreting its output?
_________________________
Bitt Faulk

Top
#147158 - 06/03/2003 12:50 Re: How to start PC-application with empeg over LA [Re: wfaulk]
mtempsch
pooh-bah

Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
'cause I didn't think of that module?

/Michael
_________________________
/Michael

Top