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.

Sorry to ask a newbie question.
I flashed the image, successfully set up pppoe and wifi. However, when i type "wpkg update" in putty, it said fail to download the list... i want to download the luci, what should i do? Any way to walkaround?

please help me.

my dir-505 is brick. so I try  flash via Serial console,
but I don't

this my log

U-Boot 1.1.4 (Sep  7 2012 - 10:51:18)

AP121 (ar9331) U-boot

DRAM:  64 MB
Top of RAM usable for U-Boot at: 84000000
Reserving 161k for U-Boot at: 83fd4000
Reserving 192k for malloc() at: 83fa4000
Reserving 44 Bytes for Board Info at: 83fa3fd4
Reserving 36 Bytes for Global Data at: 83fa3fb0
Reserving 128k for boot params() at: 83f83fb0
Stack Pointer at: 83f83f98
Now running in RAM - U-Boot at: 83fd4000
============================================ 
Date:Sep  7 2012  Time:10:51:18
Cameo Version: v1.00 Build:05
Module Name: D-Link DIR-505A1
============================================ 
id read 0x100000ff
flash size 8388608, sector count = 128
Flash:  8 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7240_enet_initialize...
: cfg1 0x5 cfg2 0x7114
eth0: 00:03:7f:ff:ff:ff
eth0 up
: cfg1 0xf cfg2 0x7214
eth1: 00:03:7f:ff:ff:fe
athrs26_reg_init_lan
ATHRS26: resetting s26
ATHRS26: s26 reset done
eth1 up
eth0, eth1
Hit any key to stop autoboot:  0 
ar7240> tftpboot 81000000 DIR505A1.bin
dup 1 speed 100
Using eth0 device
TFTP from server 192.168.0.100; our IP address is 192.168.0.1
Filename 'DIR505A1.bin'.
Load address: 0x81000000
Loading: #################################################################
         #################################################################
         
done
Bytes transferred = 7864404 (780054 hex)

I success to transfer image from TFTP Server
but router not boot


ar7240> erase 0x9f020000 +0x332004
Erase Flash from 0x9f020000 to 0x9f35ffff in Bank # 1
First 0x2 last 0x35 sector size 0x10000
  53
Erased 52 sectors

ar7240> cp.b 0x81000000 0x9f020000 0x332004
Copy to Flash... write addr: 9f020000
done

ar7240> boot.m 0x9f020000
Usage:
boot    - boot default, i.e., run 'bootcmd'



ar7240> bootm 0x9f020000

## Booting image at 9f020000 ...
Bad Magic Number


ar7240> boot 0x9f020000


Usage:
boot    - boot default, i.e., run 'bootcmd'

OK. I get it.  because  at the first I don't understand  cp.b  command
cp.b 0x81000000 0x9f020000 0x332004

but now I understand   from here http://support.tq-group.com/doku.php?id=en:tqma35:linux

cp.b cp.b 0x81000000 0x9f020000 <filesize>

Thanks.

(Last edited by dcoffeenet on 30 Oct 2013, 03:24)

I solved the problem and installed luci=]

But when I input "opkg install luci-ssl", or "opkg install kmod-usb-printer", it said my kernel doesn't support. Don't know how to do this... please help!

Hostname    OpenWrt
Model    D-Link DIR-505 rev. A1
Firmware Version     OpenWrt Barrier Breaker r38541 / LuCI Trunk (svn-r9932)
Kernel Version    3.10.17

(Last edited by andrew0221 on 29 Oct 2013, 17:35)

Hi all,

I am new to this world of alternative firmware. I have been reading through the forum and downloaded the factory bin file. Uploaded it to my 505_revA1. Unplugged it from the 220V, waited 30 secs and plugged back in.

Status light is steady red, blinking green, steady green. I plug in my macbook air and set my ip to 192.168.1.2, subnet 255.255.255.0 and I have tried router 192.168.1.1 and also leaving it blank and then I go to terminal and type telnet 192.168.1.1 and then after some time it tells me it cannot establish a connection.

Tried it from a win7 laptop with putty, but no result also timing out.

Went to emergency flash mode and tried again, same result.

Am I missing something?

I hope some of you guys have some tought about this. For now I will return to standard factory bin file.

(Last edited by XanderL on 31 Oct 2013, 16:27)

hi everyone, happy to report i too have flashed this little dir-505 and habe luci webgui installed by following instruction in here and openwrt wiki. im pretty excited at the moment. i flash the bin availble from trunk link posted a couple pages back. everything works but I cant seem to get kmod-usb-core installed. i have minidlna installed and other packages install fine. is this a known problem? or am i missing something? im trying to mount my usb hd but i cant get anything named sda to appear in /dev for mounting.

(Last edited by Cantenna on 8 Nov 2013, 05:17)

but I cant seem to get kmod-usb-core installed

likely to be already installed; note that this isn't usually enough to get a device properly working: you need at least usb-ohci / usb-uhci and for usb 2.0 usb-ehci too

hmm

Installing kmod-usb-uhci (3.10.18-1) to root...
Downloading http://downloads.openwrt.org/snapshots/ … r71xx.ipk.
Multiple packages (kmod-nls-base and kmod-nls-base) providing same name marked HOLD or PREFER. Using latest.

Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb-uhci:
*     kernel (= 3.10.18-1-191884c8209ab4ed886d748968874a28) *     kernel (= 3.10.18-1-191884c8209ab4ed886d748968874a28) *
* opkg_install_cmd: Cannot install package kmod-usb-uhci.

(Last edited by Cantenna on 8 Nov 2013, 06:22)

ok, a build mismatch. If your kernel version is the same as the one used to build the ipkg, you can try 'opkg --force-depends install ...'

Or perhaps do a new build with all the required packages.

~john

thanls for the reply. i dont have a jtag connection to this device,  not feeling to comfortable with building a firmware from source because i dont have a good brick recovery option and im new to openwrt.

is this something i can wait on for a new build in trunk?  Or could someone build me a bin with usb support, paypal you over 10 bucks? smile

kind regards.

(Last edited by Cantenna on 8 Nov 2013, 16:57)

@Cantenna I sent you an email.


~john

Hi John.

Thanks again for all your help.

I noticed last night a new trunk build and upgraded. All packages seem to work and install no problem in the latest trunk build.

Do you have usb storage access? I seem to have all packages installed to make this work but I can't seem to get any devices to appear in my router /dev folder?

i have minidlna installed, desperatley trying to get this to work smile

edit: my mistake, didnt have block mount installed. opps.

im pretty freakin excited right now! lol

thanks again to this forum and John.

cheers!

(Last edited by Cantenna on 9 Nov 2013, 19:04)

Hi Cantenna,

Glad you got it going.

You may want to get a build system going. That way you can do your own custom builds with the packages you want.

~john

Hello everyone.

How can i make my own build and set up default values? I am pretty new to this openwrt.

Thanks.
Hugo.

Hi there,

I already built up a custom firmware from trunk and I have 2 sets configuration files for AP and Repeater modes.
They works fine individually.

Now, I want to make configuration sets switchable by using the build-in 4 position switch, but I get stuck.

First, I don't know how to use this switch based on the description of http://wiki.openwrt.org/toh/d-link/dir-505#buttons. The switch is not appear in the buttons list.

Second, I want to make a shell script to switch configuration set based on the switch position while booting, but I don't know where should I put the script in.

Thanks for help in advance.

(Last edited by JackYeh on 29 Nov 2013, 09:57)

Does anybody know how can i split LAN and WAN interfaces. presently i have br-lan which is eth1+wlan0. I need separate LAN and WAN interfaces, something line eth0 and br-lan(eth1+wlan0). Any pointers?

(Last edited by sachin0235 on 28 Dec 2013, 17:10)

if I want to detect the BCD Switch action. It looks not just add  " #define DIR_505A1_GPIO_BCD_SWITCH_X    19  ~ 23 " in
target\linux\ar71xx\files\arch\mips\ath79\mach-dir-505-a1.c

how do I do ?

I've got OpenWRT up and running on my DIR-505 today. It's plugged into my LAN via an ethernet cable and is running in "Access Point" mode (D-Link user manual terminology).

I want to run it in "Repeater Mode" so that it extends the WiFi network from my main WiFi access point. This would mean it doesn't connect to the LAN via an ethernet cable (important because  it won't have an RJ45 outlet where it's going to be located).

  • Has anyone got their's configured in Repeater Mode, and if so can you please share your config?

  • Does it matter which setting the hardware switch is on - Router/AP Mode, or Repeater Mode, or Wi-Fi Hotspot?

Other than similar routers (e.g., the TP-Link TL-WR703N), the D-Link DIR-505 uses the interface eth1 rather than eth0. This means that if you build your own firmware, you must configure /etc/config/network accordingly (option ifname 'eth1'), or you will not be able to connect later on via Ethernet.

config interface 'lan'
        option ifname 'eth1'
        option proto 'dhcp'

eth0 seems to be internally present, too. But it is not wired up externally.

(Last edited by probono on 17 Mar 2014, 18:49)

philled wrote:

Has anyone got their's configured in Repeater Mode, and if so can you please share your config?

Sort of... I managed to setup a wireless connection to my main router (in Station Mode) and then I did setup an access point on a different subnet. Having connected a device to that access point I can access stuff from the main router lan as well as on the internet. However, that is not the real thing, since when connected via access point a operate on a different subnet segment. Things that do not work anymore are:
- SMB/CIFS-File-Shares are not accessible
- DNS lookup to my local .lan domain configured on the main router are not accesible anymre

