Easy MiniDLNA for WZR-HP-G300NH

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Author Message
boke
DD-WRT Novice


Joined: 22 Feb 2007
Posts: 34

PostPosted: Wed Jan 12, 2011 5:19    Post subject: Easy MiniDLNA for WZR-HP-G300NH Reply with quote
Here is a somewhat easy way to get MiniDLNA up and running.

UPDATE:
I have changed this to use ipkg to install.
You can install to /mnt /opt or where ever you would like.
ipkg will update the correct paths in the start script and minidlna.conf for you.

UPDATE: 1/30/11
The install no longer rescans on reboot.
To force a rescan, assuming you installed to /mnt,
just put /mnt/minidlna/rescan into the dd-wrt command shell.

I set this up on my WZR-HP-G300NH, DD-WRT build 15962, Kernel 2.6.
inotify works with this version. It may or may not work with older versions, I have not tested them.
It will not run on the older 2.4 Kernel.

Format your hard drive. I suggest using ext3, ntfs works but is very slow compared to ext3.
Copy easyminidlna_0.1_mips.ipk (attached below as easydlna.zip) to your hard drive (Or wait until you have enabled samba).
Plug it into your router.

Log in to the DD-WRT admin webpage.

Enable Samba under Services->NAS->File Sharing.
Server String = Whatever you want
Workgroup = WORKGROUP
Path to Files = /mnt
Public Share = Enable
Readonly = Disable
Apply Settings

Enable Core USB Support under Services->USB->USB Support.
USB 2.0 Support = Enable
USB Storage Support = Enable
Automatic Drive Mount = Enable
Run-on-mount Script Name = /mnt/minidlna/start
Disk Mount Point = /mnt
Apply Settings

Go to Administration->Management scroll down to the bottom and click Reboot Router.

If you haven't already done so, use samba or SCP to copy easyminidlna_0.1_mips.ipk to the hard drive.

Use Telnet or SSH to login to DD-WRT and type or paste in the commands below.

ipkg -dest /mnt install /mnt/easyminidlna_0.1_mips.ipk
/mnt/minidlna/start


ipkg will throw out a few errors.. They are harmless.
ipkg will create a "usr" and "tmp" file on your drive. You can delete them.

After typing in /mnt/minidlna/start there will be a 20 second delay before minidlna starts.

You will have a Music, Videos and Pictures directory created on the drive.

These will be monitored for changes by MiniDLNA.

If you want, you can delete easydlna.tar.gz.

I also have hd-idle installed with this. It is set to spindown the hard drive after 20 min. If you don't want it just remove the entry from the start script.

Thats it!


Last edited by boke on Mon Jan 31, 2011 5:58; edited 7 times in total
Sponsor
anees.sw
DD-WRT User


Joined: 17 Sep 2010
Posts: 267
Location: India

PostPosted: Wed Jan 12, 2011 13:11    Post subject: Reply with quote
minidlna doesnot autostart.
boke
DD-WRT Novice


Joined: 22 Feb 2007
Posts: 34

PostPosted: Wed Jan 12, 2011 14:44    Post subject: Reply with quote
Will it start for you if you telnet to your router and type /opt/start ?

Be sure to type in the forward slashes before opt.

If so you may need to increase the sleep time in the start script.
anees.sw
DD-WRT User


Joined: 17 Sep 2010
Posts: 267
Location: India

PostPosted: Wed Jan 12, 2011 18:28    Post subject: Reply with quote
nevermind that. just added a new line to startup script through adminstration>commands in the ddwrt webui

videos work perfectly except for mp4 formats. mp3 audio works great. so do pictures.


thanks so much!




p.s:
could you build an ipk file for this so that people can remove these files if it doesnt work?
extracting files from the tar file might have worked on your router but it made /opt/usr/ folder unaccessible until i installed and removed a different package.
The Music , videos and pictures folders were also not accessible and undeletable.
I couldnt modify the conf file because I couldnt open /usr folder. I finally formatted hard disk and installed minidlna by opkg. I then extracted the files from the tar package on my computer and uploaded those via ftp to their respective folders.

Maybe it was just my router (wrt160nl) but it seems unpacking tar files causes some permission issues, so an ipk file would be a lot better. Else people could just install minidlna with opkg then upload the library files via ftp like I did.

edit
its working fine now!! only problem is that any file with a hyphen '-' in its name will cause the media scanning to break
anees.sw
DD-WRT User


Joined: 17 Sep 2010
Posts: 267
Location: India

PostPosted: Thu Jan 13, 2011 5:41    Post subject: Reply with quote
bump
boke
DD-WRT Novice


Joined: 22 Feb 2007
Posts: 34

PostPosted: Thu Jan 13, 2011 6:35    Post subject: Reply with quote
I tried making an ipk file to install but I haven't been able to get it right yet.

Is there a ipkg-build script that runs on dd-wrt. The one I have errors out.
anees.sw
DD-WRT User


Joined: 17 Sep 2010
Posts: 267
Location: India

PostPosted: Fri Jan 14, 2011 5:54    Post subject: Reply with quote
if there was, I wouldnt know about it
rcm_rx7
DD-WRT Novice


Joined: 06 Jan 2011
Posts: 7

PostPosted: Sat Jan 15, 2011 5:08    Post subject: Reply with quote
Thanks for getting this working, I am able to see it on my laptop now. However I really want to get this working on my xbox 360, and it doesn't show up. Where can I find the minidlna.conf so I can edit it?

I've checked in /opt/usr/bin and there is nothing there. Is there another location that I'm missing here?
anees.sw
DD-WRT User


Joined: 17 Sep 2010
Posts: 267
Location: India

PostPosted: Sat Jan 15, 2011 8:27    Post subject: Reply with quote
create a new file called minidlna.conf in /mnt/

paste this as the contents

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/share/Music
media_dir=V,/mnt/share/Videos
media_dir=P,/mnt/share/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 album art cache
#db_dir=/mnt/tmp/minidlna
db_dir=/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/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg

# set this to no to disable inotify monitoring to automatically discover new files
# note: the default is yes
inotify=no

# 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=900

# serial and model number the daemon will report to clients
# in its XML description
serial=12345678
model_number=1



to start minidlna run

Code:

minidlna --f /mnt/minidlna.conf
rcm_rx7
DD-WRT Novice


Joined: 06 Jan 2011
Posts: 7

PostPosted: Sun Jan 16, 2011 4:39    Post subject: Reply with quote
Thanks, I'll try that out. For some reason I am not able to create a file in /mnt. It wont allow me to change permissions either...kind of strange. I'll screw around with it for a bit and see what I come up with.

Thanks again for the response.
anees.sw
DD-WRT User


Joined: 17 Sep 2010
Posts: 267
Location: India

PostPosted: Sun Jan 16, 2011 18:15    Post subject: Reply with quote
any chance for supporting ogg format ?
boke
DD-WRT Novice


Joined: 22 Feb 2007
Posts: 34

PostPosted: Mon Jan 17, 2011 0:48    Post subject: Reply with quote
anees.sw wrote:
any chance for supporting ogg format ?


I just tried some ogg files, they work fine for me.
anees.sw
DD-WRT User


Joined: 17 Sep 2010
Posts: 267
Location: India

PostPosted: Mon Jan 17, 2011 13:01    Post subject: Reply with quote
boke wrote:


I just tried some ogg files, they work fine for me.


this is the end bit of my log

Code:

[2011/01/17 18:15:40] metadata.c:1059: warn: /mnt/share/Videos/TV/Friends/Season 8/S08E20 The One With The Baby Shower.avi: Unhandled format: ogg
[2011/01/17 18:15:40] metadata.c:1059: warn: /mnt/share/Videos/TV/Friends/Season 8/S08E21 The One With The Cooking Class.avi: Unhandled format: ogg
[2011/01/17 18:15:40] metadata.c:1059: warn: /mnt/share/Videos/TV/Friends/Season 8/S08E22 The One Where Rachel Is Late.avi: Unhandled format: ogg
[2011/01/17 18:15:41] metadata.c:1059: warn: /mnt/share/Videos/TV/Friends/Season 8/S08E23 The One Where Rachel Has A Baby (1).avi: Unhandled format: ogg
[2011/01/17 18:15:41] metadata.c:1059: warn: /mnt/share/Videos/TV/Friends/Season 8/S08E24 The One Where Rachel Has A Baby (2).avi: Unhandled format: ogg
[2011/01/17 18:16:08] scanner.c:789: warn: Scanning /mnt/share/Videos finished (211 files)!
[2011/01/17 18:16:08] scanner.c:721: warn: Scanning /mnt/share/Pictures
[2011/01/17 18:16:08] scanner.c:789: warn: Scanning /mnt/share/Pictures finished (211 files)!
IronFists
DD-WRT Novice


Joined: 16 Jan 2011
Posts: 4

PostPosted: Wed Jan 19, 2011 10:49    Post subject: Reply with quote
Would the MiniDlna IPK form openwrt work on this ?
boke
DD-WRT Novice


Joined: 22 Feb 2007
Posts: 34

PostPosted: Thu Jan 20, 2011 3:52    Post subject: Reply with quote
IronFists wrote:
Would the MiniDlna IPK form openwrt work on this ?


No, it is currently not working.

anees.sw:

I didn't know you meant avi files with embedded ogg audio.

I doubt I can fix that.
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next Display posts from previous:    Page 1 of 10
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