7.01.2014

How to install/set-up OpenWrt on a D-Link DIR-505L wireless router

OpenWrt wiki page for the D-Link DIR-505: https://wiki.openwrt.org/toh/d-link/dir-505

A. Basic setup and housekeeping:

Follow steps B thru E in this guide: https://dl.dropboxusercontent.com/u/57289645/blog/dir-505l_openwrt_setup_guide.txt

# ethernet/wan
uci set network.wan=interface
uci set network.wan.ifname=eth1
uci set network.wan.proto=dhcp
uci del network.lan.ifname
# wifi
uci set wireless.@wifi-device[0].disabled=0
uci set wireless.@wifi-device[0].channel=auto
uci set wireless.@wifi-iface[0].ssid=your_ssid_name
uci set wireless.@wifi-iface[0].encryption=psk2
uci set wireless.@wifi-iface[0].key=your_password
# system
uci set system.@system[0].hostname=your_hostname
uci set system.@system[0].timezone=PST8PDT,M3.2.0,M11.1.0 # Los Angeles
# commit changes
uci commit
wifi

Sources:
https://forum.openwrt.org/viewtopic.php?pid=230861#p230861
http://wiki.openwrt.org/doc/uci/wireless/encryption#configure.wpa2.psk
http://wiki.openwrt.org/doc/uci/system

B. USB storage support (assuming NTFS-formatted USB stick):

opkg update
opkg install kmod-usb-storage kmod-fs-ntfs ntfs-3g
mkdir -p /mnt/usb_drive
ntfs-3g /dev/sda1 /mnt/usb_drive -o rw,sync
# do stuff
umount /dev/sda1

Sources:
http://wiki.openwrt.org/doc/howto/usb.essentials
http://wiki.openwrt.org/doc/howto/usb.storage
http://wiki.openwrt.org/doc/howto/writable_ntfs

C. USB serial adapter support:

opkg update
opkg install kmod-usb-serial coreutils-stty
opkg install kmod-usb-serial-pl2303 # for Prolific PL2303-based devices
opkg install kmod-usb-acm # for devices using Abstract Control Model (ACM)
reboot
# device name will be /dev/ttyACM0 for ACM devices
cat /dev/ttyUSB0 # view data coming to the serial port
stty -F /dev/ttyUSB0 -a # view serial port settings

Source:
http://wiki.openwrt.org/doc/hardware/port.serial#usb.enabled.routers

D. Minimal Python install with pyserial support

opkg update
opkg install python-light python-pyserial
br/>

3 comments:

  1. I was able to install openWrt on my Dlin dir-505, but i am not able to configure pppoe connection , is there any special configuration for this?

    ReplyDelete
    Replies
    1. https://wiki.openwrt.org/doc/uci/network#protocol_pppoe_ppp_over_ethernet

      Delete
  2. thanks, let me try and will update you.

    ReplyDelete