[Berlin-wireless] DIR-300: Flash report

Sven-Ola Tuecke sven-ola
Sa Nov 8 12:57:35 CET 2008


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 
sondern auf Also:

root at pcnet:/usr/src/dir300-flash# telnet 9000
Connected to
Escape character is '^]'.
DD-WRT> ip_address -l 

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
ip link set dev eth0 up
while true;do sleep 1;telnet 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:


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 

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

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

Which mutters blabla about the IP addr of eth0. So I

sudo kwrite /etc/network/interfaces
  [add the following statement]
iface eth0 inet static
        up ip addr add dev $IFACE
        up ip addr add dev $IFACE
        down ip addr del dev $IFACE
        down ip addr del dev $IFACE
  [now restart eth0]
sudo ifdown eth0
sudo ifup eth0

Which starts flashing that thing (needs some minutes). After successful flashing, you may "telnet" as a first step while eventually 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 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:

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.


// Have fun - Sven-Ola

Mehr Informationen über die Mailingliste Berlin