DD-WRT on TP-Link TL-WDR3600 with DLNA??

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2  Next
Author Message
nossie
DD-WRT Novice


Joined: 13 Jun 2013
Posts: 5

PostPosted: Thu Jun 13, 2013 12:03    Post subject: DD-WRT on TP-Link TL-WDR3600 with DLNA?? Reply with quote
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.

Please inform me.

Thanks in advance.

Kind regards,

Nossie
Sponsor
msantos2007
DD-WRT User


Joined: 13 Oct 2009
Posts: 246

PostPosted: Sat Jun 15, 2013 1:06    Post subject: MiniDLNA Reply with quote
UPDATE 23-OCT-2013

Please see: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=177532


The following became obsolete, in part, due to changes made for DD-WRT build 22118. They were originaly written for build 21676.


If you decide to follow those steps, please remember to:

- Ignore step 0.3.2.
- Rename mounting points: /mnt/sda_part1 as /mnt/sda1
- Remove from Startup Command: "mount -t ext3 /dev/sda2 /tmp/mnt/sda_part2"


TL-WDR3600 is an amazing router, isn't it?

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!

More info: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=85237

I'm preparing a tutorial for TL-WDR3600 (and TL-WDR4300) based on the following URL and it is basically copy and paste.

More info: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=171227&highlight=optware+minidlna+transmission+wdr3600


Optware + MiniDLNA

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

cd /tmp
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libc_0.9.33.2-1_ar71xx.ipk
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/opkg_618-3_ar71xx.ipk
ipkg install libc_0.9.33.2-1_ar71xx.ipk opkg_618-3_ar71xx.ipk


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.



cat > /etc/opkg.conf << EOF
src/gz snapshots http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages
dest root /opt
dest ram /opt/tmp
lists_dir ext /opt/tmp/var/opkg-lists
EOF

umount /jffs
mount -o bind /tmp/mnt/sda_part1/root /tmp/root
mount -o bind /tmp/mnt/sda_part1/opt /opt
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
opkg update


You should see:

Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/snapshots.



cat > /tmp/mnt/sda_part1/root/.profile << EOF
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib:/opt/usr/local/lib'
export PATH='/sbin:/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/usr/bin:/usr/sbin:/opt/usr/local/bin'
export PS1='\[\033[01;31m\]\u@\h \[\033[01;34m\]\w \$ \[\033[00m\]'
export TERMINFO='/opt/usr/share/terminfo'
EOF


1.2 Paste the following on DD-WRT Web interface, Administration - Commands. Click "Save Startup".


#!/bin/sh
sleep 10
if [ -f /mnt/sda_part1/optware.enable ]; then
mkdir /tmp/mnt/sda_part2
sleep 2
mount -t ext3 /dev/sda2 /tmp/mnt/sda_part2
sleep 2
mount -o bind /tmp/mnt/sda_part1/etc /etc
sleep 1
mount -o bind /tmp/mnt/sda_part1/root /tmp/root
sleep 1
mount -o bind /tmp/mnt/sda_part1/opt /opt
sleep 2
else
exit
fi
if [ -d /opt/usr ]; then
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
export PATH='/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin'
else
exit
fi


1.3 Reboot the router.

1.4 Run the following, using PuTTY:


opkg update


You should see a colorful prompt (in red and blue).

You should see:

Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/snapshots.


-------------------------------------------------------------------------------------------------
2. MiniDLNA
-------------------------------------------------------------------------------------------------

2.1 Preventing "Segmentation fault" error (Part 1/2):

2.1.1 Run the following, using PuTTY:


cd /tmp
wget http://downloads.openwrt.org/backfire/10.03/ar71xx/packages/libc_0.9.30.1-42_ar71xx.ipk
opkg install libc_0.9.30.1-42_ar71xx.ipk


2.2 Run the following, using PuTTY:


opkg update
opkg install minidlna


You should see:

Installing minidlna (1.0.25-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/minidlna_1.0.25-1_ar71xx.ipk.
Installing libpthread (0.9.33.2-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libpthread_0.9.33.2-1_ar71xx.ipk.
.
.
.
Installing libuuid (2.21.2-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libuuid_2.21.2-1_ar71xx.ipk.
Configuring libjpeg.
Configuring libpthread.
Configuring libogg.
Configuring libexif.
Configuring libflac.
Configuring libvorbis.
Configuring libuuid.
Configuring libsqlite3.
Configuring zlib.
Configuring libbz2.
Configuring libffmpeg-mini.
Configuring libid3tag.
Configuring minidlna.



touch /tmp/mnt/sda_part1/minidlna.enable
touch /tmp/mnt/sda_part2/minidlna.enable
mkdir -p /tmp/mnt/sda_part2/dlna/Pictures
mkdir -p /tmp/mnt/sda_part2/dlna/Music
mkdir -p /tmp/mnt/sda_part2/dlna/Videos
rm /opt/etc/config/minidlna


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


2.4 Preventing "Segmentation fault" error (Part 2/2):

2.4.1 Type following, using PuTTY:


cd /tmp
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/libc_0.9.33.2-1_ar71xx.ipk
opkg install libc_0.9.33.2-1_ar71xx.ipk


You should see:

Upgrading libc on root from 0.9.30.1-42 to 0.9.33.2-1...
Removing obsolete file /opt/lib/libnsl.so.0.
Removing obsolete file /opt/lib/libnsl-0.9.30.1.so.
Removing obsolete file /opt/lib/ld-uClibc-0.9.30.1.so.
Removing obsolete file /opt/lib/libdl-0.9.30.1.so.
Removing obsolete file /opt/lib/libutil-0.9.30.1.so.
Removing obsolete file /opt/lib/libm-0.9.30.1.so.
Removing obsolete file /opt/lib/libresolv.so.0.
Removing obsolete file /opt/lib/libresolv-0.9.30.1.so.
Removing obsolete file /opt/lib/libuClibc-0.9.30.1.so.
Removing obsolete file /opt/lib/libcrypt-0.9.30.1.so.
Configuring libc.


2.5 Test it, typing the following, using PuTTY:


minidlna -f /opt/etc/config/minidlna.conf -R


You should see your DLNA client (e.g. Samsung TV) connected to your router in seconds.

2.6 Paste the following on DD-WRT Web interface, Administration - Commands. Click "Save Startup".


sleep 10
if [ -f /mnt/sda_part1/optware.enable ]; then
mkdir /tmp/mnt/sda_part2
sleep 2
mount -t ext3 /dev/sda2 /tmp/mnt/sda_part2
sleep 2
mount -o bind /tmp/mnt/sda_part1/etc /etc
sleep 1
mount -o bind /tmp/mnt/sda_part1/root /tmp/root
sleep 1
mount -o bind /tmp/mnt/sda_part1/opt /opt
sleep 2
else
exit
fi
if [ -d /opt/usr ]; then
export LD_LIBRARY_PATH='/opt/lib:/opt/usr/lib:/lib:/usr/lib'
export PATH='/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:/bin:/sbin:/usr/sbin:/usr/bin'
sleep 5
minidlna -f /opt/etc/config/minidlna.conf -R
else
exit
fi


2.7 Reboot the router.

You should see your DLNA client (e.g. Samsung TV) connected to your router in 60 seconds.


Good Luck!
Marcelo - Brazil.


Last edited by msantos2007 on Wed Oct 23, 2013 14:04; edited 9 times in total
nossie
DD-WRT Novice


Joined: 13 Jun 2013
Posts: 5

PostPosted: Sun Jun 23, 2013 11:05    Post subject: Reply with quote
WOOOWWW Shocked This is way to much for me.

I'm not so well, I have concentrating problems...so I think that it will go wrong....

But anyway...Thank you Marcelo, I'll hope other people have succes by using this 'How To' for the TP-Link TL-WDR3600.

Does the standard DD-WRT support any DLNA? Or does it only work with your 'How To'??

Thnx
Nossie
msantos2007
DD-WRT User


Joined: 13 Oct 2009
Posts: 246

PostPosted: Sun Jun 23, 2013 23:00    Post subject: Reply with quote
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.
kansanian
DD-WRT Novice


Joined: 14 Jun 2013
Posts: 9

PostPosted: Mon Jun 24, 2013 3:14    Post subject: Reply with quote
This looks interesting. Thanks for sharing! Does look like a tiny bit of work, but pretty cool.
msantos2007
DD-WRT User


Joined: 13 Oct 2009
Posts: 246

PostPosted: Mon Jun 24, 2013 3:41    Post subject: Thank you! Reply with quote
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.
Spudgun99
DD-WRT Novice


Joined: 30 May 2013
Posts: 5

PostPosted: Wed Jun 26, 2013 18:10    Post subject: Question Reply with quote
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.
msantos2007
DD-WRT User


Joined: 13 Oct 2009
Posts: 246

PostPosted: Thu Jun 27, 2013 1:19    Post subject: Any device is possible, but... Reply with quote
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.
Spudgun99
DD-WRT Novice


Joined: 30 May 2013
Posts: 5

PostPosted: Wed Jul 10, 2013 20:59    Post subject: opkg update error Reply with quote
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.
msantos2007
DD-WRT User


Joined: 13 Oct 2009
Posts: 246

PostPosted: Sat Jul 13, 2013 15:53    Post subject: "opkg update error": usually something was missed. Reply with quote
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.
unlucky1
DD-WRT User


Joined: 09 Mar 2013
Posts: 75

PostPosted: Sun Sep 01, 2013 1:31    Post subject: Reply with quote
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.

_________________
TP-Link TL-WDR4300 v1 (NAS) - r54682
Buffalo WZR-600DHP (Gateway, NAS, DDNS, DHCP) - r54682
Netgear R7800 (Gateway, DDNS, DHCP, DNSMASQ w/Pi Hole) - r54682
Netgear R7800 (AP) - r54682
msantos2007
DD-WRT User


Joined: 13 Oct 2009
Posts: 246

PostPosted: Sun Sep 01, 2013 17:06    Post subject: Reply with quote
unlucky1 wrote:
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.

Thank you for let us know about WDR4300.
unlucky1
DD-WRT User


Joined: 09 Mar 2013
Posts: 75

PostPosted: Sun Sep 01, 2013 17:36    Post subject: Reply with quote
Thanks for the update.

I couldn't see my drive/partitions 'til I made that change.

I probably messed up somewhere else and have latent error waiting for me. Par for course.

_________________
TP-Link TL-WDR4300 v1 (NAS) - r54682
Buffalo WZR-600DHP (Gateway, NAS, DDNS, DHCP) - r54682
Netgear R7800 (Gateway, DDNS, DHCP, DNSMASQ w/Pi Hole) - r54682
Netgear R7800 (AP) - r54682
unlucky1
DD-WRT User


Joined: 09 Mar 2013
Posts: 75

PostPosted: Wed Sep 11, 2013 1:44    Post subject: Re: MiniDLNA Reply with quote
msantos2007 wrote:
UPDATE 07-SEP-2013

The following became obsolete, in part, due to changes made for DD-WRT build 22118. They were originaly written for build 21676.

If you decide to follow those steps, please remember to:

- Ignore step 0.3.2.
- Rename mounting points: /mnt/sda_part1 as /mnt/sda1
- Remove from Startup Command: "mount -t ext3 /dev/sda2 /tmp/mnt/sda_part2"




So, basically, anywhere we see "sda_part1" change it to "sda1"? Is that it?

_________________
TP-Link TL-WDR4300 v1 (NAS) - r54682
Buffalo WZR-600DHP (Gateway, NAS, DDNS, DHCP) - r54682
Netgear R7800 (Gateway, DDNS, DHCP, DNSMASQ w/Pi Hole) - r54682
Netgear R7800 (AP) - r54682
msantos2007
DD-WRT User


Joined: 13 Oct 2009
Posts: 246

PostPosted: Wed Sep 11, 2013 23:49    Post subject: Re: MiniDLNA Reply with quote
unlucky1 wrote:
msantos2007 wrote:
UPDATE 07-SEP-2013

The following became obsolete, in part, due to changes made for DD-WRT build 22118. They were originaly written for build 21676.

If you decide to follow those steps, please remember to:

- Ignore step 0.3.2.
- Rename mounting points: /mnt/sda_part1 as /mnt/sda1
- Remove from Startup Command: "mount -t ext3 /dev/sda2 /tmp/mnt/sda_part2"




So, basically, anywhere we see "sda_part1" change it to "sda1"? Is that it?


Yep. And "sda_part2" to "sda2". Please let us know the results.

Thanks.
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum