Author Topic: [GUIDE] Dlink DNS-323 hacking guide  (Read 8741 times)

[GUIDE] Dlink DNS-323 hacking guide
on: March 17, 2011, 10:00:48 AM
Shamelessly stolen from another forum!
Thanks to Briain @ Linn.co.uk

Installation instructions (Brief)

For the experts, this small section will be enough

Basically, all you need do is note your old Twonky key, access the NAS, create a 'temp' directory on the NAS, drop 2 files into it, install the Twonky package (set it not to start the server immediately after installation), then using telnet, navigate to the temp directory, chmod a+x the 'go' file then run it (./go); that's it done.

The replacement starttwonky.sh file sets up the symbolic links to enable the NAS to reboot and start Twonky (without doing that, the NAS will not be accessible; you'd need to telnet in, delete the existing starttwonky.sh file and reboot it to fix things). The replacement starttwonky.sh can be downloaded from from here.

The replacement starttwonky.sh also sets permissions on the /twonky/resources/views XML files such that the trees can be changed by dropping replacements in using Windows (no need to telnet back in again).

Optionally, you can change the clients.db and default.ini (and even add new trees) to the unzipped installation files before running the installation; the only important bit is to replace the starttwonky.sh (using telnet) before Twonky is first run.

Once done, check to see what's running (ps aux) and if you see inotify_itunes it's worth disabling it via the D-Link web interface (it's the built in iTunes server)


Last Edit: March 17, 2011, 10:34:00 AM by soopahfly #187;
XBL Gamertag : Soopahfly82 :: PSN : Soopahfly82 :: Steam : soopahfly
:: Intel i5 4570 :: Gigabyte GA-H87M-HD3 :: 16Gb Corsair Venegance :: Radeon R9 290 :: Samsung EVO 250GB SSD :: 2x 2TB WD Black :: Corsair CX750M :: Coolermaster HAF XB ::

Re: [GUIDE] Dlink DNS-323 hacking guide
Reply #1 on: March 17, 2011, 10:30:48 AM
Installation instructions (Detailed)

Instructions in a lot more detail:

Prerequisite requirements:


Assuming you already have a D-Link with Twonky 4.x.x on it, you will have had to install the fun_plug utilities in order to have installed Twonky 4 in the first place. This means you are ready to install the updated versions of Twonky. If not (if it doesn't already have a version of Twonky on it, or if it is a new D-Link, or you have just fitted new disk(s) into an old D-Link and set it up) then you'll have to first install the Fonz ffp_plug tools before you can proceed any further. There are instructions on installing below. If you are unsure whether it has been previously installed or not, see the third picture below (you can see the 'ffp' folder, which shows it has already been installed).

Preparation:

Access the D-Link configuration page and disable both the built in UPnP server and also the iTunes server. There's not enough room here, but I've shown a picture of the D-Link interface in the post below this one. Disable both iTunes and UPnP server in the same way.

Before doing anything else note your existing Twonky 4 license key. This can be found either by opening the Twonky ini file (in a text editor like Notepad) or by typing http://your.nas.ip.address:9000/rpc/get_all into your web browser. If you decide to stick with Twonky 6 (you get a 30 day free trial) the old key gets you discount on a new one. If you do loose the old one, it can be retrieved by contacting Twonky.

Update NAS firmware:

First backup your D-Link and then update it to the current firmware. I've updated the below to version 1.08 and it all went smoothly (I see there's also a 1.09 but the only difference is the addition of CTERA on-line backup). You can access the firmware page here.

--------

Fonz's Fun Plug

Now install Fonz fun_plug (if it's not already installed). If you already have Twonky, you'll have already installed it. If it's a new NAS, I expect it'll not be there (if you have a ffp directory visible, then it's installed). If not, it's simply a matter of downloading two files and rebooting the D-Link; see below.

Download the two latest files from fonz’ fun_plug repository. To save time, I've put links to the two files you need:

fun_plug (this is a text file, you will have to right-click the above link and save it to disk)

fun_plug.tgz (this is a 10 MByte “tarball” file, roughly the Linux counterpart of a Zip file) again, right click and save it to your computer's desktop)

Place a copy of both files in the topmost directory of Volume_1 of your NAS using Windows Explorer.

Reboot the D-Link (press and hold the power button for 5 seconds, then once it's fully off, press the button to start it again).

If you wish any more info about fun_plug, there is a tutorial here (navigate to the section about installing it), but to be honest, the bits above are all you need to know.

--------

Back to installing Twonky

Download and unpack the rest of the new files you will need. Again, right click on the links then save the files to your desktop.

First download the DNS-323 Twonky 6.0.32 package from here
(full page of other NAS versions here)

Next download PuTTY from here (full page of PuTTY versions here)
(The Mac has its own built-in Telnet client).

Now download the custom D-Link files pack from here.

Now unzip the Twonky 6.0.32 installation package onto your desktop. To save space, I've shown the options for using either Winzip or 7-Zip - a better and also free zip tool - on the one picture (you'll only need one of them).




Now unzip the custom D-Link file pack and extract the four files (onto your desktop). Two of the files are optional extras (though recommended) and the other two ('go' and 'starttwonky.sh') are essential to the installation (they are both used in the 'Back to the necessary stuff' section, a little further down).

--------

Three Optional Changes (recommended)

Now open the unpacked Twonky 6.0.32 installation folder and you'll see the below set of files and folders



You can now use the 2 of the 4 files from the custom D-Link pack to update the Twonky installation package before installing Twonky onto the D-Link (both optional, but both recommended):

File 1 (twonkymedia-server-default.ini)

From my custom D-Link files pack, drop the 'twonkymedia-server-default.ini' into the above folder (thus overwriting the original Twonky one).

File 2 (replacement clients.db,):

From my custom D-Link pack, drop the replacement 'clients.db' file into the 'Resources' folder (overwriting the original Twonky one). This is similar to the original Twonky one, but it now defaults to a new entry called 'Full Resolution Art to CP' and thus saves Kinsky Desktop users having to manually re-select the 'Linn DS CP' entry after performing a Twonky rebuild (it still sets itself automatically for all other things including Chorus and Songbook). Don't do this if installing Twonky 5.1 (it's a different file); for 5.1 you will need to instead have to overwrite the transcoding.db file with my 5.1 custom one (it's on the Qnap forum with my trees).

Trees (can be done now or later; I'd just go for it now):

Optional (but recommended for folks with more than a couple of hundred albums): At this point, you can (if desired) download one of my replacement menu (tree packs) from here (or use the following link to directly download the recommended albumartist pack here). They can be placed in the views folder (which is in the resources folder) for automated installation You don't have to change the trees now as I have included a line in the starttwonky.sh file which enables 'Windows Explorer' level of access, so you can easily change the trees at a future date.

--------

Back to the necessary stuff

Now access the NAS 'Volume_1' share (using Windows Explorer) either by typing your NAS hostname (\\hostname) or by opening your normal drive mapping (the usual way you deposit your albums on the D-Link) such that you can see the NAS's folders in Windows explorer. Right click on the white space and select to create a new folder (see picture below) and call the new folder 'temp'




Open this new 'temp' folder and drop the remaining 2 files from my pack of 4 custom files; the ones called 'starttwonky.sh' and 'go' (as I have shown in the below picture):



Now the package is ready to install automatically, but first open PuTTY to check that you can access the D-Link (we'll need to use this in a moment). Below shows the PuTTY opening screen you will get and the correct things to type in (ignore the bottom entries, simply enter your own NAS IP adddress and ensure the telnet connection type has been chosen); just populate the bits at the end of the red arrows.



Now click open and log into your D-Link. On the D-Link I have, I've set a password and enabled a different form of access (as root user) so you will likely not have any user ID or password to enter (unless you specifically set that up after you first installed fun_plug). Where this NAS shows as root@WaveServ:~# your one will likely just have a symbol like ~#

Now type the below commands

cd /mnt/HD_a2/temp (then enter)
ls (then enter)

This will list the two new files you added to the new 'temp' folder a few moments ago. Please check that you see these two files (as below) as that will prove you are in the correct place and ready for the next stage.



If you don't see these two files as shown above, do not proceed any further; re-read the above steps and correct the issue, then proceed as follows:

With everything left like that and the telnet session left running (the PuTTY Window left open), now go back into the unzipped Twonky 6.0.32 installation folder sitting on your desktop, and double click on the one called 'nassetup.exe' (see below red arrow); you will now get the below Window popping up:



Click on 'Accept' then enter your NAS IP address (and user / password if required). Now untick the start server box as shown by the other big red arrorw and then you can click on the continue button.

I'm told Windows 7 pops up a warning to say Twonky did not install correctly; just ignore/cancel it (Windows XP doesn't do that).

Once it has finished, close the installation window (the one shown above) and return to your PuTTY screen; now type the below commands

chmod a+x go (then enter)
./go (then enter)



After hitting the enter button (after ./go) in the above screen, the installation of my custom files will commence, the screen will update as shown below and the NAS will automatically reboot itself:



Once the NAS has re-started, Twonky will start safely and you can set the media paths etc. It's defaulted to point nowhere, so go into Twonky config (http://your.nas.ip.address:9000) then click on the spanner icon, then from the left menu, select shares, then use the browse button to set the 'content locations' to point to your music; once selected, click on the 'save changes' button.

You can also set paths to videos and pictures folders if you wish (remember to change the types to videos and pictures respectively) and then save the changes.

You can now also delete the starttwonky.sh and go files you placed in that new temp folder (or delete the entire temp folder) but I'd recommend leaving them there for any future updates.





XBL Gamertag : Soopahfly82 :: PSN : Soopahfly82 :: Steam : soopahfly
:: Intel i5 4570 :: Gigabyte GA-H87M-HD3 :: 16Gb Corsair Venegance :: Radeon R9 290 :: Samsung EVO 250GB SSD :: 2x 2TB WD Black :: Corsair CX750M :: Coolermaster HAF XB ::

Re: [GUIDE] Dlink DNS-323 hacking guide
Reply #2 on: March 17, 2011, 12:00:58 PM
VERY nice.

Whats Twonky for other than PS3 and 360 trancoding? I want to install it but I cant think of a reason to - only think i cant is to be able to serve video to my phone over the internet.

Formerly sexytw

Re: [GUIDE] Dlink DNS-323 hacking guide
Reply #3 on: March 17, 2011, 16:55:17 PM
Basically Twonky is a DLNA media server, better than Dlink's built in one.
It's not free though. 

I used to use it for streaming to the PS3/360 from my old Buffalo NAS, but they've been outclassed by my Boxee.
So now I use it for streaming to ANYSHARE on my Galaxy S.
XBL Gamertag : Soopahfly82 :: PSN : Soopahfly82 :: Steam : soopahfly
:: Intel i5 4570 :: Gigabyte GA-H87M-HD3 :: 16Gb Corsair Venegance :: Radeon R9 290 :: Samsung EVO 250GB SSD :: 2x 2TB WD Black :: Corsair CX750M :: Coolermaster HAF XB ::

0 Members and 1 Guest are viewing this topic.