View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 3 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon Sep 08, 2008 2:22 pm 
Offline
Joined: Sun Sep 02, 2007 2:30 pm
Posts: 94
Jigawho and myself have been creating a small web page on a DD-WRT enabled router to wakeup a MythBox ( http://knoppmyth.net/phpBB2/viewtopic.p ... 73&start=8 ) so that it can be accessed remotely for using MythWeb (or SSH etc.). Hopefully in time it can be adapted to power off the MythBox as well when you've finished using it.

To enable it, paste the following code in the command window (administration -> commands) on a DD-WRT mini distribution:
Code:
mkdir /tmp/www/cgi-bin
cd /tmp/www/cgi-bin
echo "# !/bin/sh" > mythbox.cgi
echo "/usr/sbin/wol -p 7 -h 192.168.1.255 00:11:22:AA:BB:CC" >> mythbox.cgi
echo "echo \"<html><body><p>MythBox has been woken up, please wait for it to boot up!</p><p>Then click here to navigate to it: <a href=http://mythweb.address.here/>MythBox Home Page</a></p></body></html>\"" >> mythbox.cgi
chmod +x mythbox.cgi

and click save startup. N.B.: second echo is one line until the third echo command and the last echo is all one line until the chmod command.

Navigate to http://router.ip.address.here/user/cgi-bin/mythbox.cgi and the page should load fine waking up your MythBox.

As this is html it can be easily expanded BUT the page must be small (only a few hundred KB MAX) to fit onto the router's memory (4MB min). So I'd invite anyone with html experience to please make it better!

_________________
Running Knoppmyth R5.5 on a Compaq EVO D510 (sff) w/ P4 1.8GHz, 1GB RAM, 330GB 7200rpm Maxtor IDE HDD, XFX Nvidia GeForce 6200 (AGP low profile, p/n: PV-T44A-WANG) and Huappauge NOVA-T 500 DVB-T dual tuner PCI card.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2008 6:41 pm 
Offline
Joined: Thu Feb 09, 2006 7:18 pm
Posts: 112
I'd just like to say that mythman13 has done all the work, I've just been asking questions...

_________________
MBE:AMD Athlon 64 3000+ (venice),MSI K8MM-v Motherboard (via chip based), PVR-500, Chaintech av710, IDE Hard drive
SBE:P4 3Ghz, Asus P4G800, PVR-250, IDE Hard Drive


Top
 Profile  
 
 Post subject: update
PostPosted: Tue Sep 09, 2008 4:33 am 
Offline
Joined: Sun Sep 02, 2007 2:30 pm
Posts: 94
jigawho wrote:
I'd just like to say that mythman13 has done all the work, I've just been asking questions...

In fairness, if you hadn't asked those questions I would never have created such a page!

I've updated this to make the startup script smaller and more manageable:
  1. SSH into your device and create the following file under /jffs: mythbox.cgi:
    Code:
    # !/bin/sh
    /usr/sbin/wol -p 7 -h 192.168.1.255 00:11:22:AA:BB:CC
    echo "<html><body><p>MythBox has been woken up, please wait for it to boot up!</p><p>Then click here to navigate to it: <a href=http://mythweb.address.here/>MythBox Home Page</a></p></body></html>"
    You can use vi: enter: /bin/vi /jffs/mythbox.cgi, press i to edit, then ESC to exit and tpe ZZ to save and exit (case sensitive).
  2. Chmod this script to make it executable:
    Code:
    chmod +x /jffs/mythbox.cgi
  3. Remove any of the previous entries in the startup script box under the web administration page and enter the following instead:
    Code:
    mkdir /tmp/www/cgi-bin
    cp /jffs/mythbox.cg /tmp/www/cgi-bin/mythbox.cgi
    This should reduce the amount of processing the device has to do when it first switches on!

_________________
Running Knoppmyth R5.5 on a Compaq EVO D510 (sff) w/ P4 1.8GHz, 1GB RAM, 330GB 7200rpm Maxtor IDE HDD, XFX Nvidia GeForce 6200 (AGP low profile, p/n: PV-T44A-WANG) and Huappauge NOVA-T 500 DVB-T dual tuner PCI card.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu