TP-LINK TL-WDR3600 HDD sharing, OPTWARE, DLNA, Torrent

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2, 3 ... 28, 29, 30  Next
Author Message
zsolt320i
DD-WRT Novice


Joined: 13 Oct 2013
Posts: 2

PostPosted: Sun Oct 13, 2013 8:19    Post subject: TP-LINK TL-WDR3600 HDD sharing, OPTWARE, DLNA, Torrent Reply with quote
Hi Guys!

I have got a TP-LINK TL-WDR3600, and I installed the last version of dd-wrt on it.
Until now it is working fine, but i would like to share my 1Tb nfts hdd, i would like to stream the movies from HDD with my Panasonic TV (via DLNA) and also i would like to torrent with the router.

Could anybody help me, with Sharing, DLNA and torrent installation?


Thx!
Sponsor
msantos2007
DD-WRT User


Joined: 13 Oct 2009
Posts: 246

PostPosted: Sun Oct 13, 2013 18:36    Post subject: Full Guide Reply with quote
Update FEB-2018 For the latest builds, please see: TP-LINK TL-WDR3600 OPKG Entware + DLNA + Torrent



First of all, you need to ensure your router is on Build in between 25408 and 30731.

Then, you have to plan how to enable them one by one:

1. Existing features on DD-WRT Web Interface: Samba Sharing (Services - NAS);
2. Optware (OPKG);
3. MiniDLNA (DLNA Server);
4. Transmission (Torrent Client).

Optware + MiniDLNA + Transmission
Snapshot Repository
28-OCT-2016 - Build 25408 ~ 30731

Update 28-OCT-2016: Thanks to myself Wink. Script Revision for Build 30731
Update 21-JUN-2016: Big Thanks to petoniano. Script Revision
Update 23-MAY-2016: Big Thanks to dejavubr. Script Revision for Build 29739 - New Item: 7 - Alternative Repositories
Update 09-MAY-2016: Big Thanks to ArturDent, williamfa and js1662 - Script revision
Update 14-DEC-2014: Thanks to "xakep" - Script revision
Update 11-DEC-2014: Revision for EXT3
Update 29-NOV-2014: Big Thanks to "DarkGhostHunter", "js1662" and "InfoScav" - Script Revision for Build 25408
Update 01-OCT-2014: Big Thanks to "kkuhle", "InfoScav" and "laurentiu.tns"
Update 22-AUG-2014: Script Revision for Build 24118
Update 30-MAY-2014: Versions Update
Update 06-APR-2014: Revision and improvements scripting for Build 23838
Update 24-MAR-2014: Thanks to "jirkavy", "Taboganist007" and "roliverio" - Working on build 23503
Update 28-JAN-2014: Thanks to "dulceata33", "andsus" and "peatkoterz"
Update 22-OCT-2013: Thanks to "snoop86"

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 Build in between 25408 and 30731, flashed and working.

0.0.1 Also Works with the following devices (not tested, but reported):

- TP Link WDR4300
- TP Link Archer C7
- Netgear WNDR3700

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 : 14 GB (unallocated space)
- File System : NTFS or EXT3
- Create As : Primary
- Partition Label: Data (or whatever label you want to, but Optware)

0.2.2 Second Partition

- Partition Size : 100 MB
- File System : NTFS or EXT3
- Create As : Primary
- Partition Label: System (or whatever label you want to, but Optware)

0.3 DD-WRT Web Interface

0.3.1 Enable SSH (SSHd): [Services] > [Services] > [Secure Shell]

0.3.2 Enable Samba Sharing: [Services] > [NAS]

0.4 Router: stick the USB thumbdrive on router and reboot it.

0.5 Wait few seconds. Then make sure both [mnt/sda1] and [mnt/sda2] 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:

Code:

cd /tmp/mnt/sda1
touch .optware.enable
cd /tmp/mnt/sda2
mkdir etc opt root bin lib usr
touch .optware.enable
chmod 755 etc opt root bin lib usr
mkdir opt/lib
chmod 755 opt/lib
cp -a /etc/* /tmp/mnt/sda2/etc/
cp -a /bin/* /tmp/mnt/sda2/bin/
cp -a /lib/* /tmp/mnt/sda2/lib/
cp -a /usr/* /tmp/mnt/sda2/usr/
sleep 5
mount -o bind /tmp/mnt/sda2/etc /etc
mount -o bind /tmp/mnt/sda2/bin /bin
mount -o bind /tmp/mnt/sda2/lib /lib
mount -o bind /tmp/mnt/sda2/usr /usr
mount -o bind /tmp/mnt/sda2/opt /jffs



1.1.1 Download, extract the following "functions.zip" file and copy "functions.sh" file to [/tmp/mnt/sda2/lib/] directory:

Download functions.zip - In case of broken link: attachments at the end of this post. Or create the file: http://pastebin.com/Unw9Nynf

[Note] If a "Read-only file system" error occours, you'll have either rename the existing "functions.sh" to "functions.sh_" or delete it before copying your downloaded file.

1.1.2 Run the following line-by-line, using PuTTY:

Code:

cd /tmp
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/uclibcxx_0.2.4-2_ar71xx.ipk
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/libc_1.1.14-1_ar71xx.ipk
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/opkg_9c97d5ecd795709c8584e972bfdf3aee3a5b846d-12_ar71xx.ipk

ipkg -d / -force-depends install uclibcxx_0.2.4-2_ar71xx.ipk
ipkg -d / install libc_1.1.14-1_ar71xx.ipk
ipkg -d / install opkg_9c97d5ecd795709c8584e972bfdf3aee3a5b846d-12_ar71xx.ipk


You should see:
Quote:

Connecting to downloads.openwrt.org (78.24.191.177:80)
uclibcxx_0.2.4-2_ar7 100% |*******************************| 70627 0:00:00 ETA

Connecting to downloads.openwrt.org (78.24.191.177:80)
libc_1.1.14-1_ar71xx 100% |*******************************| 268k 0:00:00 ETA

Connecting to downloads.openwrt.org (78.24.191.177:80)
opkg_9c97d5ecd795709 100% |*******************************| 55699 0:00:00 ETA

ipkg_depends: ERROR: Package name uclibcxx_0.2.4-2_ar71xx.ipk contains illegal characters (should be [a-z0-9.+-])
Unpacking uclibcxx_0.2.4-2_ar71xx.ipk...Done.
Configuring uclibcxx_0.2.4-2_ar71xx.ipk...Done.

ipkg_depends: ERROR: Package name libc_1.1.14-1_ar71xx.ipk contains illegal characters (should be [a-z0-9.+-])
Unpacking libc_1.1.14-1_ar71xx.ipk...Done.
Configuring libc_1.1.14-1_ar71xx.ipk...Done.

ERROR: File not found: //usr/local/lib/ipkg/lists/barrier_breaker
You probably want to run `ipkg update'
Unpacking opkg...Done.
Configuring opkg...Done.


Code:

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


Code:

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


You should see:
Quote:

Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/packages.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base//Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/base.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/designated_driver_base.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/kernel/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/designated_driver_kernel.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/luci/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/designated_driver_luci.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/management/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/designated_driver_management.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/designated_driver_packages.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/routing/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/designated_driver_routing.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/telephony/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/designated_driver_telephony.


Code:

cat > /tmp/mnt/sda2/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".

Code:

#! /bin/sh
sleep 10
 if [ -f /mnt/sda1/.optware.enable ]; then
  if [ -f /mnt/sda2/.optware.enable ]; then
    mount -o bind /tmp/mnt/sda2/bin  /bin
    mount -o bind /tmp/mnt/sda2/etc  /etc
    mount -o bind /tmp/mnt/sda2/lib  /lib
    mount -o bind /tmp/mnt/sda2/opt  /opt
    mount -o bind /tmp/mnt/sda2/usr  /usr
    mount -o bind /tmp/mnt/sda2/root /tmp/root
   sleep 2
  else
   exit
  fi
 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 Using PuTTY, you should see a colorful prompt (in red and blue). Run the following:

Code:

opkg update


You should see:
Quote:

http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/packages.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base//Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/base.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/designated_driver_base.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/kernel/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/designated_driver_kernel.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/luci/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/designated_driver_luci.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/management/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/designated_driver_management.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/designated_driver_packages.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/routing/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/designated_driver_routing.
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/telephony/Packages.gz.
Updated list of available packages in /opt/tmp/var/opkg-lists/designated_driver_telephony.


1.5 Preventing "Segmentation fault" error:

1.5.1 Run the following, using PuTTY:

Code:

cd /tmp
wget http://downloads.openwrt.org/barrier_breaker/14.07-rc3/ar71xx/generic/packages/libc_0.9.33.2-1_ar71xx.ipk
opkg install libc_0.9.33.2-1_ar71xx.ipk


You should see:
Quote:

Connecting to downloads.openwrt.org (78.24.191.177:80)
libc_0.9.33.2-1_ar71 100% |*******************************| 219k 0:00:00 ETA

Installing libc (0.9.33.2-1) to root...
Installing libgcc (5.3.0-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/libgcc_5.3.0-1_ar71xx.ipk.
Configuring libgcc.
Configuring libc.


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

2.1 Run the following, using PuTTY:

Code:

opkg update
opkg install minidlna


You should see:
Quote:

Installing minidlna (1.1.5-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/minidlna_1.1.5-1_ar71xx.ipk.
Installing libpthread (1.1.14-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/libpthread_1.1.14-1_ar71xx.ipk.
Installing libexif (0.6.21-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/libexif_0.6.21-1_ar71xx.ipk.
Installing libjpeg (9a-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/libjpeg_9a-1_ar71xx.ipk.
Installing libsqlite3 (3120200-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/libsqlite3_3120200-1_ar71xx.ipk.
Installing libffmpeg-mini (2.7.6-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/libffmpeg-mini_2.7.6-1_ar71xx.ipk.
Installing zlib (1.2.8-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/zlib_1.2.8-1_ar71xx.ipk.
Installing libbz2 (1.0.6-2) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/libbz2_1.0.6-2_ar71xx.ipk.
Installing libid3tag (0.15.1b-4) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/libid3tag_0.15.1b-4_ar71xx.ipk.
Installing libflac (1.3.1-3) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/libflac_1.3.1-3_ar71xx.ipk.
Installing libvorbis (1.3.5-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/libvorbis_1.3.5-1_ar71xx.ipk.
Installing libogg (1.3.2-2) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/libogg_1.3.2-2_ar71xx.ipk.
Installing libuuid (2.28-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/libuuid_2.28-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.


Code:

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


2.2 You need to create a new [/opt/etc/config/minidlna.conf] file, with WinSCP, using the following content:

Code:

#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/sda1/dlna/Music
media_dir=V,/mnt/sda1/dlna/Videos
media_dir=P,/mnt/sda1/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/sda1/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.3 Test it, running the following, using PuTTY:

Code:

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.4 Paste the following on DD-WRT Web interface, Administration - Commands. Click "Save Startup".

Code:

#! /bin/sh
sleep 10
 if [ -f /mnt/sda1/.optware.enable ]; then
  if [ -f /mnt/sda2/.optware.enable ]; then
    mount -o bind /tmp/mnt/sda2/bin  /bin
    mount -o bind /tmp/mnt/sda2/etc  /etc
    mount -o bind /tmp/mnt/sda2/lib  /lib
    mount -o bind /tmp/mnt/sda2/opt  /opt
    mount -o bind /tmp/mnt/sda2/usr  /usr
    mount -o bind /tmp/mnt/sda2/root /tmp/root
   sleep 2
  else
   exit
  fi
 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'
  if [ -f /tmp/mnt/sda1/.minidlna.enable ]; then
   sleep 2
   minidlna -f /opt/etc/config/minidlna.conf
  else
   exit
  fi
 else
  exit
 fi


2.5 Reboot the router.

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

-------------------------------------------------------------------------------------------------
3. Transmission
-------------------------------------------------------------------------------------------------

3.1 Run the following, using PuTTY:

3.1.1 For Snapshot Repository:
Code:

opkg install transmission-daemon-openssl
opkg install transmission-web


3.1.2 For other repositories:
Code:

opkg install transmission-daemon
opkg install transmission-web


You should see:
Quote:

Installing transmission-daemon-openssl (2.92-2) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/packages/transmission-daemon-openssl_2.92-2_ar71xx.ipk.
Installing libcurl (7.48.0-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/libcurl_7.48.0-1_ar71xx.ipk.
Installing libpolarssl (1.3.16-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/libpolarssl_1.3.16-1_ar71xx.ipk.
Installing libevent2 (2.0.22-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/libevent2_2.0.22-1_ar71xx.ipk.
Installing librt (1.1.14-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/librt_1.1.14-1_ar71xx.ipk.
Installing libopenssl (1.0.2h-1) to root...
Downloading http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/base/libopenssl_1.0.2h-1_ar71xx.ipk.
Configuring libpolarssl.
Configuring libcurl.
Configuring libevent2.
Configuring librt.
Configuring libopenssl.
Configuring transmission-daemon-openssl.



Code:

transmission-daemon
sleep 20
killall transmission-daemon




3.2 Edit the existing [/tmp/mnt/sda2/root/.config/transmission-daemon/settings.json] file, with WinSCP, using the following

content:

Code:

{
    "alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": true,
    "blocklist-url": "http://www.example.com/blocklist",
    "cache-size-mb": 2,
    "dht-enabled": true,
    "download-dir": "/tmp/mnt/sda1/dlna/Videos",
    "download-limit": 100,
    "download-limit-enabled": 1,
    "download-queue-enabled": true,
    "download-queue-size": 5,
    "encryption": 2,
    "idle-seeding-limit": 30,
    "idle-seeding-limit-enabled": false,
    "incomplete-dir": "/tmp/root/Downloads",
    "incomplete-dir-enabled": false,
    "lpd-enabled": false,
    "max-peers-global": 35,
    "message-level": 2,
    "peer-congestion-algorithm": "",
    "peer-limit-global": 240,
    "peer-limit-per-torrent": 60,
    "peer-port": 25000,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": true,
    "port-forwarding-enabled": true,
    "preallocation": 1,
    "prefetch-enabled": 0,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
    "ratio-limit": 2,
    "ratio-limit-enabled": false,
    "rename-partial-files": true,
    "rpc-authentication-required": true,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-password": "guest",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "guest",
    "rpc-whitelist": "192.168.1.*",
    "rpc-whitelist-enabled": false,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "start-added-torrents": true,
    "trash-original-torrent-files": false,
    "umask": 18,
    "upload-limit": 200,
    "upload-limit-enabled": 1,
    "upload-slots-per-torrent": 14,
    "utp-enabled": true
}


3.3 Tests:

3.3.1 Run the following, using PuTTY:

Code:

export TRANSMISSION_WEB_HOME='/opt/usr/share/transmission/web/'
transmission-daemon


3.3.2 Access http://192.168.1.1:9091 (http://<your-router-ip>:9091).

Username: guest
Password: guest

3.3.2.1 Edit file [/tmp/mnt/sda2/root/.config/transmission-daemon/settings.json], using WinSCP: change user and password to whatever you need.

3.4 Edit file [/tmp/mnt/sda2/root/.profile], using WinSCP, adding the following:

Code:

export TRANSMISSION_WEB_HOME='/opt/usr/share/transmission/web/'


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

Code:

#! /bin/sh
sleep 10
 if [ -f /mnt/sda1/.optware.enable ]; then
  if [ -f /mnt/sda2/.optware.enable ]; then
    mount -o bind /tmp/mnt/sda2/bin  /bin
    mount -o bind /tmp/mnt/sda2/etc  /etc
    mount -o bind /tmp/mnt/sda2/lib  /lib
    mount -o bind /tmp/mnt/sda2/opt  /opt
    mount -o bind /tmp/mnt/sda2/usr  /usr
    mount -o bind /tmp/mnt/sda2/root /tmp/root
   sleep 2
  else
   exit
  fi
 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'
  export TRANSMISSION_WEB_HOME='/opt/usr/share/transmission/web/'
  if [ -f /tmp/mnt/sda1/.minidlna.enable ]; then
   sleep 2
   minidlna -f /opt/etc/config/minidlna.conf
   sleep 4
   transmission-daemon -g /mnt/sda2/root/.config/transmission-daemon/
  else
   exit
  fi
 else
  exit
 fi


3.6 You can allow Transmission be accessible over Internet (protected by user/password defined on step 3.3.2).

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

Code:

iptables -I INPUT -p TCP --dport 9091 -j ACCEPT


3.7 Reboot the router.

-------------------------------------------------------------------------------------------------
4. Troubleshooting: Web Interface misconfigured after DD-WRT Upgrade
-------------------------------------------------------------------------------------------------

Usually, the DD-WRT Web interface gets misconfigured and it becomes unaccessible, when Optware is installed and enabled. Then, you have to follow a procedure in order to fix it.

If your router have Optware and you are planning to upgrade DD-WRT Firmware, you can go through the folloing steps in order to prevent such undesired behavior, easily:

4.1 Please get access to the DD-WRT Web interface. Go to Services, USB;

4.2 Disable "Core USB Support". Hit [Save] and then [Apply Settings];

4.3 Proceed upgrading DD-WRT with the latest firmware, previously downloaded. The router will reboot automatically, as usual;

4.4 Please get access to the DD-WRT Web interface again. Go to Services, USB;

4.5 Enable "Core USB Support" back. Hit [Save] and then [Apply Settings]. Disk info will be displayed in few seconds;

4.6 Login PuTTY and WinSCP;

4.7 Delete /etc on /mnt/sda2/ directory;

4.7.1 It's less effective, but you can also remove /etc with PuTTY, running:
Code:

rm -R /mnt/sda2/etc/*

4.8 Run the following, using PuTTY:
Code:

cd /tmp/mnt/sda2
mkdir etc
chmod 755 etc
cp -a /etc/* /tmp/mnt/sda2/etc/

4.9 Wait to finish the copy and then run:
Code:

reboot


It will load the DD-WRT Web interface right way.


-------------------------------------------------------------------------------------------------
5. Known Issues and improvements
-------------------------------------------------------------------------------------------------

5.1 SSH with public/private keys:
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=903272#903272

5.2 No colorful prompt after reboot or "opkg: not found":
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=888946#888946
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=879903#879903

5.3 Pyload: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=268205

5.4 DD-WRT Build 24461 - DD-WRT Webrevert Bug: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=915801#915801

5.5 DD-WRT Build 24461 - Instructions: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=919878#919878

5.6 Upgrade to EXT3: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=936687#936687

5.7 TV won't play subtitles: http://dd-wrt.com/phpBB2/viewtopic.php?p=944816#944816

-------------------------------------------------------------------------------------------------
6. Backup and Restore - DO NOT SHARE your archive files!
-------------------------------------------------------------------------------------------------

Do not share your archive files. It might contain all your personal configuration, users and passwords, domains, IP and so on. Associate your DD-WRT revision by naming your archive file accordingly. Once all DD-WRT files and directories are on the archive file, you will encounter a webinterface issue, if you extract it on top of other DD-WRT build.


6.1 Backup - Creating an archive name "bkp_optware_ddwrt_r24118.tgz" on "/tmp". It will be available as long as your router is powered up ("/tmp" is RAM). Use WinSCP
to get a copy on your computer.

6.1.1 Run the following, using PuTTY:
Code:

cd /mnt/sda2/
tar -cv -f /tmp/bkp_optware_ddwrt_r24118.tgz .



6.2 Restore - Use WinSCP to copy an archive from your computer to "/tmp".

6.2.1 Run the following, using PuTTY:
Code:

cd /mnt/sda2
tar -xv -f /tmp/bkp_optware_ddwrt_r24118.tgz


6.2.2 If the partition for Media, "/tmp/mnt/sda1", needs to be recreated, please run the following, using PuTTY:
Code:

touch /tmp/mnt/sda1/.minidlna.enable
touch /tmp/mnt/sda1/.optware.enable
mkdir -p /tmp/mnt/sda1/dlna/Pictures
mkdir -p /tmp/mnt/sda1/dlna/Music
mkdir -p /tmp/mnt/sda1/dlna/Videos


-------------------------------------------------------------------------------------------------
7. Alternative Repositories
-------------------------------------------------------------------------------------------------

Sometimes some repositories became temporally unavailable or script brings us weird errors. We can aways make use of others repositories from OpenWRT. Changes on the above script have to be made by replacing only the Item 1.1.2, as follows:

7.1 Chaos Calmer

Code:

cd /tmp
wget http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/base/uclibcxx_0.2.4-1_ar71xx.ipk
wget http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/base/libc_0.9.33.2-1_ar71xx.ipk
wget http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/base/opkg_9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7_ar71xx.ipk

ipkg -d / -force-depends install uclibcxx_0.2.4-1_ar71xx.ipk
ipkg -d / install libc_0.9.33.2-1_ar71xx.ipk
ipkg -d / install opkg_9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7_ar71xx.ipk


Code:

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


7.2 Barrier Breaker

Code:

cd /tmp
wget http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/uclibcxx_0.2.4-1_ar71xx.ipk
wget http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/libc_0.9.33.2-1_ar71xx.ipk
wget http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/opkg_9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7_ar71xx.ipk

ipkg -d / -force-depends install uclibcxx_0.2.4-1_ar71xx.ipk
ipkg -d / install libc_0.9.33.2-1_ar71xx.ipk
ipkg -d / install opkg_9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7_ar71xx.ipk


Code:

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


7.3 Barrier Breaker RC3

Code:

cd /tmp
wget http://downloads.openwrt.org/barrier_breaker/14.07-rc3/ar71xx/generic/packages/uclibcxx_0.2.4-1_ar71xx.ipk
wget http://downloads.openwrt.org/barrier_breaker/14.07-rc3/ar71xx/generic/packages/libc_0.9.33.2-1_ar71xx.ipk
wget http://downloads.openwrt.org/barrier_breaker/14.07-rc3/ar71xx/generic/packages/opkg_9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7_ar71xx.ipk

ipkg -d / -force-depends install uclibcxx_0.2.4-1_ar71xx.ipk
ipkg -d / install libc_0.9.33.2-1_ar71xx.ipk
ipkg -d / install opkg_9c97d5ecd795709c8584e972bfdf3aee3a5b846d-7_ar71xx.ipk


Code:

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


Of course, the results, as you should see, will vary accordingly.


-------------------------------------------------------------------------------------------------
-- Other info:
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=761349#761349
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=171227&highlight=

-- See also, for troubleshooting:
1. DD-WRT Wiki;
2. DD-WRT Forum Search.

Good Luck!
Marcelo - Brazil
-----------------------------------------------------
TP-Link WDR3600 b.30731 Gateway + DLNA + Transmission
TP-Link WDR3600 b.24508 VPN + DLNA + Transmission


Last edited by msantos2007 on Sun Feb 25, 2018 3:28; edited 57 times in total
iamsuperuser
DD-WRT Novice


Joined: 28 Sep 2013
Posts: 2

PostPosted: Tue Oct 15, 2013 9:43    Post subject: Reply with quote
@msantos2007

Excellent guide msantos2007 finally i got everything working successfully after following your guide.

Thank You Very Very Much for this.

As you know tl-wdr3600 has two usb ports i wanted to use the second usb port for printer.

Do i have to install the p910nd printer server through opkg

OR

Will the one in Services>USB>USB Printer Support will be sufficient?


What is the difference and what do you suggest?
msantos2007
DD-WRT User


Joined: 13 Oct 2009
Posts: 246

PostPosted: Tue Oct 15, 2013 13:46    Post subject: Thanks for your feedback. Reply with quote
I feel pleased for your success.

About Printer Driver: once you have build 22118 you should enable it on DD-WRT Web Interface only. No installation is required at all.

About Torrent Client: instructions allow you to manage torrents from an Android device (Remote Transmission, available on Google Play). You should open Port 9091 (NAT/QoS - Port Forwarding) if you want to manage it out of your LAN (3G for instance).

Thanks for your feedback!
Marcelo.
iamsuperuser
DD-WRT Novice


Joined: 28 Sep 2013
Posts: 2

PostPosted: Tue Oct 15, 2013 16:50    Post subject: Re: Thanks for your feedback. Reply with quote
msantos2007 wrote:
I feel pleased for your success.

About Printer Driver: once you have build 22118 you should enable it on DD-WRT Web Interface only. No installation is required at all.

About Torrent Client: instructions allow you to manage torrents from an Android device (Remote Transmission, available on Google Play). You should open Port 9091 (NAT/QoS - Port Forwarding) if you want to manage it out of your LAN (3G for instance).

Thanks for your feedback!
Marcelo.


Thanks for advice on transmission didn't know about it until u pointed it out.

I'm experiencing a lot of signal drops on 2.4GHZ band which is a pretty common question anyway, but still can you suggest any tweaks to stabilize the signal and improve range?
msantos2007
DD-WRT User


Joined: 13 Oct 2009
Posts: 246

PostPosted: Tue Oct 15, 2013 19:16    Post subject: Not happening Reply with quote
I'm sorry to hear that and I'm positive it is not related to Optware. For instance, I'm not experiencing that, so I can't suggest anything other than reset your router (30-30-30) and start over.
snoop86
DD-WRT Novice


Joined: 10 Jan 2013
Posts: 3

PostPosted: Mon Oct 21, 2013 1:18    Post subject: Reply with quote
@msantos

I wanna thank you very much for this instructions!

I installed Optware, minidlna and transmission today succesfully on TP-Link WDR4300 and also on TP-Link WR1043ND, so i can confirm that it works!

I use on both my Routers dd-wrt Build 22118


I just wanna point two things out which occurred during my installation, so it may help others...
1. the url for the opkg package changed a lil bit, so intead of opkg_618-3_.... it is now opkg_618-6...
correct version looks like this:
Code:
wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/opkg_618-6_ar71xx.ipk


2. when I installed Transmission on the wr1043nd, after reboot it didnt start transmisson deamon automatically. I found out that the sleeping time between minidlna start and transmisson deamon was set a lil to short (2 sec) in the startup command... I think its because of the wr1043nd's hardware (400Mhz, 32MB Ram), so I increased the sleeping to 4 and since then, the deamon starts automatically after reboot!

correct version for startup command:
Code:
#! /bin/sh
sleep 6
 if [ -f /mnt/sda1/optware.enable ]; then
  if [ -f /mnt/sda2/optware.enable ]; then
   mount -o bind /tmp/mnt/sda2/etc /etc
   sleep 1
   mount -o bind /tmp/mnt/sda2/root /tmp/root
   sleep 1
   mount -o bind /tmp/mnt/sda2/opt /opt
   sleep 2
  else
   exit
  fi
 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'
  export TRANSMISSION_WEB_HOME='/opt/usr/share/transmission/web/'
  if [ -f /tmp/mnt/sda1/minidlna.enable ]; then
   sleep 2
   minidlna -f /opt/etc/config/minidlna.conf -R
   sleep 4
   transmission-daemon -g /mnt/sda2/root/.config/transmission-daemon/
  else
   exit
  fi
 else
  exit
 fi


Next I'm gonna try to install pyload on my routers... Smile
msantos2007
DD-WRT User


Joined: 13 Oct 2009
Posts: 246

PostPosted: Tue Oct 22, 2013 18:02    Post subject: Reply with quote
snoop86 wrote:
@msantos

I wanna thank you very much for this instructions!

I installed Optware, minidlna and transmission today succesfully on TP-Link WDR4300 and also on TP-Link WR1043ND, so i can confirm that it works!
[...]

Next I'm gonna try to install pyload on my routers... Smile


An update has been made as you pointed.

Big thanks for your feedback!
Marcelo.
nikonlinux
DD-WRT Novice


Joined: 24 Oct 2013
Posts: 1

PostPosted: Thu Oct 24, 2013 14:16    Post subject: Reply with quote
My router: TP-Link TL-WDR4300
DD-WRT version: DD-WRT v24-sp2 (07/24/13) std build 22118

The router has two usb ports. I've attached a usb hdd of 1TB which is detected fine but it has only single partition.

In the process you have mentioned a 16gb thumb drive. Do I need to use this thumb drive other than the 1TB HDD that I've attached to the router?

This might seem like a noob question because it is coming from a noob.

thanks
msantos2007
DD-WRT User


Joined: 13 Oct 2009
Posts: 246

PostPosted: Thu Oct 24, 2013 18:44    Post subject: Reply with quote
nikonlinux,

Absolutely! You can always install, setup and run everything on the same partition, but you ought to replace every mount point from "/mnt/sda2" to "/mnt/sda1" in above script.

Rgs, Marcelo.
Schuppenzot
DD-WRT Novice


Joined: 24 Oct 2013
Posts: 2

PostPosted: Fri Oct 25, 2013 19:49    Post subject: Thanks! Reply with quote
THANK YOU!!! I finally found a guide that worked for me.

I can confirm that this guide is working on a TP-Link TL-WR1043ND, running DD-WRT build 22118. I only needed minidlna though.

The only (minor) change I made was to change the mount pount for sda2 to /opt so the automount could do it's work.
msantos2007
DD-WRT User


Joined: 13 Oct 2009
Posts: 246

PostPosted: Fri Oct 25, 2013 23:11    Post subject: Reply with quote
Schuppenzot,

Thank you for your feedback!

Best Regards,
Marcelo.
Utakka
DD-WRT Novice


Joined: 02 Dec 2013
Posts: 2

PostPosted: Mon Dec 02, 2013 18:07    Post subject: Reply with quote
Hey msantos2007,

Would it be possible to install Optware and MiniDLNA not on USB Device (sda2 in your example) but directly on the TP-Link Router?

Actually there is 99 MB of free space on my TL-WDR3600, which may be enough.

Thanks!
msantos2007
DD-WRT User


Joined: 13 Oct 2009
Posts: 246

PostPosted: Mon Dec 02, 2013 19:17    Post subject: Reply with quote
Utakka,

No, unfortunately it is not possible. AFAICT, those 99MB you are seeing must be RAM (total 128MB). Anything installed on it should be lost on the next reboot.

Remember, you can aways install OPKG and its packages on the same partitition of your USB attached HDD.

Best Regard,

Marcelo.
Utakka
DD-WRT Novice


Joined: 02 Dec 2013
Posts: 2

PostPosted: Tue Dec 03, 2013 8:03    Post subject: Reply with quote
Okay, you are right. Of course its RAM.

Thank you very much.
Goto page 1, 2, 3 ... 28, 29, 30  Next Display posts from previous:    Page 1 of 30
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