Skip navigation


I was very excited when blog reader Joshua tipped me off that the Firefly Media Server for iPhone/iPod touch firmware 2.x is now available in the Cydia installer. I have been waiting for it.

Unfortunately, it doesn’t work out-of-the-box. I have no idea why the current Cydia release (version 0.2.4.2-1) doesn’t include the necessary configuration files nor properly set up the server for us. But I figured it out, and here’s the how-to:

Firstly, please set your firmware 2.x device (refer to this post for instructions for firmware 1.1.x) to “Never” Auto-Lock. This is necessary because on first-run, the server will index and create a database of your music files and the process takes a long time. Interrupting the process may result in strange behaviour.


PART A – INSTALLATION:

  1. Launch Cydia and install BossPrefs if you don’t already have BossPrefs in your device. We need BossPrefs, with the help of a little custom Plugin I wrote, to enable and disable the Firefly Media Server.
  2. Launch Cydia and look for and install “Firefly Media Server” under the “Multimedia” section (or just use the Search function; it’s quicker.)
  3. Download this file (253.09KB), unzip it and upload the following files into your device, location as indicated:
    1. firefly-icon.png -> /private/var/stash/Applications/BossPrefs.app/
    2. Firefly -> /private/var/stash/Applications/BossPrefs.app/services/
    3. org.fireflymediaserver.mt-daapd -> /System/Library/LaunchDaemons/
    4. mt-daapd.conf -> /private/etc/
    1. Mac OS X Users: Use the Terminal.app (it’s in your /Applications/Utilities/ folder) to SSH into your device by executing the below command; do change “192.168.123.88” to your device actual IP Address first. Enter the password (default is “alpine”) when prompted:

      ssh -l root 192.168.123.88

    2. Windows Users: Use a sFTP Client such as WinSCP to connect to your device via SSH.
  4. Copy and paste this long command (it’s *one line* long starting with “launchctl” and ending with “plist”) at the prompt. This step registers the org.fireflymediaserver.mt-daapd.plist file with launchctl.

    launchctl load /System/Library/LaunchDaemons/org.fireflymediaserver.mt-daapd.plist

  5. Copy and paste this command at the prompt. This starts indexing and creating a database for your music, and subsequently starting up the server.

    /usr/sbin/mt-daapd -c /private/etc/mt-daapd.conf -f

Be patient; Step 6 will take a while depending on the size of your music library. It took just a little over 6 minutes to index my library of 564 mp3 songs (totalling 3.34GB in size.) While it is indexing, you will notice your device is rather sluggish in response when you try to use it. Don’t be alarm; it’s perfectly normal during indexing.

Launch your iTunes. As soon as indexing is complete, you will see your iPod touch shows up under “SHARED”.

Go back to Terminal, and you should see a message “Scanned X songs in Y seconds” (sample). At this point, press and hold “Control+C” to terminate the process and turn off the server.

Your Firefly Media Server is ready to stream! To enable it, launch BossPrefs to turn it on and let the fun begins! Woohoo, it’s Hammer Time!

PART B – CONTROLLING THE SERVER

You must set the file permissions of /private/etc/mt-daapd.conf to 777 if you want to edit the settings in your browser. Please read further the on-screen instructions.

Use your desktop browser and browse to: http://192.168.123.88:3689 (change “192.168.123.88” to your device’s actual IP address.) Alternatively, you can use the Mobile Safari and surf to “http://localhost:3689/”. When prompted, enter the Name “root” and Password “alpine”, then click on the “config” tab.

  • You might want to change the “Server Name”. πŸ˜›
  • You might want to change the “Admin Password”.
  • You might want to implement “MP3 Password” if you want iTunes to prompt for access password.
  • You can also make the changes directly by editing the “/private/etc/mt-daapd.conf” file.

Please leave all other settings as is unless you know what you are doing. You can find detailed explanations of the various settings in the “mt-daapd.conf” file you downloaded earlier.

Remember to go to the Status tab and click on “Start Scan” to update your database.

Checklist

  • Be sure to regularly update your database by clicking on “Start Scan” button (it’s under the Status tab)
  • You can reset the database by deleting this file: /private/var/cache/mt-daapd/songs.gdb, and then Update it.
  • Turn off the server when not in use to reduce battery consumption.