What I would need is to have those two wireless networks brided. This must be somehow possible, since this is what the orignal D-Link Firmeware does as well.

I am not sure if that is possible after all. http://wiki.openwrt.org/doc/recipes/bridgedclient sais "This configuration will not work for routers that are on other platforms, such as Atheros chipsets ...". It also indicates, that there are some firmware patches which would allow such bridges. Maybe I am also missinterpreting something.

So maybe somebody has an idea how bridges are still possible.


philled wrote:

Does it matter which setting the hardware switch is on - Router/AP Mode, or Repeater Mode, or Wi-Fi Hotspot?

The switches are irrelevant, I can't proof it but I am almost certain. You need to have the right configuration.

Today I tried to compile my own image for the DIR-505.
Tried to sysupgrade it from 12.09 to trunk, but got the following error:

root@DIR-505-2:/tmp# sysupgrade -v /tmp/openwrt-ar71xx-generic-dir-505-a1-squashfs-sysupgrade.bin
Sysupgrade is not yet supported on unknown.
Image check 'platform_check_image' failed.

Some additional info:

root@DIR-505-2:/tmp# cat /proc/cpuinfo
system type             : Atheros AR9330 rev 1
machine                 : D-Link DIR-505 A1
processor               : 0
cpu model               : MIPS 24Kc V7.4
BogoMIPS                : 265.42
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0888, 0x0000, 0x0630]
ASEs implemented        : mips16
shadow register sets    : 1
kscratch registers      : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

root@DIR-505-2:/tmp# cat /tmp/sysinfo/board_name
unknown
root@DIR-505-2:/tmp# cat /tmp/sysinfo/model
D-Link DIR-505 A1

root@DIR-505-2:/tmp# cat /etc/openwrt_*
DISTRIB_ID="OpenWrt"
DISTRIB_RELEASE="Attitude Adjustment"
DISTRIB_REVISION="r36810"
DISTRIB_CODENAME="attitude_adjustment"
DISTRIB_TARGET="ar71xx/generic"
DISTRIB_DESCRIPTION="OpenWrt Attitude Adjustment 12.09"
12.09

Any hints what's wrong?

LOL, I'll answer myself:

Reference: https://dev.openwrt.org/ticket/10554

- search for your router model in '/lib/upgrade/platform.sh'., then
- edit /tmp/sysinfo/board_name according to the previously found board name to fool sysupgrade
- sysupgrade -v openwrt-ar71xx-generic-dir-505-a1-squashfs-sysupgrade.bin

-> works! smile

I'm searching for a *complete* patch to add DIR-505 to AA12.09 menuconfig.
Looking through this thread I only found partial patches or patches for trunk, but I would like to get one for AA12.09.

Any hints?

Well, I'm stumped. I just received a DIR-505L and flashed a trunk image by editing the latest trunk sysupgrade to accommodate the 505L (versus the 505). It boots up (Seemingly) and the light turns green when I plug a cable into it, but there's no wifi being broadcast and I can't get a DHCP address from the LAN port.

I'm at a loss as to how to proceed. In addition, no matter what I do, the emergency flash procedure simply won't work. I can get the red light to flash (on two seconds, off one second), but I can never reach 192.168.0.1 via a browser, nor can I ping it.

Outside of cracking this thing open a soldering a serial connection in place, is there anything I'm missing or misunderstanding?

Thanks for any help!!

Hi Chris!

chrisheacock wrote:

Well, I'm stumped. I just received a DIR-505L and flashed a trunk image by editing the latest trunk sysupgrade to accommodate the 505L (versus the 505).

What do you mean by editing? You can use the A1 snapshot without any editing
http://downloads.openwrt.org/snapshots/ … actory.bin for first install and http://downloads.openwrt.org/snapshots/ … pgrade.bin for sysupgrade.

chrisheacock wrote:

It boots up (Seemingly) and the light turns green when I plug a cable into it, but there's no wifi being broadcast and I can't get a DHCP address from the LAN port. I'm at a loss as to how to proceed. In addition, no matter what I do, the emergency flash procedure simply won't work. I can get the red light to flash (on two seconds, off one second), but I can never reach 192.168.0.1 via a browser, nor can I ping it.

After the initial flashing procedure, you have to telnet the DIR-505 on 192.168.1.1. If you don't get an IP automatically, just use a static one like 192.168.1.100. Then set your root password by entering "passwd". This disables telnet and enables ssh. Wifi is turned off by default. Now you can edit the interfaces with /etc/config/ethernet and /etc/config/wireless.

Btw: To reach it via browser, you need to install Luci separately with opkg, since it is not included in the trunk images.

You really should take a look at: http://wiki.openwrt.org/doc/howto/firstlogin

(Last edited by chevron on 11 Apr 2014, 16:39)