UPnP AV streaming in Ubuntu with a D-Link DNS-323
I’m writing this little tutorial because I couldn’t find the info nicely laid out anywhere else on the web.
So, about month ago I bought myself a D-Link DNS-323 NAS device. So far, it’s been pretty awesome (after I upgraded the firmware, at least), allowing for networked RAID-1, a built-in iTunes server, print server and streaming UPnP AV support, all for a pretty decent price. The first three on those list are a snap to set up, the fourth is a little more cryptic. UPnP, as far as I can tell, is usually meant to be used with a media server (something like a MythTV setup), rather than just for desktop users. I found very little info about how to connect to and play content from a UPnP AV server using a desktop software client. I did find, however, mention of djmount, a utility that allows you to mount a UPnP AV server’s content as a filesystem. Sounds great! However, getting it set up and functioning on my Ubuntu box was still anything but straight-forward. Here’s how I did it in Feisty.
First off, djmount’s docs mention it needs FUSE, so I installed libfuse2, and to build djmount from source, I needed libfuse-dev (just installing this package with aptitude automatically installs libfuse2):
sudo aptitudue install libfuse-dev
Next, download djmount, untar and cd to the resulting directory. then build and install:
wget http://downloads.sourceforge.net/djmount/djmount-0.71.tar.gz?modtime=1156717401&big_mirror=0
tar -zxvf djmount-0.71.tar.gz
cd djmount-0.71
./configure
make
sudo make install
Next, make a mount point in /media. I used “upnp”, but you could name it anything.
cd /media
sudo mkdir upnp
sudo chmod 777 upnp
The chmod 777 was recommended in a forum post I found somewhere about djmount, I don’t know if it makes a huge difference or not, but it’s what’s I did.
Now, load the fuse FUSE kernel module and then mount the filesystem:
sudo modprobe fuse
sudo djmount -o allow_other /media/upnp
The allow_other option is what tripped me up at first. I was trying it without that and all I was getting was a /media/upnp directory that was appearing as a unknown filetype in Nautilus. I did a djmount –help and guessed that the -o allow_others option was what I needed. Lucky me, it worked.
Now, assuming the UPnP AV server on your DNS-323 is set up and working properly, you should now be able to access the files on it just like they were on your local disk. I myself seem to have no trouble watching videos over the network in VLC. If you want to unmount it, just do the following:
fusermount -u /media/upnp
Hopefully I didn’t leave anything out.
Thanks for the useful info! I even added it to my /etc/fstab.
To do that append the following line:
djmount /media/UPnP fuse ro,allow_other 0 0
Bartbes
1 Aug 07 at 10:06 am
fantastic, I’ve spent the week playing with my media server (twonky on nslu2) and this has now sorted it out on my ubuntu system
david
17 Nov 07 at 12:45 am
Awesome! I must I got stuck on the first step, couldn’t find the right fuse-related package to install (libfuse-dev). Working with my Twonky server on unslung NSLU2.
Marcus
20 Dec 07 at 3:11 am
HELP!!!! this isnt working for me :( I am new to ubuntu so please bear with me….
I am getting stuck when i type “make” into the terminal
it says “make: *** No targets specified and no makefile found. Stop.”
what does that mean?! PLEASE HELP
Anthony
19 Jan 08 at 5:51 pm
Are you in the right directory? Did the ./configure command run successfully? If it did run, make sure you read the output to see if it encountered any errors.
Tom
23 Jan 08 at 10:54 pm
I get this error:
“checking for C compiler default output file name… configure: error: C compiler cannot create executables
See `config.log’ for more details.
anthony@ubuntu-laptop:~/djmount-0.71$ config.log”
what should I do?
Anthony
2 Feb 08 at 1:04 pm
Try installing build-essential (sudo aptitude install build-essential) and try again.
Tom
2 Feb 08 at 2:52 pm
Can’t seem to quite get it to work. Tried in a clean install env of Ubuntu Hardy (8.04)
tried the above, installed the fuse stuff and re-booted
fuse module loaded ok
root@burgundy:~/Downloads/djmount/djmount-0.71# sudo lsmod | egrep fuse
fuse 56112 1
downloaded djmount 0.7.1
configure
make all
sudo make install
completed and installed no errors
exec
djmount -o allow_other /media/upnp
[I] Mount options = allow_other
[I] Charset : successfully initialised charset=’UTF-8′
cd /media/upnp
I have 2 media servers, an Azureus bittorent and a Mediatomb
ls -al
total 7
dr-xr-xr-x 5 root root 512 2000-01-01 03:00 .
drwxr-xr-x 5 root root 4096 2008-05-25 21:55 ..
dr-xr-xr-x 2 root root 512 2000-01-01 03:00 Azureus
dr-xr-xr-x 5 root root 512 2000-01-01 03:00 .debug
-r–r–r– 1 root root 18 2000-01-01 03:00 devices
dr-xr-xr-x 2 root root 512 2000-01-01 03:00 MediaTomb
cd Mediatomb
ls -al
root@burgundy:/media/upnp/MediaTomb# ls -al
total 2
dr-xr-xr-x 2 root root 512 2000-01-01 03:00 .
dr-xr-xr-x 5 root root 512 2000-01-01 03:00 ..
lr–r–r– 1 root root 26 2000-01-01 03:00 .status -> ../.debug/MediaTomb/status
if I try the above on a suse 10.1 box with kernel
Linux version 2.6.16.13-4-default (geeko@buildhost) (gcc version 4.1.0 (SUSE Linux)) #1 Wed May 3 04:53:23 UTC 2006
djmount 0.71, compile same way
fuse compiled from source and installed
cd /mnt/av/Mediatomb
ls
.metadata .status Audio PC Directory Playlists Video
marseille:/mnt/av/MediaTomb # ls -al
total 4
dr-xr-xr-x 7 root root 512 Jan 1 2000 .
dr-xr-xr-x 5 root root 512 Jan 1 2000 ..
dr-xr-xr-x 2 root root 512 Jan 1 2000 .metadata
lr–r–r– 1 root root 26 Jan 1 2000 .status -> ../.debug/MediaTomb/status
dr-xr-xr-x 9 root root 512 Jan 1 2000 Audio
dr-xr-xr-x 4 root root 512 Jan 1 2000 PC Directory
dr-xr-xr-x 4 root root 512 Jan 1 2000 Playlists
dr-xr-xr-x 3 root root 512 Jan 1 2000 Video
Any ideas what I am doing wrong ?
Simon
Simon
25 May 08 at 9:09 pm
[...] found a website that cleary stated the steps to do, but there where a few steps [...]
Accessing upnp server from ubuntu « Linux Owns
5 Jun 08 at 1:34 pm
Hmm, not sure, Simon. I sort of started using my Macbook more than my Ubuntu box these days, so I haven’t tried to do this on Hardy yet. I’m sure somethings have changed between versions. The trackback link above has some info that might be more useful for you, tho.
Tom
5 Jul 08 at 1:29 pm
[...] Straight, No Chaser - UPnP AV streaming in Ubuntu with a D-Link DNS-323 [...]
nighto.net» Arquivo do Blog » UPnP no Ubuntu
13 Jul 08 at 5:46 pm
Next silly question from a Linux n00b: how do I access the music from programs like VLC? Presumably its via the File > Open Network Stream menu option but where I do go from there?
Kevin Turner
12 Aug 08 at 3:40 am
Well, VLC only supports UPNP-AV if you compile it with the right flags. there are other programs that can see the itunes server on the dns-323 just fine, though, like banshee or exaile. that is what i use for music.
Tom
12 Aug 08 at 8:56 am