Posted: Thu Jun 13, 2013 12:03 Post subject: DD-WRT on TP-Link TL-WDR3600 with DLNA??
Hi Everyone,
I like to use DD-WRT on my TP-Link TL-WDR3600.
I have never done something like this.
I've seen that 'upgrading'is very easy, just by upload the *.bin file.
What I like to know is if DLNA is standard supported in DD-WRT or do I have to do a lot of tricks and programming to install a mediaplayer or other DLNA supporting software or drivers?
The stock firmware from TP-Link does support DLNA but is not 100% compatible (problems with subtitles), thats why I like to try DD-WRT.
I ran into the same and I had MiniDLNA setup on a WDR3600 successfully with subtitles. The instructions are not user-friendly, but it won't require special skills to handle Linux, just reading.
After DD-WRT flashed on your router, you'll need to run Optware. Then, you are able to install MiniDLNA (also Torrent client and printer server)
Remember, you can always revert back to stock firmware. But I'm sure you won't want to do it - DD-WRT rocks!
Please read the following instructions before taking any action. That will be good for you getting used to them.
-------------------------------------------------------------------------------------------------
0. Hardware and Prerequisites
-------------------------------------------------------------------------------------------------
0.0 TP-Link WDR3600-N600 - v1.1: Have DD-WRT v24-sp2 (05/27/13) std - build 21676 flashed and working
0.1 PuTTY and WinSCP: Google, download and make them ready for use
0.2 Kingston 16GB - DT101/G2: Create two partitions on the USB thumbdrive, using MiniTool Partition Wizard for example.
0.2.1 First Partition
- Partition Size : 100 MB
- File System : EXT3
- Create As : Primary
- Partition Label: Optware (or whatever label you want)
0.2.2 Second Partition
- Partition Size : 14 GB (unallocated space)
- File System : EXT3
- Create As : Primary
- Partition Label: Data (or whatever label you want)
0.3 DD-WRT Web Interface
0.3.1 Enable SSH
0.3.2 Paste the following script on "Command Shell" and click "Save Startup" (under Administration - Commands), due to DD-WRT won't mount the second partition.
sleep 10
mkdir /tmp/mnt/sda_part2
mount -t ext3 /dev/sda2 /mnt/sda_part2
0.4 Router: stick the USB thumbdrive on router and reboot it.
0.5 Wait few seconds. Then make sure both [mnt/sda_part1] and [mnt/sda_part2] are mounted on the router and shared by Samba (from DD-WRT Web Interface)
-------------------------------------------------------------------------------------------------
1. Optware
-------------------------------------------------------------------------------------------------
1.1 Run the following line-by-line, using PuTTY:
cd /tmp/mnt/sda_part1
mkdir etc opt root useful
touch optware.enable
chmod 755 etc opt root
mkdir opt/lib
chmod 755 opt/lib
cp -a /etc/* /tmp/mnt/sda_part1/etc/
sleep 15
mount -o bind /tmp/mnt/sda_part1/etc /etc
mount -o bind /tmp/mnt/sda_part1/opt /jffs
You should see:
Connecting to downloads.openwrt.org (78.24.191.177:80)
libc_0.9.33.2-1_ar71 100% |*******************************| 217k 0:00:00 ETA
Connecting to downloads.openwrt.org (78.24.191.177:80)
opkg_618-3_ar71xx.ip 100% |*******************************| 57322 0:00:00 ETA
ERROR: File not found: //usr/local/lib/ipkg/lists/whiterussian
You probably want to run `ipkg update'
ERROR: File not found: //usr/local/lib/ipkg/lists/non-free
You probably want to run `ipkg update'
ERROR: File not found: //usr/local/lib/ipkg/lists/backports
You probably want to run `ipkg update'
/bin/ipkg: line 1184: sort: not found
Unpacking libc...Done.
Configuring libc...Done.
ERROR: File not found: //usr/local/lib/ipkg/lists/whiterussian
You probably want to run `ipkg update'
ERROR: File not found: //usr/local/lib/ipkg/lists/non-free
You probably want to run `ipkg update'
ERROR: File not found: //usr/local/lib/ipkg/lists/backports
You probably want to run `ipkg update'
/bin/ipkg: line 1184: sort: not found
Unpacking opkg...Done.
Configuring opkg...Done.
2.3 You need to create a new [/opt/etc/config/minidlna.conf] file, with WinSCP, using the following content:
#port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200
# network interface to bind to (this is the only interface that will serve files)
network_interface=br0
# set this to the directory you want scanned.
# * if have multiple directories, you can have multiple media_dir= lines
# * if you want to restrict a media_dir to a specific content type, you
# can prepend the type, followed by a comma, to the directory:
# + "A" for audio (eg. media_dir=A,/home/jmaggard/Music)
# + "V" for video (eg. media_dir=V,/home/jmaggard/Videos)
# + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)
media_dir=A,/mnt/sda_part2/dlna/Music
media_dir=V,/mnt/sda_part2/dlna/Videos
media_dir=P,/mnt/sda_part2/dlna/Pictures
# set this if you want to customize the name that shows up on your clients
friendly_name=Media Server
# set this if you would like to specify the directory where you want MiniDLNA to store its database and alb
db_dir=/mnt/sda_part2/dlna
#/mnt/tmp/minidlna
# this should be a list of file names to check for when searching for album art
# note: names should be delimited with a forward slash ("/")
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg
# set this to no to disable inotify monitoring to automatically discover new files
# note: the default is yes
inotify=yes
# set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
enable_tivo=no
# set this to strictly adhere to DLNA standards.
# * This will allow server-side downscaling of very large JPEG images,
# which may hurt JPEG serving performance on (at least) Sony DLNA products.
strict_dlna=no
# default presentation url is http address on port 80
presentation_url=http://192.168.1.1:8200/
# notify interval in seconds. default is 895 seconds.
notify_interval=895
# serial and model number the daemon will report to clients
# in its XML description
serial=12345678
model_number=1
LOL. I've advised it is not user-friendly but don't worry: if anything go wrong, just remove your USB flashdrive, reboot your router and restore the latest configuration settings (back it up first).
There is not native DLNA support on DD-WRT for our router yet and above "How-to" is the only known way to achieve it.
Posted: Mon Jun 24, 2013 3:41 Post subject: Thank you!
Yes, people who mess with Optware on Atheros chipset have to go through that because it is a workaround due to Optware was not intended to work with on the chipset and also standard DD-WRT + Optware wouldn't fit on a 8MB firmware, I guess.
Doing the steps 3 or 4 times before getting used to it would be acceptable. But it is pretty straightforward.
Posted: Wed Jun 26, 2013 18:10 Post subject: Question
How can this protocol be applied to a usb hdd? I have a 500Gb hdd and want to run it instead of a flash drive. I would like to be able to store all of my movies on that and play them over my PS3 rather than filling up the hdd on the ps3 or streaming from my computer.
Posted: Thu Jun 27, 2013 1:19 Post subject: Any device is possible, but...
I haven't tested, but it's possible as long as you change the code above a little bit.
Before anything, what you have to do is connect your HDD on USB port and run "df" on PuTTY in order to get the right device names.
A USB flashdrive with a single partition, sticked on the primary USB port (the closest to the router's power cable) is "seen" as "/dev/sda". And it's first partition should be "/dev/sda1" mounted on "/tmp/mnt/sda_part1".
As my USB flashdrive has two partitions, I got the following when "df" was run:
Code:
Filesystem 1K-blocks Used Available Use% Mounted on
...
/dev/sda1 14971900 7354540 7617360 49% /tmp/mnt/sda_part1
/dev/sda2 136192 17187 119005 13% /tmp/mnt/sda_part2
...
That way, everytime you see "/mnt/sda_part1" on the "How-to", it should be the same as "/tmp/mnt/sda_part1"; And "/mnt/sda_part2" as "/tmp/mnt/sda_part2".
You can do the same, taking note the results and perform a find-replace on the "How-to".
Keep in mind that the first partition ("/sda_part1/") was reserved for Optware only (organization purpose) and Data is stored on the second partition ("/sda_part2").
It is not an obligation. You can always keep all together on a single partition.
I followed the guide and everything worked fine until the first restart. I logged back into ssh and ran the opk update command, but I got an error that opkg wasn't found. Any advice would be much appreciated. Also for others wanting to do the same thing, the ext3 file system works much better for NAS file transfer speeds than does fat32 or ntfs.
Posted: Sat Jul 13, 2013 15:53 Post subject: "opkg update error": usually something was missed.
Usually something was missed.
Please partition and format your USB flashdrive again and try running commands line-by-line, in order to give the flashdrive time to write information.
Those "sleep" commands were included due to the same problems you're getting. You can always increase them.
I ran the "How-to" about 8-9 times before getting it to work (and then I posted it). Please be patient.
This procedure worked for installing Optware on my WDR-4300. Only thing I had to do was to make sure Automount was enabled and set to /mnt.
Thanks for your help.
Your remarks were prevented at "0. Hardware and Prerequisites" session.
Please be aware that if we update DD-WRT to build 22118, some commands won't be necessary and others will have to be changed like mounting commands and partition names. I'm still testing build 22118 and I'll update the instructions when I feel positive it is stable.