Advertisements

59 Comments

  1. Hey!

    Thanks for figuing it out for me!
    (and for mentioning my name :p)

    But the download link you put here ( http://download75.mediafire.com/yxtwswztlqbg/mq323tzmm3u/Firefly+Setup+1.0.zip )
    is not working!

    Please Fix-it quick! :p

    Joshua

    BTW: What time zone are you in? (I’m PST)

  2. >Joshua

    Oh dear oh dear, that’s indeed a bad url.

    Here’s the right one.

    http://www.mediafire.com/?mq323tzmm3u

    I’m in Singapore, that’s GMT+8. πŸ™‚

  3. Merci!

  4. Ok now I’ve got an error! 😦

    The mt-daapd.conf

    Reads This:

    #
    # mt-daapd.conf
    #
    # Edited: Wed Sep 24 15:25:46 2008
    # By:
    #
    web_root /private/var/stash/share/mt-daapd/admin-root
    port 3689
    admin_pw alpine
    mp3_dir /private/var/mobile/Media/iTunes_Control/Music
    servername RupertGee’s iPod
    runas mobile
    playlist /etc/mt-daapd.playlist
    extensions .mp3,.m4a,.m4p
    db_dir /private/var/cache/mt-daapd
    rescan_interval 0
    scan_type 2
    always_scan 0
    process_m3u 0
    compress 0

    Can you please help?

    Thanks!

  5. Here’s the error message:

  6. >Joshua

    The content of mt-daap.conf is fine, although I accidentally zipped up the simplified copy! I’ve re-zipped the full version (which includes optional settings and their descriptions) and here’s the yousendit link (MediaFire is currently down.) You only need to replace the mt-daapd.conf file.

    Sorry for the mix up.

  7. >Joshua

    Thanks for the screenie.

    Maybe your Terminal doesn’t like short-cut. πŸ™‚ Please use the following command in Step 6 instead.

    /usr/sbin/mt-daapd -c /private/etc/mt-daapd.conf -f

    I also forgot to mention in the post its file permissions should be set to 777 or else we can’t edit the settings in our web browser.

    Good luck!

  8. Hey Rupert! Wonderful that it’s finally been ported. One problem…

    When I enter this command: “ssh -l root 192.168.X.X”, all I get is a “Bus Error”. What does that mean, and how do I fix it?

  9. Yet again…

    another error 😦

  10. I’ on windows too btw πŸ˜‰

  11. Ok I finally fix it!

    In the mt-daapd.conf edit the line that is labeled web_root in the /share/ area
    edit that to say something like share.TYFhdl (change the name to what your is accuallly called! :p)

  12. Thanks Rupert for all your help! :p

    You might want to add the above to your instructions πŸ™‚

    Thanks Again,
    Joshua

  13. >Yo thegpc

    I have no idea on the “Bus Error”. The command is simply to connect via ssh into your iPod touch.

    Maybe Joshua can help?

  14. >Joshua

    Thanks so much for debugging. I have updated the post to reflect it. I didn’t know the folder can reside in different folder. My guess is it is because we use different PwnageTool.

    Thank so much.

    May I know which Windows program you use to tunnel in?

  15. I want to thank you for the write up.

    I ran into a problem during indexing (step 7). It was talking over 30 minutes and there seem no end to it. I suspected something is amiss and quit the process. Then I re-sync my iPhone’s music, this time with just ten songs before I attemptred Step 7 again. Bingo, indexing went through smoothly in seconds.

    It turns out I have one bad mp3 files in my iTunes and it cannot be indexed! I re-converted the said bad mp3 file and everything’s fine now.

  16. >RupertGee

    I use WinSCP ( http://www.winscp.net )

    Wen you first run Cydia it reorganizes your big system files ( Applications, Themes, share…)

    NNo prob btw πŸ˜‰

  17. >thegpc

    Are you on Windows or Mac?

  18. >thegpc

    Also what program do you use to SSH into your iPod/iPhone?

  19. >RupertGee

    Are you on Firmware 2.1 with the latest updates?

  20. >RupertGee

    Simple Solution to your post fixes :p

    Make it /usr/share

    Because that links to the share folder that Cydia rearranged! πŸ˜‰

    And I can guarantee that it’ll work!

    I would suggest editing the file that people download to /usr/share so they don’t have to fool around with that (sometimes it’s confusing! :p )

  21. >Joshua

    Yes, I’m using the latest firmware, version 2.1 [5F137].

    You’re a godsend! Indeed it works and it’s certainly much easier.

    I’ve updated the post to reflect it.

    Thanks so much!

  22. Also for Windows user’s: no need for step 1 because it just gives you some weird error :p

    No problem… again πŸ˜‰

    Thanks again for figuring the files!
    Joshua

  23. Sorry,

    Corection for above post

    Step 4 not Step 1

  24. opps never mind that shortcut isn’t working!

    the web_root /usr/share

    oh well looks like people will habe to manually change it themsevevls

    sorry bout that!

  25. @Joshua:

    I’m on Mac 10.5.5, using Cyberduck.

  26. >thegpc

    Just try skipping that code. (Step 4)

  27. >thegpc

    I found out the “Bus Error” issue you were having. It turns out it is related to Rogue Amoeba’s apps you have installed. Uninstall them and everything will be ok.

    http://discussions.apple.com/message.jspa?messageID=7329043

  28. Weird… I didn’t install any apps by him… Whatever, I’ll try it out and get back to you. Thanks Rupert, as always!

  29. Well, now the Terminal processes ran smoothly… But whenever I try to access the server (192.168.X.X:3689) it won’t connect! Not even when I try it on the iPod itself on localhost! What did I do wrong?

  30. >thegpc

    Your Firefly server must be running before you can browse its status in your browser. Thus, make sure you toggle it on in BossPrefs first.

  31. Right, I did that. I even turned it off and then on again, and still no luck. Any other reason it might not show up?

  32. >thegpc

    If it doesn’t show up in your desktop Safari, then I would suspect the port is blocked by your OS X’s firewall. If it doesn’t shows up in Mobile Safari, then something is wrong.

    In either case, does it show up in your iTunes at all? If not, it could be the database file wasn’t created successfully in Step 6. The chief suspect is a non- standard compliant mp3 file is in your library, and it broke the scanning process. I suggest then to sync just a few (say five?) mp3s into your iPod touch, and then carry out Step 6. Firefly must show up in your iTunes after that.

  33. Hmm… I wonder what would make it do that… I’ll check it out and report back.

  34. Hi, I keep getting this error when I try to complete step 6.

    /private/etc$ /usr/sbin/mt-daapd -c /private/etc/mt-daapd.conf -f
    Starting rendezvous daemon
    Current database version: 8
    Starting signal handler
    Loading playlists
    Initializing database
    Starting mp3 scan
    -sh: line 65: 141 Segmentation fault /usr/sbin/mt-daapd -c /private/etc/mt-daapd.conf -f

    Please help, I’ve spent countless hours trying to fix it with no avail!

  35. >Jimbojangles

    I don’t know what segmentation fault is but looking at line 65, which reads as follow, it seems to indicate it cannot find your music library.

    mp3_dir /private/var/mobile/Media/iTunes_Control/Music

    Have you sync your music at all? πŸ™‚

    I’m sure you have, so my guess is one or some of the mp3 files may not be standard compliant causing the database scanner to break down. My suggestion is unsync every single songs, and then sync a small number of songs into your device. Hopefully these sings are okay, and complete Step 6. Then repeat Step 6 after you sync more songs by batches until you hit the same error. You’ll then know a song in the last batch is the culprit.

  36. Thanks Robert, I will try this soon as I get a chance, also what would cause a file to become locked and say that the user(me) does not have permissions to access it.

  37. >Jimbojangles

    There’s no absolute reason why a file is lock. It could be in-use, a private file, an important file etc that it’s best no one alters it. For some files, if you are sure it’s okay for you to open, you can actually change its permission. But it’s best to leave permissions alone unless you are specifically instructed to change it.

  38. Hello yet again, I tried your solution with a few groups of select songs and keep getting this error.

    /$ /usr/sbin/mt-daapd.conf -c /private/etc/mt-daapd.conf -f
    -sh: line 105: /usr/sbin/mt-daapd.conf: Permission denied

    Could mean something?, I unfortunately don’t know…

    Thanks Jim

  39. Thanks Rupert, I finally figured out what to do.

    I renamed /usr/sbin/mt-daapd to /usr/sbin/mt-daapd.conf and set permissions to 777, and voila! it worked.

    Thanks for all your help, hope this helps others too.

  40. >Jimbojangles

    I’m glad the issue is resolved and let me tell you… you’re one lucky chap!

    You see, the “line 105” errr you gotten is simply because you issued the wrong command. The correct command is in Step 6.

    Yours: /usr/sbin/mt-daapd.conf -c /private/etc/mt-daapd.conf -f
    Step6: /usr/sbin/mt-daapd -c /private/etc/mt-daapd.conf -f

    “mt-daapd” is a binary program file; it’s an unix program much like a .exe or .com of a Windows program.
    “mt-daapd.conf” is just a plain text file containing configuration info.

    They are totally different!

    The mind boggling thing is how could it work when you simply renamed “mt-daapd.conf” to “mt-daapd”? You have essentially overwritten the core program file required to run the Firefly Media Server program!

    Ha ha ha. Amazing!

    Like Rob said, if it works don’t fix it… but I suspect a reinstall and following the instructions to the tee is recommended.

  41. But I don’t understand,

    What is the difference between firefly and regularly connecting your ipod to iTunes?

  42. >Mr. J

    It’s primarily for you to broadcast songs inside your device to a Mac or PC with iTunes via Wi-Fi.

    For example, you’re at your friend’s party and want them to listen to a track in your iPhone’s music library. You can simply fire up your friend’s iTunes for Mac or Windows, and your iPhone will show up under “SHARE” and ready to rock the house down.

    More examples: https://rupertgee.wordpress.com/2007/12/28/worldwide-ipod/

  43. Thanks a gazillion!

    Works as advertised, now enjoying my music at work as well as home.

  44. Hey, Rupert,

    What’s up? I did all you said and for some reason, the shared ipod thing comes up as “Rupert Gee’s iPod”. What’s up with that?

    Thanks,

    Mr. J

  45. Never Mind, Figured it out.

  46. Cool. πŸ˜‰

    Enjoy your new server.

  47. Hey Rupert:

    I had to restore, and now whenever I try to put in the line of code in A6, my Terminal gets up to “Initializing database” before hitting a segfault. Just like this:

    Mike-Stanton-s-iPod-Touch-16GB:~ root# /usr/sbin/mt-daapd -c /private/etc/mt-daapd.conf -f
    Starting rendezvous daemon
    Current database version: 8
    Starting signal handler
    Loading playlists
    Initializing database
    Segmentation fault

    Any ideas?

  48. >thegpc

    I believe segmentation fault has to do with memory…and I suspect your library may be too large for it to handle. How many songs are in your library? I would delete the database file (if exists) and try again with a freshly rebooted iPod. Maybe you can try cutting down the number of songs for now?

  49. Rupert:

    Oh… That might be the problem… I have close to 3k songs…

  50. I hope by reducing the number of songs it resolves the issue… but how many songs is the limit? We should suggest Saurik fixing it since huge iPod/iPhone capacity may be the norm eventually.

  51. Yea… It might be a good idea to extend the song limit to something huge.

    BTW, how do I limit the songs it chooses?

  52. Maybe this is explained elsewhere but how do I make the mediaserver show my playlists? I’m certain I have to somehow convert them from itunes or some such, but what’s the process?

  53. >XIII

    As far as I know, Firefly only read .m3u style playlist. Unfortunately, iTunes only export .xml style playlist. So the two are not compatible.

    There are plenty of xml to m3u playlist converter but I know of none that works for the iPod; they are mainly for generic mp3 players.

  54. Best Software Downloads and Reviews. the most comprehensive source for free-to-trysoftware downloads on the WebBEST 4 DOWNLOADS

  55. I always used to read piece of writing in news papers but now as I am a user of internet thus from now
    I am using net for posts, thanks to web.

  56. For the reason that the admin of this site is working, no question very soon it will be famous, due to its quality contents.

  57. If you are going for finest contents like me, just visit this website all
    the time for the reason that it offers feature contents, thanks

  58. These are genuinely enormous ideas in concerning blogging.
    You have touched some fastidious things here. Any way keep
    up wrinting.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: