OpenWrt Forum Archive

Topic: D-link DIR-505 support?

The content of this topic has been archived between 2 Apr 2018 and 5 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Before (if ever) I post them in the Community Releases I would appreciate some feedback/testing here. I've built custom DIR-505 images for 15.05.1 with (in no particular order):
1. Proper Router, Repeater and Hotspot configurations pre-set (thanks to @manishgkasera's script).
2. If connection to "main wifi" cannot be established within a minute in Repeater mode, the STA interface is disabled (so you can still connect to the router and modify its WiFi settings).
3. WPS button acts as reboot (so if you need to switch mode -- use the slider and press/release WPS button).
4. Lightweight adblock  (in Router mode).
5. Auto-generated WiFi SSID and password in the form of OpenWrt-XXXXXX where XXXXXX are 6 hex digits. Same SSID and password (case-sensitive). Not very secure, but better than static SSID/password.
6. No default root password set -- immediately connect to your DIR-505 after install and change it.
7. Luci and miniupnpd, just because.
8. LAN IP is 192.168.0.1 (in Router mode).

LINKS:
Factory image: https://www.melmac.net/openwrt/images/o … actory.bin
Upgrade image: https://www.melmac.net/openwrt/images/o … pgrade.bin
MD5 Sums: https://www.melmac.net/openwrt/images/o … r505v1.md5

LEDE images: https://www.melmac.net/openwrt/images/
There are both factory and sysupgrade images as well as md5 file with the checksums. The build is happening each day around 8am PST. THESE ARE UNTESTED IMAGES!

If you try it, please let me know how it went. If you can help me host those images at subsignal/openwrt domains, give me a shout.

PS. Please verify md5 hash before flashing!

(Last edited by stangri on 22 Jul 2016, 01:56)

@stangri

I'm running your image, and like the slider functionality with reboot.  I can't test much of the wifi stuff because my unit seems to have a very weak wifi signal (open box special).  So, not much of a travel router for me.

The wifi was a little better after I deleted the "-" out of the ESSID and password.  At least it stopped dropping the connection then.  One thing I have noticed in the past is that wpa-supplicant in Linux, and probably also Android, often interprets special characters in ways the router is not expecting.  So, I usually avoid them.  "_" seems to be fine, though.

I'd like to keep some of this functionality and do another build with more packages baked in.  Can I just make an archive of the settings and do a build with the "FILES=" option, with "FILES=" pointing at the extracted archive?  Or will I miss some functionality?  Also, how are you handling the ad-block?  Are you using the built-in script or is there a hosts file somewhere I need to look at?

Thanks

EDIT:  Wifi is much better now after resetting two or three times.  I can connect reliably with your ESSID/password combo now.  Must have been some stuff lingering around from the factory firmware.

(Last edited by RoutyMcRouter on 17 Apr 2016, 08:21)

donutsncreme wrote:

Now, I am trying to mount my HDD with 3 partitions. I tried http://wiki.openwrt.org/doc/howto/usb.storage 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?

Thank you

I can never get the USB port to function without adding a powered USB 2.0 hub.  So, I have my little portable device and wires everywhere.  You are probably looking at the same hardware issue rather than firmware problems.  If you are lucky and have the DIR-505L model, you should have better USB performance.

For your file sharing questions, the package luci-app-samba will allow you to share files by simulation a Windows computer share.  There are also the packages luci-app-shairport and luci-app-shairplay.  To use any of these, you will need the USB block mounting tools and file system support.

RoutyMcRouter wrote:

@stangri

I'm running your image, and like the slider functionality with reboot.  I can't test much of the wifi stuff because my unit seems to have a very weak wifi signal (open box special).  So, not much of a travel router for me.

The wifi was a little better after I deleted the "-" out of the ESSID and password.  At least it stopped dropping the connection then.  One thing I have noticed in the past is that wpa-supplicant in Linux, and probably also Android, often interprets special characters in ways the router is not expecting.  So, I usually avoid them.  "_" seems to be fine, though.

I'd like to keep some of this functionality and do another build with more packages baked in.  Can I just make an archive of the settings and do a build with the "FILES=" option, with "FILES=" pointing at the extracted archive?  Or will I miss some functionality?  Also, how are you handling the ad-block?  Are you using the built-in script or is there a hosts file somewhere I need to look at?

Thanks

EDIT:  Wifi is much better now after resetting two or three times.  I can connect reliably with your ESSID/password combo now.  Must have been some stuff lingering around from the factory firmware.

I'm using dots in my SSIDs and they seem to work fine for a plethora of Android (kinda Linux) and Mac (kinda Unix) computers, so I don't know what to tell ya. wink Also, local cable/ADSL providers supply their customers with boxes which certainly do have dashes in SSIDs, that's why I also used dash. I might consider switching to underscore in the future.

As far as building is concerned I package only three files:
/etc/init.d/adblock
/etc/rc.d/S11etc_configs
/etc/uci-defaults/99-setup

First file is the adblock, second is the script which sets up different configs for different slider positions and the last one is the script which sets everything up on first boot. If you're already on my build you can just copy the file from /rom/etc/uci-defaults/99-setup, copy it from the router to your build machine, modify it to your liking and include it in your files as /etc/uci-defaults/99-setup.

PS. Adblocking is based on bole5's script and the S11etc_configs is pretty much what manishgkasera posted a few pages back. I just added a few default settings in uci-defaults to make the slider useful. wink

Yeah, it was fine after I reset a few times.   I guess I was thinking of the problem I had with spaces in the ESSID

Thanks, I'll pull those files out and take a look

I'm finding the button script to be useful, especially for router mode.  I was thinking of a way to build some sort of application for Android to easily configure certain modes, and it finally dawned on me that it would be easier to just run an SSH terminal emulator on Android then fire up some configuration scripts.

This post contains a script that will scan the network then reconfigure the wireless interface, it just has wireless-tools as a dependency:
https://forum.openwrt.org/viewtopic.php?id=39485

I have it running automatically at SSH login, by putting an entry in /root.profile.  Now, I just need to write some stuff in front of it to query which mode to use, so I can setup a wwan with wlan from my tablet without screwing it all up.

Well, a nice luci-wrapper for setting things up in 3 different configs would be nice, I hope someone contributes it.

As there's enough room on DIR-505 to actually include luci, you can at least start the router in Repeater mode, wait until it times out trying to connect to pre-defined SSID and then use luci to find open APs and switch to one of them.

Yeah, I also have Luci in there, but when traveling with a phone or tablet, logging in with a terminal emulator and running predefined scripts is easier for me than messing with a web interface.  Also, I have one of those $7 ramips routers I'd like to travel with if I can find a way to keep it a little cooler.  It has a very stable USB bus, so I can use it for SFTP without lugging a powered hub with me, but only has a 4MB flash and 32MB RAM

Sorry if I'm asking a question which may have been answered in the 250+ posts on this device.

Is there a gpio pin which turns off and on the usb port power, as with the WR-703N:
echo 0 > /sys/class/gpio/gpio8/value
echo 1 > /sys/class/gpio/gpio8/value

If someone can provide a gpio pin number, I'll add it to the device page for the DIR-505.

(Last edited by lizby on 10 May 2016, 16:39)

Hi Stangri,

I've been successfully testing your version on my D-link. However,  the kernel module kmod-fs-exfat from openwrt repository isn't working (wrong kernel version). It's a declared bug. I don't have any access to a computer to compile it.

Do you have it compiled as ipk for this firmware version? If so, would you be so kind to post it here if it's properly builded?

Thanks

Thaihugo


stangri wrote:

Before (if ever) I post them in the Community Releases I would appreciate some feedback/testing here. I've built custom DIR-505 images for 15.05.1 with (in no particular order):
1. Proper Router, Repeater and Hotspot configurations pre-set (thanks to @manishgkasera's script).
2. If connection to "main wifi" cannot be established within a minute in Repeater mode, the STA interface is disabled (so you can still connect to the router and modify its WiFi settings).
3. WPS button acts as reboot (so if you need to switch mode -- use the slider and press/release WPS button).
4. Lightweight adblock  (in Router mode).
5. Auto-generated WiFi SSID and password in the form of OpenWrt-XXXXXX where XXXXXX are 6 hex digits. Same SSID and password (case-sensitive). Not very secure, but better than static SSID/password.
6. No default root password set -- immediately connect to your DIR-505 after install and change it.
7. Luci and miniupnpd, just because.
8. LAN IP is 192.168.0.1 (in Router mode).

LINKS:
Factory image: https://www.melmac.net/openwrt/images/o … -505v1.bin
Upgrade image: https://www.melmac.net/openwrt/images/o … v1-upg.bin
MD5 sums: https://www.melmac.net/openwrt/images/md5sums

If you try it, please let me know how it went. If you can help me host those images at subsignal/openwrt domains, give me a shout.

PS. I tried to separate the whole /etc/ or at least create different /etc/rc.d/ for different modes to better control which services start in which mode, but it wasn't very elegant, so I went back to @manishgkasera's idea of switching just /etc/config/ based on the slider position.

Thaihugo, I don't have toolchain set up, I make these images with Image Builder. Ask for help in developers only section maybe? Someone should be able to compile the ipk compatible with ar7xx 15.05.1.

stangri wrote:

Thaihugo, I don't have toolchain set up, I make these images with Image Builder. Ask for help in developers only section maybe? Someone should be able to compile the ipk compatible with ar7xx 15.05.1.

Thanks anyway stangri. It was worth a try. Don't worry, I'm going to hack it by tar decompressing and installing the mod by hand

(Last edited by thaihugo on 27 May 2016, 12:49)

I have had the 505 running for some time, and its works below expected levels, now I would like to turn this little box into a VPN wireless point.

What I am after is.
Plug the 505 into the router via UTP, and then everything that connects via the WIFI on the 505 goes into a VPN (VPN needs to be easily be updated and changed regularly).

Is this possible, and is it easy to do?  I have been reading the OPEN WRT stuff and it does not look all that simple to set this up at all.


--------- Follow the VPN guides (do a search in google) but remember to split the wifi and utp port

ETH0 = WAN
ETH1 = LAN (give is LAN access)
WIFI = WIFI port, give it its own subnet  and leave the gateway and DNS blank
VPN = VPN details

as for the firewall bit

ETH1 > VPN and ETH1
VPN > wifi and VPN
wifi > VPN and WIFI
WAN > wan

The biggest hiccup I had was I kept using the domain name for the VPN, use the IP address smile

Hope this helps others.

(Last edited by Yellowperil on 8 Jul 2016, 14:43)

Update to the images I've built (read up on them on top of page 11 of this thread) -- they're now based on LEDE (revision 958 at the moment). In addition to the previous (OpenWrt) customizations it fixes the broken miniupnpd on LEDE. The AdBlocking has also been updated. It's not as robust as Dirk's but if you want to switch to his, just delete the /etc/init.d/adblock.

I haven't had a need/chance to use my DIR-505 lately, so I haven't tested those images myself.

Hi Stangri,  I've been curious about the LEDE project, but I didn't see an image builder in the downloads and have been too lazy to setup the toolchain for buildroot.  Is LUCI available in the build environment?  The documentation just talks about setting up the UCI.  Also do you happen to remember what kernel version is used?

Cool, thanks.  I see the image builder now.  I just didn't scroll down far enough earlier

stangri wrote:

Update to the images I've built (read up on them on top of page 11 of this thread) -- they're now based on LEDE (revision 958 at the moment). In addition to the previous (OpenWrt) customizations it fixes the broken miniupnpd on LEDE. The AdBlocking has also been updated. It's not as robust as Dirk's but if you want to switch to his, just delete the /etc/init.d/adblock.

I haven't had a need/chance to use my DIR-505 lately, so I haven't tested those images myself.

LEDE versions can't be downloaded getting 500 error.!!

OK, since there are multiple revisions a day happening on the LEDE side, I've reworked my build process.

The build is happening each day around 8am PST and factory image, sysupgrade image and the md5 file (with check-sums) are uploaded to https://www.melmac.net/openwrt/images/.

THESE ARE UNTESTED IMAGES!

stangri wrote:

OK, since there are multiple revisions a day happening on the LEDE side, I've reworked my build process.

@stangri, thanks for giving access to your builds.  I'm updating my home gear, and just got a DIR-505 A1 that I plan to run as a RTL-SDR server using a DVB-T dongle.  I'm hoping the DIR-505's USB port can supply enough power...

The whole OpenWRT/LEDE transition is pretty new to me.  I'm used to doing a major OpenWRT update occasionally, eg. from Barrier to Chaos, with updates and backports as needed between major stable releases.  With LEDE, there doesn't seem to be an official "stable" branch that I've been able to find.  What is the official plan in the LEDE community for when stability is needed?  Is the intent that someone (like you) picks a platform, runs nightly builds, collects stability information from testers, and determines which of the possible builds is the most stable?  Or is it best to stick with the OpenWRT 15.05.1 image for devices where stability is most important until things settle a little?

Thanks!

@petiepooo I have no more influence over LEDE stable release than you do. smile

I've been running LEDE on my only home router for months now, starting from revision 8xx and it's now up to 16xx and I'm still on LEDE. I update the revisions on my router at least once a week. For my own purposes the current LEDE builds are stable, any time I've had any issues it was more to do with how I build images rather than anything to do with LEDE code.

My advise to you would be to pick the most recent LEDE build and if it works for you for a week stay on that until LEDE is officially released. Or if this is device for a remote installation where you won't have access to it from now on, you might be better off with the 15.05.1-based image.

I will not be updating the 15.05.1 image tho, while the LEDE images are likely to enjoy new features, like the upcoming @dibdot's travelmate package (and more than likely I will migrate public image from my own adblock to @dibdot's adblock package as well) -- not sure how important that is for you.

BTW, I totally forgot to update this thread, I've started my own thread in community releases as I didn't want to spam this one with the information about my builds: https://forum.openwrt.org/viewtopic.php?id=66391

Hai, can someone help me to get openWRT of D-Link DIR-506L

Hello,

I uploaded openwrt-15.05.1-ar71xx-generic-dir-505-a1-squashfs-factory.bin using the webinterface as described here:

wiki.openwrt.org /toh/d-link/dir-505#web_interface

(sorry for the poor fromatting, but the forum does not allow me to post links)

I see the success page, but when I reboot, I still see the D-link firmware up and running.

D-Link FW version is 1.09, HW version is A2.

Any hint how I can get openwrt on the device is welcome.

Thanks
Rainer

The discussion might have continued from here.