Difference between revisions of "Firefly on StockFirmware"
m |
m (Mended links with old domain name) |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | {{Articles|LSPro}} | + | {{Articles|LSPro|mediaserver}} |
+ | [[Image:Ff_logo_sm.gif ]] | ||
− | + | =Installation= | |
− | + | == Prepare LS and download Firefly files and libraries == | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | = Prepare LS and download Firefly files and libraries = | + | |
Starting point: | Starting point: | ||
Line 14: | Line 10: | ||
You need to download and save these packages onto your LS. There are a number of them required: | You need to download and save these packages onto your LS. There are a number of them required: | ||
− | * [http://downloads. | + | * [http://downloads.buffalo.nas-central.org/Users/kaiten/mt-daapd-svn-1586_arm9.tar.gz Firefly] |
− | * [http://downloads. | + | * [http://downloads.buffalo.nas-central.org/Users/kaiten/flac-1.1.4_arm9.tgz flac libs] |
− | * [http://downloads. | + | * [http://downloads.buffalo.nas-central.org/Users/kaiten/libid3tag-0.15.1b_arm9.tgz mp3 tag libs] |
− | * [http://downloads. | + | * [http://downloads.buffalo.nas-central.org/Users/kaiten/libogg-1.1.3_arm9.tgz ogg libs] |
− | * [http://downloads. | + | * [http://downloads.buffalo.nas-central.org/Users/kaiten/libvorbis-1.1.2_arm9.tgz vorbis libs] |
− | * [http://downloads. | + | * [http://downloads.buffalo.nas-central.org/Users/kaiten/sqlite-2.8.17_arm9.tgz SQLite DB libs] |
− | * [http://downloads. | + | * [http://downloads.buffalo.nas-central.org/Users/kaiten/oggdec-1.0.1_arm9.tgz ogg format decoder] |
Save them all in the same folder for simplicity. | Save them all in the same folder for simplicity. | ||
− | + | == Telnet to LS and unpack the tarballs == | |
− | = Telnet to LS and unpack the tarballs = | + | |
Connect to your LS either with Putty (great for any serious linux use) or with the windows client (more than sufficient for this project). | Connect to your LS either with Putty (great for any serious linux use) or with the windows client (more than sufficient for this project). | ||
Line 53: | Line 48: | ||
Some libraries unpack more files than others. As long as you see something getting unpacked for each command, you should be good to go. | Some libraries unpack more files than others. As long as you see something getting unpacked for each command, you should be good to go. | ||
+ | =Configure= | ||
+ | == Tell Firefly where your mp3 reside == | ||
− | + | You may want to create a share on your LS specifically for your mp3. Use the web interface to do this. I did, and I called it mp3. I'll assume you've done the same. | |
− | + | ||
− | You may want to create a share on your LS specifically for your mp3. Use the web interface to do this. I did, and I called it mp3 | + | |
So let's navigate to the folder containing the config file for Firefly (which is called mt-daapd.conf for legacy reasons). Enter | So let's navigate to the folder containing the config file for Firefly (which is called mt-daapd.conf for legacy reasons). Enter | ||
Line 68: | Line 63: | ||
then hit escape and type ":wq" to save edits and quit the vi editor. (I remember once writing a couple of thousand lines of pascal code on an old unix machine with the vi editor. It is actually an incredibly powerful tool!!!) | then hit escape and type ":wq" to save edits and quit the vi editor. (I remember once writing a couple of thousand lines of pascal code on an old unix machine with the vi editor. It is actually an incredibly powerful tool!!!) | ||
− | = Start Firefly = | + | == Additional Changes for Terastation Live == |
+ | |||
+ | If you have a very large set of music files, the default configuration settings may end up maxing out your / partition, which is a small 500M partition by default. Fortunately the default installation with the built-in mt-daapd helps out a little by providing a directory on the main array you can use. | ||
+ | |||
+ | Here's what the default partition structure looks like: | ||
+ | # df | ||
+ | Filesystem Size Used Available Use% Mounted on | ||
+ | /dev/md1 481.6M 448.5M 33.1M 93% / | ||
+ | /dev/ram1 15.0M 92.0k 14.9M 1% /mnt/ram | ||
+ | /dev/md0 281.0M 15.0M 265.9M 5% /boot | ||
+ | /dev/md2 1.4T 369.5G 1.0T 27% /mnt/array1 | ||
+ | The / partition includes both the /usr and /var directories so gets filled up pretty quickly with the songs.db and log. | ||
+ | |||
+ | Change the log file location: | ||
+ | #logfile = /var/log/mt-daapd.log | ||
+ | logfile = /mnt/array1/mt-daapd/firefly.log | ||
+ | Change the database location: | ||
+ | #db_parms = /usr/local/var/cache/mt-daapd | ||
+ | db_parms = /mnt/array1/mt-daapd | ||
+ | Ensure your server can access the folder (it's default permissions are 700): | ||
+ | chmod 777 /mnt/array1/mt-daapd | ||
+ | |||
+ | '''Warning!''' On the Terastation Live, each time you make any changes to any of the shares (adding new share, changing properties on existing share) the system kills the Firefly server. If anyone can figure out why this happens and how to fix it, I'd be very pleased! | ||
+ | |||
+ | However, the following changes (thanks to the people on the Firefly forums) will ensure that Firefly restarts | ||
+ | |||
+ | The /etc/init.d/firefly has an error that means that the restart parameter doesn't work. So change... | ||
+ | restart) | ||
+ | stop | ||
+ | start | ||
+ | ;; | ||
+ | to... | ||
+ | restart) | ||
+ | $0 stop | ||
+ | $0 start | ||
+ | ;; | ||
+ | |||
+ | You can also set the daemonwatcher to restart Firefly automatically if it stops by adding the following to /etc/daemonwatch.list: | ||
+ | /var/run/mt-daapd.pid /etc/init.d/firefly.sh restart | ||
+ | |||
+ | == Start Firefly == | ||
+ | |||
+ | Assuming you have copied some of your mp3 to the newly created share on your LS, we are now ready to start Firefly. | ||
+ | |||
+ | root@HS-DHGL90D:~# /etc/init.d/firefly start | ||
− | |||
− | |||
− | |||
− | |||
Starting DAAP daemon: mt-daapd | Starting DAAP daemon: mt-daapd | ||
TADA!!!! All working. If not, sorry - maybe I made a mistake :oops: in these instructions. | TADA!!!! All working. If not, sorry - maybe I made a mistake :oops: in these instructions. | ||
− | You can control Firefly and add some smart playlists at http://<your LS IP>:3689. | + | You can control Firefly and add some smart playlists at http://<your LS IP>:3689. |
+ | |||
+ | * username: mt-daapd | ||
+ | * password is mt-daapd. | ||
+ | |||
+ | There is also a nifty little streaming app you can run from your browser at http://<your LS IP>:3689/applet.html | ||
You should now be able to connect to your LS from itunes, your xbox/xbmc, your soundbridge, your squeezebox etc etc. | You should now be able to connect to your LS from itunes, your xbox/xbmc, your soundbridge, your squeezebox etc etc. | ||
− | = Make Firefly start on boot = | + | == Make Firefly start on boot == |
Enter | Enter | ||
Line 92: | Line 132: | ||
All done!!! Now enjoy | All done!!! Now enjoy | ||
+ | |||
+ | == Configuring via web frontend == | ||
+ | |||
+ | To enable configuration via the web-frontend, you need to change the permissions of the file /etc/mt-daapd/mt-daapd.conf (mt-daapd runs as user nobody in standard configuration) to be writable by the demon/webserver. | ||
+ | Either, you can | ||
+ | chmod o+w /etc/mt-daapd/mt-daapd.conf | ||
+ | or | ||
+ | chown nobody /etc/mt-daapd/mt-daapd.conf | ||
+ | (there are many other ways to that - depends much on your personal taste...) | ||
+ | |||
+ | Then go to the frontend, http://<your LS IP>:3689 | ||
+ | * user name: admin | ||
+ | initial password is (in standard configuration, to be changed in /etc/mt-daapd/mt-daapd.conf or - when enbling "Show advanced configuration" in the "configuration" page on the web-frontend) | ||
+ | * password: mt-daapd | ||
+ | On the start page, select "Start Full Scan" to add the files to the library. | ||
+ | If you have iTunes and wish to add your smart playlists, you should also add your iTunes folder to the music files. Navigate to "configuration", select "add music folder" and enter the corresponnding path. Click "Save" to write the changes. | ||
+ | |||
+ | =Credits= | ||
+ | There is a comprehensive description for the Linkstation Pro taken from the [http://forum.nas-central.org/viewtopic.php?f=39&t=3509 forum] by bawbagg: | ||
+ | |||
+ | This howto has borrowed huge chunks of text from forum user Jimbo's howto for Twonky. That thread can be found here. Many, many thanks to Jimbo for providing this. Without Jimbo's simple and easy to follow instructions for getting telnet running on an unmodified LS I would probably still be floundering around. | ||
+ | |||
+ | Many thanks also to kaiten - one of the developers on this site. He compiled the version of Firefly we are going to install, and provided the libraries that it requires. |
Latest revision as of 23:47, 15 March 2009
Contents
Installation
Prepare LS and download Firefly files and libraries
Starting point:
Stock LS Live/Pro firmware opened for telnet access. At least fix the permissions for /dev/null
You need to download and save these packages onto your LS. There are a number of them required:
Save them all in the same folder for simplicity.
Telnet to LS and unpack the tarballs
Connect to your LS either with Putty (great for any serious linux use) or with the windows client (more than sufficient for this project). Hint: From the command window enter
telnet <ip linkstation>
replace <ip linkstation> with the address of your Linkstation!! You are asked for a Login. Enter
root
and then provide the password you set when opening the box in the previous step.
You should see something like the following:
BUFFALO INC. LinkStation series HS-DHGL(JINMU) HS-DHGL90D login: root root@HS-DHGL90D:~#
Once connected, you are in the linux environment of the the LS. You are also connected as root (ie superuser). DON'T do anything you shouldn't!!!
Now we need to issue the commands to unpack the files we downloaded (tarballs). Assuming you saved in the default share folder (ie \\<your LS IP>\share), then type the following into the telnet session:
tar -C / -xzvf /mnt/disk1/share/mt-daapd-svn-1586_arm9.tar.gz
You should see a list of files getting unpacked. Now continue with the rest of the packages:
tar -C / -xzvf /mnt/disk1/share/flac-1.1.4_arm9.tgz tar -C / -xzvf /mnt/disk1/share/libid3tag-0.15.1b_arm9.tgz tar -C / -xzvf /mnt/disk1/share/libogg-1.1.3_arm9.tgz tar -C / -xzvf /mnt/disk1/share/libvorbis-1.1.2_arm9.tgz tar -C / -xzvf /mnt/disk1/share/sqlite-2.8.17_arm9.tgz tar -C / -xzvf /mnt/disk1/share/oggdec-1.0.1_arm9.tgz
Some libraries unpack more files than others. As long as you see something getting unpacked for each command, you should be good to go.
Configure
Tell Firefly where your mp3 reside
You may want to create a share on your LS specifically for your mp3. Use the web interface to do this. I did, and I called it mp3. I'll assume you've done the same.
So let's navigate to the folder containing the config file for Firefly (which is called mt-daapd.conf for legacy reasons). Enter
cd /etc/mt-daapd
in your telnet session, then
vi mt-daapd.conf
Now use the arrow keys to find the line that says
mp3_dir = /mnt/disk1/<something or other>
In vi, the x key is delete, and the i key starts inserting text. It's easy once you get the hang of it :wink:. If you screw up, hit the escape button then enter ":q!". This will quit your editing session without saving anything. Once you are happy with your edits (your line should look like this)
mp3_dir = /mnt/disk1/mp3
then hit escape and type ":wq" to save edits and quit the vi editor. (I remember once writing a couple of thousand lines of pascal code on an old unix machine with the vi editor. It is actually an incredibly powerful tool!!!)
Additional Changes for Terastation Live
If you have a very large set of music files, the default configuration settings may end up maxing out your / partition, which is a small 500M partition by default. Fortunately the default installation with the built-in mt-daapd helps out a little by providing a directory on the main array you can use.
Here's what the default partition structure looks like:
# df Filesystem Size Used Available Use% Mounted on /dev/md1 481.6M 448.5M 33.1M 93% / /dev/ram1 15.0M 92.0k 14.9M 1% /mnt/ram /dev/md0 281.0M 15.0M 265.9M 5% /boot /dev/md2 1.4T 369.5G 1.0T 27% /mnt/array1
The / partition includes both the /usr and /var directories so gets filled up pretty quickly with the songs.db and log.
Change the log file location:
#logfile = /var/log/mt-daapd.log logfile = /mnt/array1/mt-daapd/firefly.log
Change the database location:
#db_parms = /usr/local/var/cache/mt-daapd db_parms = /mnt/array1/mt-daapd
Ensure your server can access the folder (it's default permissions are 700):
chmod 777 /mnt/array1/mt-daapd
Warning! On the Terastation Live, each time you make any changes to any of the shares (adding new share, changing properties on existing share) the system kills the Firefly server. If anyone can figure out why this happens and how to fix it, I'd be very pleased!
However, the following changes (thanks to the people on the Firefly forums) will ensure that Firefly restarts
The /etc/init.d/firefly has an error that means that the restart parameter doesn't work. So change...
restart) stop start ;;
to...
restart) $0 stop $0 start ;;
You can also set the daemonwatcher to restart Firefly automatically if it stops by adding the following to /etc/daemonwatch.list:
/var/run/mt-daapd.pid /etc/init.d/firefly.sh restart
Start Firefly
Assuming you have copied some of your mp3 to the newly created share on your LS, we are now ready to start Firefly.
root@HS-DHGL90D:~# /etc/init.d/firefly start
Starting DAAP daemon: mt-daapd
TADA!!!! All working. If not, sorry - maybe I made a mistake :oops: in these instructions.
You can control Firefly and add some smart playlists at http://<your LS IP>:3689.
- username: mt-daapd
- password is mt-daapd.
There is also a nifty little streaming app you can run from your browser at http://<your LS IP>:3689/applet.html
You should now be able to connect to your LS from itunes, your xbox/xbmc, your soundbridge, your squeezebox etc etc.
Make Firefly start on boot
Enter
cp /etc/init.d/rcS /etc/init.d/rcS_old
This makes a copy of the rcS file before we modify/screw it up. Then enter(exactly as typed)
echo "exec_sh firefly start" >> /etc/init.d/rcS
All done!!! Now enjoy
Configuring via web frontend
To enable configuration via the web-frontend, you need to change the permissions of the file /etc/mt-daapd/mt-daapd.conf (mt-daapd runs as user nobody in standard configuration) to be writable by the demon/webserver. Either, you can
chmod o+w /etc/mt-daapd/mt-daapd.conf
or
chown nobody /etc/mt-daapd/mt-daapd.conf
(there are many other ways to that - depends much on your personal taste...)
Then go to the frontend, http://<your LS IP>:3689
- user name: admin
initial password is (in standard configuration, to be changed in /etc/mt-daapd/mt-daapd.conf or - when enbling "Show advanced configuration" in the "configuration" page on the web-frontend)
- password: mt-daapd
On the start page, select "Start Full Scan" to add the files to the library. If you have iTunes and wish to add your smart playlists, you should also add your iTunes folder to the music files. Navigate to "configuration", select "add music folder" and enter the corresponnding path. Click "Save" to write the changes.
Credits
There is a comprehensive description for the Linkstation Pro taken from the forum by bawbagg:
This howto has borrowed huge chunks of text from forum user Jimbo's howto for Twonky. That thread can be found here. Many, many thanks to Jimbo for providing this. Without Jimbo's simple and easy to follow instructions for getting telnet running on an unmodified LS I would probably still be floundering around.
Many thanks also to kaiten - one of the developers on this site. He compiled the version of Firefly we are going to install, and provided the libraries that it requires.