08-18-2011 01:25 PM - edited 08-18-2011 01:30 PM
So after playing around a bit with the linux part of this drive, I found the following
/home/wlan/wlarm is your wireless tools command. (http://www.dd-wrt.com/wiki/index.php/Wl_command)
/home/wlan/wlarm join <network> <password>
you can search for other networks
I managed to connect it to my home network by messily doing the following. (I hope to clean this up a bit later)
ifconfig eth0 192.168.128.123 <use your own IP from your network at home>
/home/wlan/wlarm join <my wireless network>
at this point I have the device on my wireless network. You need to change a few more things to get the webserver running again. Edit the web conf file located at
*EDIT* You need to replace all "192.168.0.1" with your new IP address
You can use ps or just kill the webserver and startup the entire thing using the script at /etc/rc5.d/server_startup.
Of course this will ruin the mobility aspect till you change everything back. create copies!!! I can access my movies using SAMBA or the webpage on my normal wireless network (fun) I'll start digging into the python files to maybe make this web friendly as soon as I figure it all out. Any additional help or tips are welcome!
08-18-2011 10:54 PM
Excellent. It should be trivial to script up so it always boots standalone, but I can log in and fire off a script to put it on the home wlan.
That's just a great idea. A web-based solution would be great too.
08-19-2011 12:33 AM
hit a couple bumps in the road, but fortunately it does reboot into AP mode.
## Joining my Home WLAN ## Shut down DHCP server ## Play well with others killall udhcpd ## Assign a static IP on my home network ifconfig eth0 192.168.100.30 netmask 255.255.255.0 ## Disable AP mode /home/wlan/wlarm ap 0 ## Join Home ssid /home/wlan/wlarm join <SSID> key <Key in HEX> ## bounce minidlna so it advertises the new IP killall minidlna /etc/rc5.d/start_minidlna ## will need to do the same with lighttpd # killall lighttpd # launch lighttpd with home lan config file
That more or less works. I just need to take some time patching up the lighttpd config file.
The minidlna config file makes reference to the fake hostname of the satellite, but it doesn't seem to break playback in my limited testing so far.
08-19-2011 07:06 AM
/usr/bin/python /satellite_app/www/satellite/./manage.py runfcgi protocol=fcgi host=<your new ip> port=34249 minspare=1 maxspare=2 maxchildren=2
A few things to add to your script, of course change the stuff between <> to suit your needs. I'll start looking at the python/web today, it would be nice to add a widget button via http that can switch the configs at least.
On a side note to this, I have been able to connect 5 pc's and watch 5 SD (IPAD optimized) movies. The device is connected wireless, the PC's are all wired. So other than installing SAMBA and SSH.. I wonder what else we can do? A few things I was going to play around with here
Connect it to my NAS via NFS
Try to get the Ipad app working. I think all what i need to do is put a custom DNS entry into my router for the goflex url.
08-19-2011 07:34 AM - edited 08-19-2011 08:26 AM
It seems that you can also use an alias for the interface to have a bit of a fallback for testing.
ifconfig eth0:1 <ip new or old 192.168.0.x>
nameserver <your dns, or use 22.214.171.124>
route add default gw <your gateway ip>
There is a package service installed on this thing by default. If you are brave you could install or even update the packages on it using the
opkg command. (not much in the repository though..http://feeds.arago-project.org/feeds/live/ipk/armv
You can also use nevdull's NSLU2 suggestions for installing additional packages like SAMBA2 and dropbearSSH. What he suggests is to use ipkg, which our device doesn't have by default. the Segate device uses opkg, which is just another way of installing packages from repositories.
vi /etc/opkg/nslu2-optware-feed.conf <this will create a new file>
<add this to file and save> src/gz cs08q1armel http://ipkg.nslu2-linux.org/feeds/optware/cs08q1ar
New packages to install! all the fun ones Thanks for the repo devnull
Here is a place I found to install ipkg.. but I really don't think it is needed. http://tomatousb.org/tut:how-to-set-up-nas-optware
it is also a good idea to still link /opt to a directory you create on /dev/sda1. you have very limited space on root...
ln -s /media/sda1/opt /opt
*EDITED for Clarity*
08-19-2011 06:08 PM - edited 08-19-2011 06:09 PM
Ok after a day of testing here is my updated script (Thanks for starting it Lusid1).. maybe somebody can improve? I have a seperate post on how to add wpa/wpa2 support. I have personalized copies of resolv.conf and hosts entry for my network, noted below. I have not looked into adding the webpage widget yet...
## Joining my Home WLAN
/sbin/iwconfig eth0 essid "homenet"
/opt/sbin/wpa_supplicant -B Dwext -ieth0 -c/opt/etc/wpa-supplicant.conf
## Disable AP mode
/home/wlan/wlarm ap 0
## Shut down DHCP and dnsmasq servers
## Assign a static IP on my home network
ifconfig eth0:1 172.16.35.36 netmask 255.255.255.0
route add default gw 172.16.35.254
/bin/cp /home/root/resolv.conf /etc
/bin/cp /home/root/hosts /etc
/## bounce minidlna so it advertises the new IP
## will need to do the same with lighttpd
# (one big line below.. posting it cut it up)
## Kill and Restart Python
/usr/bin/python /satellite_app/www/satellite/./manage.py runfcgi protocol=fcgi host=172.16.35.36 port=34249 minspare=1 maxspare=2 maxchildren=2
08-19-2011 09:58 PM
Thanks for that. What I'm thinking of doing is scanning the available networks at startup, if my home network is available connect to that as highest priority, if not connect to my iphone hotspot, and failing that start up in normal AP mode.