Dir-505

0 views
Skip to first unread message

Skye Severy

unread,
Aug 5, 2024, 2:52:08 AM8/5/24
to histbicacoup
Viathe steps described on the wiki-page, I installed the 22.03.5 (also the 21.02.7 release) version of openwrt on a d-link DIR-505.

When the DIR-505 boots-up, it response for a few seconds (2 or so) to ping (possibly telnet as well) and then becomes silent.

Is this a known problem? How can I resolve this?


The first installation was via the web-interface of the dir-505 itself. After that I used sysupgrade to go from e.g. 19 to 22. And when the system became unresponsive, I went back to 19 using the rescue-bootloader from d-link itself.


Not trying to say it's the issue, or a solution, but just to drive this point home: OpenWrt's web interface doesn't even use the same address as the D-Link one. How do you expect to get the new web interface if you still call up the wrong address?


Also, did you reset your local ethernet interface to DHCP? You would have had to configure it at 192.168.0.(not 1)/24 to reach the D-Link emergency flash facility, which is the wrong subnet for default OpenWrt.


As far as I remember that's just a simple time-based JavaScript counter that has no way of knowing if the flashing process actually was successful. It just makes sure you wait for x minutes before rebooting.


In the meantime, I found that openwrt can be installed by using the FW upgrade mechanism in the standard web interface (i.e. not the rescue web page), exactly the same way as described for upgrading the firmware in the manual.


I just went through the process, flashing openwrt-19.07.0-ar71xx-generic-dir-505-a1-squashfs-factory.bin through the DIR-505's "D-Link Router Recovery Mode" facility, and I'm sorry to say that it ... just worked as intended.


They do. As mentioned, the percentage counter on the "flashing now" page is a simple JavaScript timer of 120 seconds. Around 67% in, after roughly 90 seconds, the DIR-505 resets and boots to OpenWrt, which needs another minute or so to set up for the first time until the LED goes solid green. After changing the ethernet interface to 192.168.1.2 I can confirm via SSH that the DIR-505 is indeed running 19.07.0 now.


I really need some help. I am a total noob and need some help. I was looking for a device which could convert my hard disk into a NAS (Network acess storage) device, something I could add as a network device on my PC and access. If not, atleast a device which can provide FTP access to my hard disk using Filezilla. Dlink DIR 505 was something the retailer promised could do (he just said it will help me share media across phones and PC using HDD). Given NAS devices are not easily available in stores nearby, I got the DLink DIR 505 for myself.


1) HDD, even after providing extra power using dual usb port, does not seem to be shown as a storage in shareport

2) USB device, though detected, can be accessed only by using the shareport web link (191.168.0.1:8181). Pointing filezilla for ftp does not work and I even cannot use the hard disk as a wifi drive.


The easiest file-serving protocol is just ssh with various client tools (scp, or sftp-like clients). Learn how to use ssh, if you don't already know it. You may be able to install OpenWRT without it, but it is very useful for troubleshooting.


I installed OpenWRT by installing the OpenWRT firmware from the standard web ui of the device:

openwrt-ar71xx-generic-dir-505-a1-squashfs-factory.bin

I did not use the "emergency restore mode".


You can then follow the "firstlogin" instructions to setup a password, and use the OpenWRT web interface (Luci) to upload a second firmware file:

openwrt-ar71xx-generic-dir-505-a1-squashfs-sysupgrade.bin

I'm not sure what you gain by installing the sysupgrade file. OpenWRT also works without it.


Are you sure the device does not do this as is? Maybe you just need to configure it. I don't have an original device to try it (nor do I have a Windows machine to try it with), but I saved some of the screens when I first bought it. I see that in the REPEATER mode, it has a MEDIA SERVER screen that configures a DLNS Media Server and a STORAGE screen (I don't know what a DLNS Media Server is, but it seems relevant to what you want to do).


DLNS media server only uses DLNA protocol (if I am right with the name). This is a streaming protocol used by the web UI or the shareport app on mobile. Curiously, shareport app on my mobile detects the usb drive, the app on my pc does not. I need to use the web ui for streaming, which is a pain, if I want to transfer a bulk of data to the drive (including non media files like zip, exe etc.)


I then took off the power connected my Dlink 505 router to my main router lan via ethernet cable. I switched the Dlink 505 on and was able to connect to Openwrt wifi network. I was also able to ssh into it over wifi.


However, the Dlink 505 is unable to connect to internet via the main router ethernet cable. I check the same cable on my PC and my pc was able to connect to internet. Even directly connecting the main ethernet cable (which goes into my main wifi router from my fiber optic modem) directly to Dlink 505 but still no internet.


I went to my friends house who has a broadband modem and tried using it there but still the Dlink 505 did not receive any internet. Am I doing something wrong? I am unable to install Luci because of this.


Now, I am trying to mount my HDD with 3 partitions. I tried however while I was able to get my HDD detected once (just 2 of 3 partitions), they are not appearing anymore. I guess auto mount is not working. Can someone help?


After I did this I finally could update to OpenWRT

I think it's just extremely odd that i had to go this route, since the other 505 that i have was no problem at all.

But just in case anyone has a similair issue, then please give it a try.


It's been a while since I've looked at OpenWrt on DIR-505, so I'd appreciate if anyone could address a few questions:

1. There's just one three-position switch, is it represented by two binary GPIOs (19 & 20)?

2. Is the only ethernet port configured as a LAN port or WAN port in default CC config?


I'm not entirely sure if that's the best way to go about it. If you reacted to the switch instantaneously, it would become hard to reach the extreme positions without reacting to the middle position in the process. You'd have to "debounce" the switch in some way, and at that point you can use another delayed method as well.


Short of recompiling OpenWrt for the router and including the GPIOs (or at least one of them) in the hotplug configuration you will not get an instant reaction to the switch anyway. But there are other ways to go about it. You could have a cronjob check the switches every minute, or an infinitely looping shell script with an even shorter delay. You can check the GPIOs on system boot like the above script does.


I'm not entirely sure if that's the best way to go about it. Pointing out a minor flaw: The script reboots the router, if you combine this with an immediate reaction, you'd have to reboot the router twice to get from one side of the switch to the other. (A simple reload of network would solve this, there really is not much of a point in rebooting the router just to change the network setting.)


Short of recompiling OpenWrt for the router and including the GPIOs (or at least one of them) in the hotplug configuration you will not get an instant reaction to the switch. But there are other ways to go about it. You could have a cronjob check the switches every minute, or an infinitely looping shell script with an even shorter delay. Personally, I wire up a hotplug script to react to the WPS button on the side. It in turn checks the GPIOs for the switch and reacts accordingly. "Set switch, confirm with button" in a way.


I thought about that, but I was hoping for an elegant way, detecting the slider. cronjob is a bit trickier as you'd have to store previous state, but if the recompile is required to enable hotplug for gpio, I'll probably go for the WPS-button script.


I've learnt a hard lesson that it's better to not use reghack with this model. WiFi was very flakey (to a point where it would not start after flash at all) and at first I thought I messed up my uci-defaults script or something.


I've tried to see if I could use uci cli to make changes to folders other than /etc/config and couldn't find any info on that. There's some info on how to do that with Lua, but I couldn't make it work. If someone here has a working knowledge of Lua, I'll post my script.


With so many options available (and iw warning "Do NOT screenscrape this tool, we don't consider its output stable.") -- what's the best and most reliable way to determine if the STA connection is up/down?

3a8082e126
Reply all
Reply to author
Forward
0 new messages