DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-07-21 18:52:24

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Building uShare for FW 1.5 & FFP 0.5

Ok,

So I need to stream to the XBox 360 and nothing apart from TwonkyVision seems to work on ffp 0.5.

The person who kindly build uStream for ffp 0.4 seems to not be around or to busy to take this on so I though I would give it a go.

Although I have some experience with Linux (Slackware 3.0 - yes that is old) I work mainly with Solaris / Sybase and Mainframes at work so it is a catchup and learning experience for me again.

So what are the requirements.

A Linux environment with the relevent compilers / linkers / libraries etc.  Fonz suggested just installing all the packages that are available for ffp 0.5.

Taken from Fonz's website (http://www.inreto.de/dns323/fun-plug/0.5/);

  Using rsync, you can download and install additional packages with:

    telnet bob
    cd /mnt/HD_a2
    rsync -av inreto.de::dns323/fun-plug/0.5/packages .
    cd packages
    funpkg -i *.tgz

This will install all packages and skip ones already installed.

uShare website specifies the following is required;
GNU C Compiler (gcc), 2.95 or later.
pkg-config.
Linux SDK for UPnP Devices (libupnp), 1.4.2 or later.
libdlna, 0.2.1 or later.

gcc is taken care of with installing the set of packages for ffp 0.5.  Pkg-config, libupnp and  libdlna I will need to build before I can build uShare.

Now Pkg-config and libupnp were not too difficult.  Download the sources, unzip or bunzip2 then tar -xvf the .tar file.  This now gives the source files in a directory.  There are now three steps to take for each package.  Configure, make, make install with make clean as an extra to clean out all the temp files after the install.  The configure command can accept a prefix for install location and in my case it needs to be /ffp so I can configure using './configure --prefix=/ffp' for the first two packages.  'make' and 'make install' then compile the binaries / libraries and then install them.

The dlna package it seems requires the libavformat library.  This library turns out to be part of the ffmpeg install which I am now working on.

RB

Last edited by RimBlock (2008-07-22 04:15:19)

Offline

 

#2 2008-07-22 05:34:51

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

Cool, now I remember why I hated trying to compile packages on Linux......

dlna requires libavformat and libavcodec which are part of the ffmpeg release.  There is no link to the ffmpeg release on the GeeXBox site.  Ffmpeg's site (http://ffmpeg.mplayerhq.hu/) lists the source code as being hosted by the MPlayer site (http://www.mplayerhq.hu/design7/news.html).   You can just install the ffmpeg part if you run the following;

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

This should create a ffmpeg directory.  I am un-taring on /mnt/HD_a2 so I now have a /mnt/HD_a2/ffmpeg directory.

