Skip to main content
Home
The Baheyeldin Dynasty
The journey for wisdom starts with knowledge
  • Home
  • About
  • Site Map
  • Contact

Quick How To: Installing OpenWRT on the D-Link DIR-835 wireless router

  1. Home

By Khalid on 2014/02/26 - 11:22, last updated 2014/03/07 - 10:10

This is a quick how to for installing OpenWRT custom firmware on a D-Link DIR-835 router.

Though these instructions were tested on the DIR-835, they apply to many other router models from Linksys, Netgear, ASUS, and many other brands.

Check if your hardware is supported

First thing to do before buying a router, is to check the list of supported hardware. Specific version numbers are important. Some routers have version A supported, then B unsupported, then C again supported. This is due to manufacturers changing chipsets often.

Get the firmware

You need to know the chipset of your router, which should be listed on OpenWRT's hardware wiki, mentioned above.

If your router is supported, then it will have a stable build, which is at present 12.9. To know if it has a stable version, a daily snapshot, or unsupported, find your device on the wiki. For example, here is the entry for DIR-835, which says that I have to use the daily snapshots, or "the trunk".

You then you go openwrt-ar71xx-generic-dir-835-a1-squashfs-factory.bin.

Note that you should get the "-factory" in the name, which is the one you should use, not the "-sysupgrade" one!

Download this file, and place it on a PC with an Ethernet socket.

Flash the new firmware to the router

Although procedures for specific devices vary, most of them can be flashed from the vendor's web interface.

Before doing this, you need to connect the router directly to your computer using an Ethernet cable. Disable any WiFi adapters on your PC that were enabled. Power on the router. Once your PC is connected to the router, point your browser to:

http://192.168.0.1/

Then, log-in per the vendor's instructions, and navigate to where you can upgrade the firmware. On a D-Link device, you do this from Tools, then Firmware.

Once the flashing is done, the router will reboot. You need to reconnect your PC to the router again, because the IP address of the router has changed.

Set the password

You need to change the password. To do this use PuTTY on Windows, or telnet on Linux to connect to the router:

telnet 192.168.1.1

Then change the password:

passwd

Connect to the internet

If you have not connected the router to the internet, then do so now. This means connecting the cable or DSL modem to the yellow Ethernet socket marked "WAN" on the back of the router, and rebooting.

Install LuCI

Administering the router from the command line is possible, but also tedious and requires a lot of reading.

Therefore, we need to install the web administration interface, known as LuCI.

To do this, login to the router via telnet or ssh, then execute these commands:

opkg update 
opkg install luci

If these complete successfully, then you need to start the web server:

/etc/init.d/uhttpd start

And, we also need to make the web server start automatically when the router is rebooted:

/etc/init.d/uhttpd enable

Go to web administration

Once you have done all the above, type the following in your browser:

http://192.168.1.1

Then you need to use the password you changed above

Now you can enable WiFi, set an SSID and password, and other tasks ...

Smooth sailing from there ...

Mounting a USB storage device

You can also use a USB storage device for various tasks, e.g. run programs from it to save space in the flash storage of the router itself, or use it for output from certain programs, such as logging daemons, e.g. syslog-ng.

Before you can mount a USB storage device, you have to install the following packages:

opkg update 
opkg install kmod-usb-storage kmod-scsi-generic block-mount kmod-fs-ext4 kmod-fs-vfat e2fsprogs

If you get any of the errors below, then just reboot the router and the modules will be inserted in the correct order for you.

kmod: failed to insert /lib/modules/3.10.32/sd_mod.ko
kmod: failed to insert /lib/modules/3.10.32/ext4.ko
kmod: failed to insert /lib/modules/3.10.32/sg.ko

Verify that USB device is properly detected

Go to LuCI, and Verify from Status -> System that there are lines like the following section.

These lines verify that the USB system is working and detected the device:

usb 1-1: new high-speed USB device number 2 using ehci-platform
usb-storage 1-1:1.0: USB Mass Storage device detected
usbcore: registered new interface driver usb-storage

And these verify that the SCSI subsystem has detected the partitions for the device:

SCSI subsystem initialized
scsi0 : usb-storage 1-1:1.0
scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 0 CCS
sd 0:0:0:0: [sda] 3905536 512-byte logical blocks: (1.99 GB/1.86 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk

Mounting the USB device on boot

To have the USB device mounted on booting the router, edit the file /etc/config/fstab, and put this in it:

config 'mount' 
  option device       '/dev/sda1' 
  option options      'rw,noatime,nodiratime,sync' 
  option enabled_fsck 0 
  option enabled      1 
  option fstype       'ext4'
  option target       '/mnt/usb1'

Note that we are using noatime (do not update the access timestamp) and nodiratime (do not update the directory access timestamp), to reduce the I/O on the flash drive.

Then issue the following commands to make the above permanent on every boot.

/etc/init.d/fstab start
/etc/init.d/fstab enable

Resources

More info in OpenWRT's USB Essentials, USB Storage and partitioning, formatting, and mounting storage devices.

Contents: 
Linux
Tags: 
Router
OpenWRT
  • Add comment

Comments

AAmir Awan (not verified)

Great Post

Thu, 2014/03/13 - 16:08

These all are really an amazing tips about Installing OpenWRT on the D-Link and helped us a lot, keep posting useful ideas.

  • reply

Alan David (not verified)

Great Effort

Fri, 2014/03/14 - 07:26

It is excellent post thanks for share your opinion. Nice work.

  • reply

Current

Pandemic

  • COVID-19
  • Coronavirus

Search

Site map

Contents

  • Family
    • Khalid
    • Ancestry
    • Extended
  • Friends
  • Nokat نكت
  • Writings
    • Cooking
    • Culture
    • Science
    • History
    • Linguistics
    • Media
    • Literature
    • Politics
    • Humor
    • Terrorism
    • Business
    • Philosophy
    • Religion
    • Children
  • Technology
    • Linux
    • Arabization
    • Drupal
      • Association
    • Software
    • Internet
    • Technology in Society
    • Digital Archeology
    • NCR History
    • MidEast Internet
    • Programming
    • Saudi ISPs
    • Miscellaneous
  • Places
    • Canada
      • Weather
    • Egypt
      • Cuisine
      • Alexandria
      • E.G.C.
    • USA
    • Saudi Arabia
  • Interests
    • Astronomy
    • Fishing
    • Photography
    • Snorkeling
    • Nature
    • Photomicroscopy
  • Miscellany

In Depth

  • al-Hakim bi Amr Allah: Fatimid Caliph of Egypt الحاكم بأمر الله
  • Alexandria, Egypt
  • Arabic on the Internet
  • Articles on the history of Muslims and Arabs in the Iberian Peninsula تاريخ المسلمين و العرب في الأند
  • DIY GOTO Telescope Controller With Autoguiding and Periodic Error Correction
  • E.G.C. English Girls College in Alexandria, Egypt
  • Egyptian Cuisine, Food and Recipes مأكولات مصرية
  • George Saliba: Seeking the Origins of Modern Science?
  • Internet Scams and Fraud
  • Mistaken for an Arab or Muslim: Absurdities of being a victim in the War on Terror
  • Mistaken Identity: How some people confuse my site for others
  • One People's Terrorist Is Another People's Freedom Fighter
  • Overview of Google's Technologies
  • Photomicroscopy
  • Pseudoscience: Lots of it around ...
  • Resources for using Google Adsense with Drupal
  • Rockwood Conservation Area, Southern Ontario
  • Selected Symbolic Novels And Movies
  • Snorkeling the Red Sea near Jeddah
  • Updates and Thoughts on the Egyptian Revolution of 2011

Recent Content

Most recent articles on the site.

  • Origin Of COVID-19: Natural Spillover, Lab Leak Or Biological Weapon?
  • Kamal Salibi and the "Israel from Yemen" theory
  • How To Upgrade HomeAssistant Core In A Python Venv Using uv
  • Ancestry - Paternal Side
  • Review of Wait Water Saver For Whole House Humidifiers
more

Most Comments

Most commented on articles ...

  • Another scam via Craigslist: offering more than asking price
  • Warning to female tourists thinking of marrying Egyptians
  • Craigslist classified for used car: Cheque fraud scam
  • Winning the lottery scam email: World Cup South African lottery
  • Email Scam: BMW 5 Series car and lottery winning
more

About Khalid

Various little bits of information ...

  • Khalid Baheyeldin: brief biography
  • Presentations and Talks
  • Youtube Videos
  • GitHub Projects
  • Drupal.org Profile
  • Astrophotography @ Flickr

Sponsored Links

Your Link Ad Here

Tags

Android Mobile Ubuntu Sony OnStep OpenWRT Router Ericsson COVID-19 Rogers Coronavirus Arabic Kubuntu Home Assistant GSM Telescope tablet Spectrum Scam Python 419 Laptop Firefox DIY CPU Conspiracy Comet Balkanization backup App
More

© Copyright 1999-2025 The Baheyeldin Dynasty. All rights reserved.
You can use our content under the Terms of Use.
Please read our privacy policy before you post any information on this site.
All posted articles and comments are copyright by their owner, and reflect their own views and opinions, which may not necessarily be consistent with the views and opinions of the owners of The Baheyeldin Dynasty.

Web site developed by 2bits.com Inc.