[Berlin-wireless] DIR-300: Flash report
Sven-Ola Tuecke
sven-ola
Sa Nov 8 12:57:35 CET 2008
Hey,
hab' von Alina so ein Teil im Tausch bekommen. Wenn die D-Link FW nicht drauf
ist, kann der RAM-Redboot-Loader nicht geladen werden. Wenn schom mal ein
DD-WRT redboot drauf war existiert "Redboot Config" mit irgendwelchen
Einstellungen. In meinem Fall reagierte der RAM-Redboot nicht auf 192.168.1.1
sondern auf 192.168.20.81. Also:
root at pcnet:/usr/src/dir300-flash# telnet 192.168.20.81 9000
Trying 192.168.20.81...
Connected to 192.168.20.81.
Escape character is '^]'.
DD-WRT> ip_address -l 192.168.1.1/24
Egal - nachdem ich hab' jedenfalls den Ursprungszustand wiederhergestellt
hatte (D-Link-Redboot + D-Link-Firmware) - dann lief es durch (zwischendurch
das ip_address wie oben ausfuehren).
Details wollte ich hier hin stellen http://blog.freifunk.net/ aber das will
nich. Also Textdatei anbei.
// Sven-Ola
-------------- nächster Teil --------------
I recently exchanged a spare Atheros MiniPCI-Express wireless card for a new router. The box says, it's a D-Link DIR-300 currently available in the supermarket for approx. 30,-- Euros. After unboxing, I removed the label cying "!Stop, insert CD first" and attached an ethernet cable to the WAN port. According the the previous owner, I can telnet into redboot by using these commands. Start ALT-F2-"kdesu konsole" and type in:
killall NetworkManager;killall NetworkManagerDispatcher
killall dhcdbd;killall dhclient
ip addr add dev eth0 192.168.20.80/24
ip link set dev eth0 up
while true;do sleep 1;telnet 192.168.20.81 9000;done
switch on router, wait for "Escape is", press [ret]
Note, that this is a first test and there are other ways to stop DHCP from interfering a static IP address on the Ethernet port. The following steps are done on my netbook which runs under Kubuntu/Hardy. I also added the group "src" to my linux login using the Kubuntu user manager. Your Linux may vary...
After rebooting the netbook, I searched for the easy-flash tool announced by alina in order to flash ff-lucy on that thing. Docs on the DIR-300 and ff-luci can be found here:
http://wiki.openwrt.org/OpenWrtDocs/Hardware/D-Link/DIR-300
http://luci.freifunk-halle.net
Now start by issueing ALT-F2-konsole and grab/unpack alinas script:
cd /usr/src
wget http://x-alina.freifunk-potsdam.de/downloads/dir300-flash/dir300-flash-0.9.5.tar.gz
tar xvzf dir300-flash-0.9.5.tar.gz
cd dir300-flash
sudo mkdir /usr/share/dir300-flash
sudo chgrp src /usr/share/dir300-flash
sudo chmod g+w /usr/share/dir300-flash
sudo chgrp
./dir300-flash.sh
Which complains something about "no tftp found". So I do:
sudo apt-get install tftpd-hpa
sudo chgrp src /var/lib/tftpboot
sudo chmod g+w /var/lib/tftpboot
sudo kwrite /etc/default/tftpd-hpa
[change to RUN_DAEMON="yes"]
sudo /etc/init.d/tftpd-hpa start
./dir300-flash.sh
Which says something about "No kernel". So I do:
wget http://dev.luci.freifunk-halle.net/freifunk-snapshots/atheros/openwrt-atheros-root.squashfs
wget http://dev.luci.freifunk-halle.net/freifunk-snapshots/atheros/openwrt-atheros-vmlinux.lzma
./dir300-flash.sh
Which mutters blabla about the IP addr of eth0. So I
sudo kwrite /etc/network/interfaces
[add the following statement]
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
up ip addr add dev $IFACE 192.168.20.80/24
up ip addr add dev $IFACE 192.168.0.2/24
down ip addr del dev $IFACE 192.168.0.2/24
down ip addr del dev $IFACE 192.168.20.80/24
[now restart eth0]
sudo ifdown eth0
sudo ifup eth0
./dir300-flash.sh
Which starts flashing that thing (needs some minutes). After successful flashing, you may "telnet 192.168.1.1" as a first step while eventually http://192.168.1.1/ may also work for you.
----------
For my special device, there was no original firmware on it. I needed to restore the D-Link FW using the emergency web UI under http://192.168.20.81/ to be able to flash successfully. Heres what is displayed, if no D-Link FW on the device:
RedBoot> load ap61.ram.dir300-flash
Using default protocol (TFTP)
Entry point: 0x800410bc, address range: 0x80041000-0x800680d8
RedBoot> go
[fload] execution fail! [go] abort...
sven-ola at pcnet:/usr/src/dir300-flash$ md5sum /var/lib/tftpboot/ap61.ram.dir300-flash
4aaec2bff1edffe8c49003ed9363ad8b /var/lib/tftpboot/ap61.ram.dir300-flash
Helpful hints may be found here:
http://www.shadowandy.net/2007/10/flashing-dir-300-back-to-original-firmware.htm
To make sure, nothing is vanishing from the net, I've mirrored the necessary downloads here. They may be outdated if you read this, so be sure to check the original sites for newer downloads.
http://download.berlin.freifunk.net/sven-ola/dir-300
http://download-master.berlin.freifunk.net/sven-ola/dir-300
// Have fun - Sven-Ola
Mehr Informationen über die Mailingliste Berlin