{"id":615,"date":"2015-10-03T21:48:15","date_gmt":"2015-10-03T13:48:15","guid":{"rendered":"http:\/\/blog.boviner.com\/?p=615"},"modified":"2015-10-03T21:48:15","modified_gmt":"2015-10-03T13:48:15","slug":"setting-up-dd-wrt-on-d-link-dir-868l","status":"publish","type":"post","link":"https:\/\/tongwing.woon.sg\/blog\/setting-up-dd-wrt-on-d-link-dir-868l\/","title":{"rendered":"Setting up DD-WRT on D-Link DIR-868L"},"content":{"rendered":"<p>Just got the great looking D-Link DIR-868L free recently from a broadband package that I signed up.<br \/>\n<a href=\"http:\/\/blog.boviner.com\/wp-content\/uploads\/2015\/10\/DIR-868L-A1-Image-L-Side-Left-.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/blog.boviner.com\/wp-content\/uploads\/2015\/10\/DIR-868L-A1-Image-L-Side-Left--187x300.jpg\" alt=\"DIR-868L-A1-Image-L-Side-Left-\" width=\"187\" height=\"300\" class=\"aligncenter size-medium wp-image-616\" srcset=\"https:\/\/tongwing.woon.sg\/blog\/wp-content\/uploads\/2015\/10\/DIR-868L-A1-Image-L-Side-Left--187x300.jpg 187w, https:\/\/tongwing.woon.sg\/blog\/wp-content\/uploads\/2015\/10\/DIR-868L-A1-Image-L-Side-Left--640x1024.jpg 640w, https:\/\/tongwing.woon.sg\/blog\/wp-content\/uploads\/2015\/10\/DIR-868L-A1-Image-L-Side-Left--624x999.jpg 624w, https:\/\/tongwing.woon.sg\/blog\/wp-content\/uploads\/2015\/10\/DIR-868L-A1-Image-L-Side-Left-.jpg 830w\" sizes=\"(max-width: 187px) 100vw, 187px\" \/><\/a><\/p>\n<p>It&#8217;s an amazing router that has <a href=\"http:\/\/www.cnet.com\/products\/d-link-dir-868l-wireless-ac1750-dual-band-gigabit-cloud-router\/\">great features<\/a> and performance. It also has great hardware specs, which makes it a perfect candidate for trying custom firmware like dd-wrt or OpenWrt. My preference would be to go for OpenWrt, unfortunately at this point of writing it is not supported. So it&#8217;s on to dd-wrt.<\/p>\n<p>Installation of dd-wrt firmware can be done by following <a href=\"http:\/\/www.dd-wrt.com\/wiki\/index.php\/D-Link_DIR-868L\">this wiki<\/a>. Try it at your own risk, and always have the stock firmware on hand in case it doesn&#8217;t work.<\/p>\n<p>Assuming you got this far, what&#8217;s next? Packages, naturally! To do that you have to first enable JFFS at the dd-wrt Administration tab. Next, let&#8217;s install something.<\/p>\n<p><code>root@xxxxxxxx:\/jffs\/tmp# ipkg update<br \/>\nmkdir: can't create directory '\/\/usr\/local\/lib\/': Read-only file system<\/p>\n<p>root@xxxxxxxx:~# ipkg install nano<br \/>\nroot@xxxxxxxx:~# nano<br \/>\n-sh: nano: not found<br \/>\n<\/code><\/p>\n<p>Uh oh. Turns out ipkg is broken on this firmware and a search turns up <a href=\"http:\/\/www.dd-wrt.com\/phpBB2\/viewtopic.php?p=503846\">other users<\/a> facing the <a href=\"http:\/\/www.dd-wrt.com\/phpBB2\/viewtopic.php?p=919944\">same issue<\/a>. Someone on the forums suggested opkg instead and that&#8217;s where I went. There are many forum posts, blog posts and wikis on this topic. The one that I&#8217;m using  is <a href=\"http:\/\/dd-wrt.com\/wiki\/index.php\/Optware_on_K3-AC-ARM\">this<\/a>. However, it doesn&#8217;t work out of the box else there won&#8217;t be this blog post :-).<\/p>\n<p>Following the instructions, you should reach a step that tells you to download a script and execute it. Going for the &#8220;not so brave people&#8221; approach,<\/p>\n<p><code>root@xxxxxxxx:\/jffs\/tmp# wget -q -O- http:\/\/debian.keithdunnett.net\/ddwrt\/optware_setup > optware_setup<br \/>\nroot@xxxxxxxx:\/jffs\/tmp# chmod 700 optware_setup<br \/>\nroot@xxxxxxxx:\/jffs\/tmp# .\/optware_setup<br \/>\nChecking we can reach the repository...<br \/>\n.\/optware_setup: line 15: can't create \/opt\/usr\/bin\/optware_boottime: nonexistent directory<br \/>\nchmod: \/opt\/usr\/bin\/optware_boottime: No such file or directory<br \/>\nMaking sure we have an initial opkg<br \/>\nConnecting to downloads.openwrt.org (78.24.191.177:443)<br \/>\nwget: server returned error: HTTP\/1.1 404 Not Found<br \/>\nConnecting to dev.openwrt.org (217.115.15.26:443)<br \/>\nwget: can't open '\/opt\/lib\/functions.sh': Read-only file system<br \/>\ntar: can't open 'opkg.ipk': No such file or directory<br \/>\ntar: can't open 'data.tar.gz': No such file or directory<br \/>\n<\/code><\/p>\n<p>Delving into the script, there are 2 problems. First, bind \/opt to \/jffs\/opt. Then change line 32 of the script to the updated link (look up the latest link <a href=\"https:\/\/downloads.openwrt.org\/snapshots\/trunk\/bcm53xx\/generic\/packages\/base\/\">here<\/a>).<\/p>\n<p><code>root@xxxxxxxx:\/jffs\/tmp# mount -o bind \/jffs\/opt \/opt<br \/>\nroot@xxxxxxxx:\/jffs\/tmp# vi optware_setup<br \/>\nchange to line 32:<br \/>\n`\/usr\/bin\/wget https:\/\/downloads.openwrt.org\/snapshots\/trunk\/bcm53xx\/generic\/packages\/base\/opkg_9c97d5ecd795709c8584e972bfdf3aee3a5b846d-10_bcm53xx.ipk -O opkg.ipk` \\<br \/>\n<\/code><\/p>\n<p>Let&#8217;s try again.<\/p>\n<p><code>root@xxxxxxxx:\/jffs\/tmp# .\/optware_setup<br \/>\nChecking we can reach the repository...<br \/>\nMaking sure we have an initial opkg<br \/>\nConnecting to downloads.openwrt.org (78.24.191.177:443)<br \/>\nopkg.ipk             100% |***********************************************************************************************************************| 59159   0:00:00 ETA<br \/>\nConnecting to dev.openwrt.org (217.115.15.26:443)<br \/>\nfunctions.sh         100% |***********************************************************************************************************************|  7274   0:00:00 ETA<br \/>\nCreating the opkg config file in \/opt\/etc\/opkg<br \/>\nYou are now ready to install packages using opkg (this session only).<br \/>\nI've installed a script, optware_boottime, to run on boot and make the opkg settings persistent.<br \/>\nI'll add this to the end of rc_startup in nvram for you.<br \/>\nDownloading http:\/\/downloads.openwrt.org\/snapshots\/trunk\/bcm53xx\/generic\/packages\/base\/Packages.gz.<br \/>\nUpdated list of available packages in var\/opkg-lists\/chaos_calmer_base.<br \/>\nDownloading http:\/\/downloads.openwrt.org\/snapshots\/trunk\/bcm53xx\/generic\/packages\/packages\/Packages.gz.<br \/>\nUpdated list of available packages in var\/opkg-lists\/chaos_calmer_packages.<br \/>\nDownloading http:\/\/downloads.openwrt.org\/snapshots\/trunk\/bcm53xx\/generic\/packages\/routing\/Packages.gz.<br \/>\nUpdated list of available packages in var\/opkg-lists\/chaos_calmer_routing.<br \/>\nDownloading http:\/\/downloads.openwrt.org\/snapshots\/trunk\/bcm53xx\/generic\/packages\/telephony\/Packages.gz.<br \/>\nUpdated list of available packages in var\/opkg-lists\/chaos_calmer_telephony.<br \/>\nMinimal setup is complete. You should now have a working opkg.<br \/>\nWe have created some aliases in your ~\/.profile to make everything work.<br \/>\nPlease either 'source .profile' or LOG OUT and LOG IN AGAIN before proceeding.<br \/>\n<\/code><\/p>\n<p>Success!<\/p>\n<p>PS: Note that you&#8217;ll need to add \/jffs\/opt to your fstab or something in order to mount \/opt on startup.<br \/>\nDisclaimer: I&#8217;m a vim user. nano is just an example \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just got the great looking D-Link DIR-868L free recently from a broadband package that I signed up. It&#8217;s an amazing router that has great features and performance. It also has great hardware specs, which makes it a perfect candidate for trying custom firmware like dd-wrt or OpenWrt. My preference would be to go for OpenWrt, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[17,18,19],"_links":{"self":[{"href":"https:\/\/tongwing.woon.sg\/blog\/wp-json\/wp\/v2\/posts\/615"}],"collection":[{"href":"https:\/\/tongwing.woon.sg\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tongwing.woon.sg\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tongwing.woon.sg\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tongwing.woon.sg\/blog\/wp-json\/wp\/v2\/comments?post=615"}],"version-history":[{"count":6,"href":"https:\/\/tongwing.woon.sg\/blog\/wp-json\/wp\/v2\/posts\/615\/revisions"}],"predecessor-version":[{"id":622,"href":"https:\/\/tongwing.woon.sg\/blog\/wp-json\/wp\/v2\/posts\/615\/revisions\/622"}],"wp:attachment":[{"href":"https:\/\/tongwing.woon.sg\/blog\/wp-json\/wp\/v2\/media?parent=615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tongwing.woon.sg\/blog\/wp-json\/wp\/v2\/categories?post=615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tongwing.woon.sg\/blog\/wp-json\/wp\/v2\/tags?post=615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}