Running the configuration script again using the --prefix parameter results in errors involving dlopen.h and iconv.h being reported as missing and then further on it just seems to hang.  The config does not write to stout like any other configure but to config.err.  Opening another telnet session and doing a 'tail -f config.err' shows me the progress until it gets stuck and seems to go no further but [CTRL]+C to break out of tail also does not work :-(.  Now I need to get stty configured correctly so it wil accept the inturrupt and break signals.  After a bit of playing around I decided to just try to compile uShare without dlna support (I do not have a PS3 so do not need it but would like to include for others).

Well, as promised, uShare uses pkg-config to configure it'self.  When it gets to check for the libupnp library pkg-config reports it missing and throws up an error about gnome-config being missing and PKG_CONFIG_PATH not containing the pkg-config path with the libupnp.pc file.  This is true as a check of enviromental variables using both 'env' and 'set' reported no PKG_CONFIG_PATH set.  Pkg-config seems to be a sucessor to a gnome package config system hence the reference to the gnome config file and I am hoping that by setting the env variable it will not need to check for the gnome file.

Unfortunately time was not on my side so at clost to midnight here it was time for some sleep.  Work in the morning so I will take another look again tonight if I get the chance. 

Oh, none of the pkg-config, the libdlna or the ffmpeg sites have forums but only mailing lists (are we still in the 80's).

Time to have a look at some of Fonz's scripts too for making packages to see if I can reuse any of his techniques to try and make this process easier.

RB

Offline

 

#3 2008-07-22 06:26:46

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

ffmpeg install looks like it could be of help with the ffmpeg side (http://www.sherin.in/ffmpeg/index.php?o … ;Itemid=40).

RB

Offline

 

#4 2008-07-22 14:03:13

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

I now have the configure working for uShare (without dlna support at the moment).

Make all gives the following error......

gcc -c  -I.. -W -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -O3 -DHAVE_LOCALE_H -DHAVE_SETLOCALE -DHAVE_LANGINFO_H -DHAVE_LANGINFO_CODESET -pthread -I/ffp/include/upnp -o presentation.o presentation.c
In file included from presentation.c:32:
gettext.h:28:22: error: libintl.h: No such file or directory
presentation.c: In function 'process_cgi':
presentation.c:108: warning: implicit declaration of function 'gettext'
presentation.c:108: warning: incompatible implicit declaration of built-in function 'gettext'
presentation.c: In function 'build_presentation_page':
presentation.c:143: warning: incompatible implicit declaration of built-in function 'gettext'
make[1]: *** [presentation.o] Error 1
make[1]: Leaving directory `/mnt/HD_a2/ushare-1.1a/src'
make: *** [all] Error 2

Running the following from '/' gives no results so i am guessing another package is missing. 

'find ./ -name 'libintl.h' -print'

Any idea what package is required to install libintl.h

Thanks
RB

Offline

 

#5 2008-07-22 14:11:23

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Building uShare for FW 1.5 & FFP 0.5

RimBlock wrote:

gettext.h:28:22: error: libintl.h: No such file or directory

There's no libintl.h in ffp. Add '--disable-nls' to configure.

Offline

 

#6 2008-07-22 14:24:27

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

THanks Fonz,

It is now compiling.

RB

Offline

 

#7 2008-07-22 15:05:18

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

uShare is working for XBox on FW1.5 with ffp 0.5 but without dlna support.

I will look at adding the dlna support and will put together a package to install for anyone else who would like it.

I have nowhere to host and hate places like fileshare and rapidshare so if Fonz is willing to add the package as part of the available packages for ffp 0.5 and is willing to offer a little (more) guidence about packaging so as to be compatible with funpkg then I will pass the finished job to him.

Gotta get ffmpeg compiled first though :-).

RB

Offline

 

#8 2008-07-23 17:28:21

acommonjo
Member
Registered: 2008-07-23
Posts: 5

Re: Building uShare for FW 1.5 & FFP 0.5

RimBlock wrote:

I will look at adding the dlna support and will put together a package to install for anyone else who would like it.

I just registered here to reply to this post. I would really appreciate a compiled package. I just got started with the fun_plug stuff, bought my DNS-323 last week, and don't quite understand everything enough to compile the program myself.

I'm not sure what DLNA does, but from what I have read it isn't required for media streaming so I don't mind if it's left out of the package.

Thanks.

-acommonjo

Offline

 

#9 2008-07-25 12:30:24

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

acommonjo wrote:

RimBlock wrote:

I will look at adding the dlna support and will put together a package to install for anyone else who would like it.

I just registered here to reply to this post. I would really appreciate a compiled package. I just got started with the fun_plug stuff, bought my DNS-323 last week, and don't quite understand everything enough to compile the program myself.

I'm not sure what DLNA does, but from what I have read it isn't required for media streaming so I don't mind if it's left out of the package.

Thanks.

-acommonjo

DLNA is required to connect the PS3 to uShare.  It stands for Digital Living Network Alliance and is (currently rough) specifications on how devices should communicate with each other in a digital home.

Unsurprisingly Microsoft with it's XBox 360 AV streaming specifications chose to ignore DLNA and tweek the uPNP AV spec just enough to make it work for WMP but not for lots of other programs.  Apparently the search function is also bugged.

Anyhow..... I have worked out what is required for uShare to work on a clean ffp 0.5 install but have found starting uShare in daemon mode will not allow you to turn on XBox 360 compatibility...... Running from the command line works fine.  I am looking to see if I can nohup it to get round this issue for the start script.

I also need to write the install scripts.

RB

Offline

 

#10 2008-07-28 06:22:19

acommonjo
Member
Registered: 2008-07-23
Posts: 5

Re: Building uShare for FW 1.5 & FFP 0.5

I attempted to compile to program myself this weekend, but I'm still way to new to understand anything that I'm doing yet. I thought I followed all the steps that you had taken, but in the end nothing seemed to have actually installed.

I know this would be a bit of a pain, but could you (or anyone else) try to write the instructions as newbie friendly as possible to compile the program to the extent that you have it working thus far? I really miss the video streaming to my 360 and want to get something back up and running asap even if it is only a temporary solution until the 'final' product is finished.

Thanks.

Offline

 

#11 2008-07-28 18:43:19

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

If I have time then I could try to put all the steps together.

A better option would be for me to put the files required in a tarball with install instructions.  I plan to get round to doing a script to install but it needs writing and testing to make sure I catch as many possible situations as I can think of.

The NOHUP method works in the ushare.sh file I have in the ffp/start directory and streaming seems to be working find for my XBox 360.  There is still no PS3 support.

I will need somewhere to put the tarball as I have nowhere to host it.

If someone has some space then it will take about 271k + the readme.

Let me know via PM or posting here.

RB

Offline

 

#12 2008-07-29 11:35:45

cybrey
Member
Registered: 2007-11-08
Posts: 24

Re: Building uShare for FW 1.5 & FFP 0.5

You have a pm.

Offline

 

#13 2008-07-31 09:47:13

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

DISCLAIMER.

This version of ushare is compiled on and tested for the D-Link DNS-323 NAS running Firmware 1.5 and using Fonz's Funplug 0.5 for streaming to the XBox 360 only.  Feel free to try it on any other configuration but it has not been tested.

This version of uShare also does not have DLNA support so will not stream to the PS3, this is not by choice.  Future relases may have DLNA support but until I can get FFMpeg to compile this will not happen.

I offer a best try form of help / support when I have time.  Just because you try a version of the software I have compiled for myself and made available to the community it does not mean I will be supporting you for the rest of my life.  Saying that I will help where I can.  I cannot help with uShare funtional code problems as I do not code in C/C++.

Thanks, reasonible suggestions and comments are welcome.

DETAILS.

I have provided a tgz to Cybrey who has kindly offered to host.

As soon as it is available I will post the URL.

To install, download and copy the .tgz to your mounted share directory (i.e. the Volume_1 mapping on your windows machine for the DNS), telent or ssh to the DNS.  Navigate to the location of the tgz file (should be something like 'cd /mnt/HD_a2/'). 

Unpack the .tgz file using 'tar -xzvf [filename]'

cd in to the new directory created and you should see a number of directories, install.sh and README.

Run './install.sh' to install the files to the relevent places.

Check and amend the /ffp/etc/ushare.conf especially for the media path where you have put all your media files.

Once all that is done you should be able to either reboot the NAS or go to /ffp/start/ and run './ushare.sh start'

You can use 'ps -A | grep ushare | grep -v grep' to show the ushare process is running.

Streaming to the XBox 360 should now work fine give or take your own network setup.

RB

Offline

 

#14 2008-07-31 13:27:11

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

Ok, the file is available at http://dns323.thecorewithin.net/ushare1 … o_dlna.tgz

Please feedback any issues / problems and I will try to help you resolve them if I can.

Regards
RB

Offline

 

#15 2008-08-01 07:05:06

acommonjo
Member
Registered: 2008-07-23
Posts: 5

Re: Building uShare for FW 1.5 & FFP 0.5

I don't know if this is just me, but the install.sh script didn't copy over the files at all. I just did it manually and started the uShare service. Once everything got up and running it worked great! I was able to stream all my files to the 360 without any incident. Had a typo in my share path the first couple of times I tested it, but once it was fixed it worked perfect. Thanks!

Last edited by acommonjo (2008-08-01 07:22:10)

Offline

 

#16 2008-08-01 10:21:50

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

Glad it works for you.

Any clues as to what happened to the install.sh file.  Did it give you any messages ?

Cheers
RB

Offline

 

#17 2008-08-01 15:12:52

acommonjo
Member
Registered: 2008-07-23
Posts: 5

Re: Building uShare for FW 1.5 & FFP 0.5

Not sure what happened with the install.sh. The only messages that it gave were ones that you would expect to get. It confirmed that it completed by displaying the finished text that you wrote into the script, but it never copied the files. Again, it could have been something specific to my system that caused it to have trouble. Anyone else try it yet?

Offline

 

#18 2008-08-01 16:02:30

geegeez
Member
Registered: 2008-08-01
Posts: 11

Re: Building uShare for FW 1.5 & FFP 0.5

I had the same problem and had to copy the files manually to each folder.  I didn't get any errors when I ran the script.  The only thing I changed was the folder path in the ushare.conf file to point to where my media files are stored.

Using it has been hit-and-miss.  For starters, I can't seem to consistently get the media to show up in Music/Pictures/Videos on my Xbox, and I'm not sure why.  My Xbox is using a wireless adapter but I've never had any trouble with networking on it (Live connection works fine for games/downloading).  My DNS323 is hooked up directly to my router.

Secondly, in terms of music I have a lot of media and it takes awhile for the files to show up in the list.  I tried switching from Albums to Songs for example and it seems to show the same list.  There also seems to be a limit to 1000 files per "view" of the folder. 

In terms of videos, when they were actually working I was able to view some DivX but not all, so I would assume that's just an unrecognized codec problem.  When I play some uncompressed .avi files from some raw video caps they tend to freeze after about 10-15 seconds of play, but I can hit 'B' on my controller and get out of that.  Not sure why that happens either.  WMV worked fine of course.

I haven't tried pictures yet but I'll do that soon.  I just setup my DNS323 yesterday with fun_plug 0.5 and still need to enable SSH, disable telnet, etc.

Hopefully I can resolve these issues that I'm having with uShare.  Thanks to RimBlock for getting all this together.

Last edited by geegeez (2008-08-01 16:04:51)

Offline

 

#19 2008-08-01 16:45:49

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

My version of uSHare is only for ffp 0.5.

It has not been tested on anything else as FOnz went a different way with libraries between 0.4 and 0.5 meaning uShare previously compiled for ffp 0.4 would not work when you upgraded to 0.5.

Only thing I can think of with the install.sh is that there may be a permission issue but now I am finally home I will take a quick look.

Geegeez, the choppyness you discribe when playing some files sounds like a bandwidth issue as codec issues will usually cause refusal to play.  I have the same issue with HD video over the wireless 54Mbit XBox 360 wireless adaptor.  Try running a cable fromt he router to the XBox just for a test and see if the choppy issue is resolved.

One issue with uShare is that on restart (or start) it reindexes all your media shares.  If you have lots of small files (mp3 or pics) then this can take some time.  I leave mine running 24*7 and just kick in a refresh if I add media via the web interface (just http://[you nas ip address]:[your ushare sharing port]/ to get the very basic webpage.

RB

Offline

 

#20 2008-08-01 17:02:58

acommonjo
Member
Registered: 2008-07-23
Posts: 5

Re: Building uShare for FW 1.5 & FFP 0.5

RimBlock wrote:

One issue with uShare is that on restart (or start) it reindexes all your media shares.  If you have lots of small files (mp3 or pics) then this can take some time.  I leave mine running 24*7 and just kick in a refresh if I add media via the web interface (just http://[you nas ip address]:[your ushare sharing port]/ to get the very basic webpage.
RB

Do you know if there is currently a way to schedule a refresh to run at a specified interval?

Offline

 

#21 2008-08-01 17:16:49

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

Ok, install.sh sorted.  The copy and chmod of the files was hased out for testing and never but back.

Re-tgz'd and uploaded so the install should work fine now.  Put a fresh ffp 0.5 install on my DNS and it ran fine.

As for the auto-refresh, it can be done with a recycle script which recycles uShare script in the start directory every XXX seconds or when a specified file is found in a specified location.

I have adapted a script to do the same for Transmission and Clutch.  Should be easy enough to modify it for uShare.

I will have a look.

RB

Offline

 

#22 2008-08-01 18:08:47

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

Ok, recycle script written.

Testing overnight.  If all is ok then will release.  As it stands it just goes in the /ffp/start directory, checks the /mnt/HD-a2/ushare_watch directory (will create if not in exsistance on first run) for a file called 'cycle' every 10 minutes.  if found it will restart ushare.  If no cycle file is found in 1 hour it will recycle anyway.

RB

Offline

 

#23 2008-08-01 19:13:20

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

uShare media refresh Script is packaged on the http://dns323.thecorewithin.net/ share.

There is no warranty and it is being debugged.  I have removed the bugs I have found but you try this script entirely at your own risk.  If you have a problem with it I will try to help on a best efforts basis.  Nice, polite people get quicker and more indepth help ;-).

Feel free to try it. 

unpack with 'tar -xzvf ushare_refresh-0.1.tgz'

cd ushare_refresh-0.1/bin

amend the ushare_refresh.sh file to set the ushare_watch directory you want to script to check for the cycle file.
set the following;
CHECK_FREQUENCY=600 #Check for 'cycle' file every 10 minutes (600 seconds)
FREQUENCY=3600 #Cycle every hour regardless.
CYCLE_DIR='/mnt/HD_a2/ushare_watch' #Location to check for the cycle file
CYCLE_FILE=$CYCLE_DIR/cycle # name of the file to check for (in this case the file is called 'cycle')

run './install.sh'

reboot NAS

CYCLE_DIR will be created when the NAS starts.

In XP I just navigate to the CYCLE_DIR from a mapped drive the [Right Click] -> new -> text document -> change the name to CYCLE_FILE (without the path) -> confirm type change and it will be picked up and cause a ushare cycle at the end of the next CHECK_FREQUENCY

Report any bugs here.

Cheers
RB

Offline

 

#24 2008-08-05 15:51:09

geegeez
Member
Registered: 2008-08-01
Posts: 11

Re: Building uShare for FW 1.5 & FFP 0.5

Is there a limit on how high the ushare port can be?  I set it to 52222 but when I visit http://my_nas_ip:52222/ I get a "500 Invalid Server Error" or something like that.

I also discovered that my Xbox doesn't seem to like 30 FPS DivX/Xvid, although I thought it's supposed to be able to handle them up to 1280x720p?  My 25 FPS DivX/Xvid files play without incident.  I'm going to try that refresh script and see if I can get a longer ethernet cable so I can try out a wired setup.

Offline

 

#25 2008-08-05 18:46:44

RimBlock
Member
Registered: 2008-04-24
Posts: 77

Re: Building uShare for FW 1.5 & FFP 0.5

geegeez wrote:

Is there a limit on how high the ushare port can be?  I set it to 52222 but when I visit http://my_nas_ip:52222/ I get a "500 Invalid Server Error" or something like that.

I have no idea.  I have mine on the default 49xxx  and it works fine.

geegeez wrote:

I also discovered that my Xbox doesn't seem to like 30 FPS DivX/Xvid, although I thought it's supposed to be able to handle them up to 1280x720p?  My 25 FPS DivX/Xvid files play without incident.

Resolution and fps are two different things.  With so many different standards, encoding methods it is not surprising the XBox cannot handle a few.  Mine tend to be 23fps.  Again this is more likely to be an issue with support standards with the XBox 360.

geegeez wrote:

I'm going to try that refresh script and see if I can get a longer ethernet cable so I can try out a wired setup.

Hope that resolves your jerky playback with HD material.

You may also want to take a look at the powerline homeplug system as it gives a wired network using your electricity cables.  I use them at home and it works fine with HD stuff with the higher rated homeplugs.  A number of companies make compatible devices (D-Link, Aztech, etc).

RB

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB