Author |
Message |
Rroet
Kai Beginner
Joined: 23 Nov 2004
Posts: 12
Location: Netherlands
|
Posted:
Wed Dec 15, 2004 6:57 pm |
|
Hi,
I've read through some threads and I never saw somebody opting some easy nvram settings..
What's needed:
- a home webserver.
- a WRT54G / GS router
- a modded firmware (openWRT or Sveasoft (anyversion))
- brains
- perhaps some form of authentication on your webserver, if that webserver is also your public home webserver.
step one:
- Follow one of the zillion howto's on this site for downloading kaid and kaid.conf and put them in your webserver directory.
- There are also enough threads about configuring kaid.conf.. try one of those as well.
- Figure out how to secure that webserver directory yourself. When using appache I'll give you this hint: htaccess
Step two:
- telnet or ssh to your router (Figure out how to do this on your own)
And now for the grande finale, we're going to use nvram and it's setting: rc_startup
this should give you back an empty line, (command and output):
Code: |
/tmp # nvram show | grep rc_startup
rc_startup=
/tmp #
|
now we're going to rig this to automagically download and start kaid :
Code: |
~ # cd /tmp
/tmp # nvram set rc_startup="wget http://<loginname>:<password>@<webserver ip>/xbox/kaid -O /tmp/kaid;wget http://<loginname>:<password>@<webserver ip>/xbox/kaid.conf -O /tmp/kaid.conf;chmod +x /tmp/kaid;/tmp/kaid -d -c /tmp/kaid.conf"
/tmp # nvram commit
|
Remember to use the " (quotes)!!! If not, it will not work!
Now we're at the stage where we need the "Brains" to be applied:
Please fill in the <loginname> <password> and <server ip> yourselfs.
and when you're NOT going to use a <loginname> and <password> you can remove that section INCLUDING the : and @
now REBOOT the device and be happy
And do disappoint you right away: NO THIS SETTING WILL NOT SURVIVE A FACTORY DEFAULTS RESET.
howto UNDO what you've done to your router:
- login again
now execute: nvram set rc_startup=
then execute: nvram commit
REBOOT, and be done with it. |
|
|
|
|
Rroet
Kai Beginner
Joined: 23 Nov 2004
Posts: 12
Location: Netherlands
|
Posted:
Wed Dec 15, 2004 8:31 pm |
|
Talking to my gamer buddy (ingame) "Mart" I remembered that I almost forgot to tell you guys this trick also works with ftp
wget is a nice tool able to fetch both http and ftp .. |
|
|
|
|
jloor
Kai Beginner
Joined: 09 Jun 2004
Posts: 6
Location: USA - New Jersey
|
Posted:
Thu Dec 16, 2004 7:25 am |
|
nice tip. Now If I can only figure out why my kaid.conf file is always blank when i check it in VI after the router reboots?!?
Anyone have ideas on how so? I use the same line after the rc_startup and it seems to pull it just fine, the same line. Wierd. |
|
|
|
|
Rroet
Kai Beginner
Joined: 23 Nov 2004
Posts: 12
Location: Netherlands
|
Posted:
Thu Dec 16, 2004 9:09 am |
|
I don't have the problem.
Try downloading kaid.conf from your webserver manually and see if that's empty.
Rroet |
|
|
|
|
cyberplayer
Kai Beginner
Joined: 09 Dec 2004
Posts: 20
Location: USA - Hawaii
|
Posted:
Thu Dec 16, 2004 3:39 pm |
|
yo da man I finally got it to look for my startup in my xbmc your code rocks let me tell you ive been trying in weeks firstime it work before it cant boot to that xbmc location i edit everything on kaid.conf but it will not load so I try yours it work right off now if i get power failure just let the router boot to xbmc/web thanks a lot man I save this code for future referrence anyway I got a new Router WRT54GS so the sniff i set it to vlan0 it work right off so i don't have to do anything just play thanks again |
|
|
|
|
Hydra
Kai Beginner
Joined: 09 Jun 2004
Posts: 3
Location: United Kingdom
|
Posted:
Sat Jan 01, 2005 8:15 pm |
|
using bits of the info you wrote here i went a few steps further and wrote a startup script for my wrt54g and stuck it on my webserver, now everytime my router reboots it downloads my startup script which runs my iptables commands, downloads KAId from my web server (to ease load on their one) and starts it up. runs totally sweet.
It really is nice using xbmc and kai on the router, takes all the effort out of messing around with kai on my pc (which crashes each time my xbox resets btw).
i was amazed to find that after sticking halo2 on my xbox's hd, i joined an arena, and clicked play in xbmc and it actually fired up halo 2 from my hd! i wasn't expecting that at all!
i'm just curious how it figured out where the game was on my hd and if this works for other games that xbmc supports.
so glad i bought a wrt54g now. next time one of my clients needs a router i'll swap out my 2.0 box for a nice new GS revision |
|
|
|
|
protocol
Kai Beginner
Joined: 08 Jan 2005
Posts: 2
Location: Canada
|
Posted:
Thu Jan 27, 2005 8:52 pm |
|
Hi All,
Great thread! I was having the same problem some others are having about finding a free webserver to place my kaid and kaid.conf on so that I could wget them in rc_startup, but then I thought, what about the xbox itself...
1. Copy kaid and kaid.conf to xbox e drive
2. use the following and set your rc_startup to:
wget ftp://xbox:<pass>@<xboxip>/e/kaid -O /tmp/kaid;
wget ftp://xbox:<pass>@<xboxip>/e/kaid.conf -O /tmp/kaid.conf;
chmod +X /tmp/kaid;
cd /tmp;
./kaid -d -c /tmp/kaid.conf;
(all in one line...from memory, you get the idea...)
Now what you do is fire up a dashboard that uses passive ftp (xbmc for me, evox=no passive ftp), and reboot the router. When the router reboots it will grab kaid and config from your xbox and launch it. Once kaid is downloaded and launched, you can fire up whatever game.
Hope this is useful, might have been mentioned somewhere else. The only thing I want to do now is modify the rc_startup to check for the existance kaid in the /tmp/ directory every 30 secs, and automatically download if needed. This will make it even easier than rebooting the router each time you need to grab kaid. Any script experts out there know how to do this?
protocol |
|
|
|
|
zues
Kai Beginner
Joined: 27 Nov 2004
Posts: 50
Location: USA - Oregon
|
Posted:
Sun Feb 13, 2005 11:31 pm |
|
This is what I get when I try to load nvram
Quote: |
login: root
Password:
------------------------------------------
Welcome to the Sveasoft WRT54G/GS Firmware
Alchemy-6.0-RC6a beta build
version v3.01.3.8sv
USE OF THIS FIRMWARE IS AT YOUR OWN RISK
http://www.sveasoft.com
------------------------------------------
BusyBox v1.00 (2004.12.04-16:43+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
~ # rc_startup
-sh: rc_startup: not found
~ # /tmp # nvram show | grep rc_startup
-sh: /tmp: Permission denied
|
I dont know why i get permission denied. Im logging in as root and putting in the password,
I am using putty to Telnet into it |
|
|
|
|
Txallenger
Kai Beginner
Joined: 14 Jan 2005
Posts: 1
Location: Spain
|
Posted:
Mon Feb 14, 2005 11:10 am |
|
zues @ Sun Feb 13, 2005 11:31 pm wrote: |
This is what I get when I try to load nvram
Quote: |
login: root
Password:
------------------------------------------
Welcome to the Sveasoft WRT54G/GS Firmware
Alchemy-6.0-RC6a beta build
version v3.01.3.8sv
USE OF THIS FIRMWARE IS AT YOUR OWN RISK
http://www.sveasoft.com
------------------------------------------
BusyBox v1.00 (2004.12.04-16:43+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
~ # rc_startup
-sh: rc_startup: not found
~ # /tmp # nvram show | grep rc_startup
-sh: /tmp: Permission denied
|
I dont know why i get permission denied. Im logging in as root and putting in the password,
I am using putty to Telnet into it |
wrong done....
First: rc_startup is a variable, not a command, so don't try to execute it.
Second: /tmp # refers to your prompt... you must not rewrite it ... it should be something like:
(I'll put between <> what I'm thinking)
Quote: |
login: root
Password:
------------------------------------------
Welcome to the Sveasoft WRT54G/GS Firmware
Alchemy-6.0-RC6a beta build
version v3.01.3.8sv
USE OF THIS FIRMWARE IS AT YOUR OWN RISK
http://www.sveasoft.com
------------------------------------------
BusyBox v1.00 (2004.12.04-16:43+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
<first let's see the rc_startup variable with "nvram show | grep rc_startup">
~ # nvram show | grep rc_startup
<Then console must return my answer...>
rc_startup=
<ok, variable is empty>
<second... let's go to the temp dir: "cd /tmp">
~ # cd /tmp
/tmp #
<ok, the prompt is ok>
<now let's modify the rc_startup variable... "nvram set rc_startup="...... "" ("..." included)>
/tmp # nvram set rc_startup="wget http://<loginname>:<password>@<webserver ip>/xbox/kaid -O /tmp/kaid;wget http://<loginname>:<password>@<webserver ip>/xbox/kaid.conf -O /tmp/kaid.conf;chmod +x /tmp/kaid;/tmp/kaid -d -c /tmp/kaid.conf"
< I suppose you evidently know that <loginname>, <password>, <webserver ip> and server path must be changed by your own configuration in your commands, and response will be accord your configuration again...>
/tmp #
<Ook... no error... let's see if the variable is correctly modified... once again "nvram show | grep rc_startup">
~ # nvram show | grep rc_startup
rc_startup=wget http://<loginname>:<password>@<webserver ip>/xbox/kaid -O /tmp/kaid;wget http://<loginname>:<password>@<webserver ip>/xbox/kaid.conf -O /tmp/kaid.conf;chmod +x /tmp/kaid;/tmp/kaid -d -c /tmp/kaid.conf
<All ok rc_startup variable is correctly modified. Now I must save nvram, so it will work on next reboot, with command "nvram commit">
/tmp # nvram commit
/tmp #
<ok. Now let's rebbot the thing>
/tmp # reboot
<Oh! I missed my connection with the router... xD is rebooting!!>
|
After rebooting, I recommend enter again to the router, and test if kaid engine is running, etc... |
|
|
|
|
|