MacTalk Forums > iPhone & iPod Stuff > iPhone
iPhone The iPhone forum. Talk about the hardware and troubleshooting here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 21st September 2008, 06:08 PM
Beau's Avatar
Plagiarism saves time.
 
Join Date: Jul 2007
Location: Sydney, NSW
Posts: 1,743
View Beau's Twitter Page View Beau's Flickr Page View Beau's Last.fm Playlist
Default Stream music *from* your iPod/iPhone

Click the image to open in full size.
Click for full size - Uploaded with plasq's Skitch

Thanks to the magic of Firefly Media Server, you can now stream your music right from your iPod/iPhone into iTunes over WiFi. Interested? Read on!

First of all, you'll need to have your device jailbroken, and have SSH installed - (search is your friend) once done, open up Cydia and have a look for Firefly Media Server . Install, and reboot your device. (You might also like to install BossPrefs if you havent already - this will make it *much* easier to start the server, if you don't fancy typing into Terminal).

Next, in your favourite text editor, create the following files;
(You can change 'My iPhone' to whatever name you'd like to appear in iTunes)
Code:
#
# mt-daapd.conf
#
# Edited: Fri Sep 19 14:53:31 2008
# By:     root
#
web_root        /usr/share/mt-daapd/admin-root
port            3689
admin_pw        alpine
mp3_dir         /private/var/mobile/Media/iTunes_Control/Music
servername      My iPhone
runas           mobile
playlist        /etc/mt-daapd.playlist
extensions      .mp3,.m4a,.m4p
db_dir          /private/var/cache/mt-daapd
rescan_interval 300
scan_type       2
always_scan     1
logfile         /var/log/mt-daapd.log
process_m3u     1
compress        1
Save as mt-daapd.conf *Make sure there's no formatting whatsoever.*

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyLi....dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>org.fireflymediaserver.mt-daapd.plist</string>
        <key>Program</key>
        <string>/usr/sbin/mt-daapd</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/sbin/mt-daapd</string>
        </array>
</dict>
</plist>
Save as org.fireflymediaserver.mt-daapd.plist
*Again - make sure there's no formatting!*

When you've created the files, open up your favourite SFTP client, and connect to your iPhone
(Username - root; Password - alpine).
Browse to /etc/ and place the mt-daapd.conf file inside.
Next, drop org.fireflymediaserver.mt-daapd.plist inside /Library/LaunchDaemons/.

After you've copied the files over, open up your favourite SSH client (Terminal works just fine) and connect to your iPhone.

Then, you can register your new /Library/LaunchDaemons/org.fireflymediaserver.mt-daapd.plist file with launchctl by running the following line in Terminal
Code:
launchctl load /Library/LaunchDaemons/org.fireflymediaserver.mt-daapd.plist
While we're in Terminal, you can also start the file scan process by running the following command;
Code:
/usr/sbin/mt-daapd -c /etc/mt-daapd.conf -f
After the file scan has completed - your iPhone should now show up inside iTunes if they're on the same network. Congratulations!

When the server is up and running, you can also access the control panel from Safari;
Just visit MacTalk Australia on your iPhone, and you can start a new file scan, change the password, check status, etc.

Now, if you dont want to have to run a command in terminal everytime you want to start Firefly, you can add a Firefly control to BossPrefs;
Open up BossPrefs. Tap Config. Tap Add. Then, fill out the settings using the following;
Code:
Name: Firefly
Start: launchctl start org.fireflymediaserver.mt-daapd.plist
Stop: killall /usr/sbin/mt-daapd
Process: /usr/sbin/mt-daapd
Icon: (leave this blank)
Tap Save.
Now you will only have to toggle a switch to start/stop Firefly.

Enjoy!
__________________
MacBook Unibody 2.4GHZ // iPod Nano 5G 8GB (Red) // iPhone 3G 16GB (Black) // AirPort Express Early 2008 (pre-n)
twitter | blog | lifestream | last.fm | facebook
Reply With Quote
  #2 (permalink)  
Old 21st September 2008, 11:25 PM
decryption's Avatar
APPLE TABLET MANIA!! ARHGAGAAHHHHH!!H!!H!!
 
Join Date: Jan 2004
Location: St. Albans, Melbourne
Posts: 18,075
Send a message via AIM to decryption Send a message via MSN to decryption
View decryption's Twitter Page View decryption's Flickr Page View decryption's Last.fm Playlist
Default

Nice write up!
__________________
Anthony Can't Write for Shit
Reply With Quote
  #3 (permalink)  
Old 23rd September 2008, 02:19 AM
Beau's Avatar
Plagiarism saves time.
 
Join Date: Jul 2007
Location: Sydney, NSW
Posts: 1,743
View Beau's Twitter Page View Beau's Flickr Page View Beau's Last.fm Playlist
Default

Update: *Should've* Fixed the server not quitting issue; replaced 'root' with 'mobile' in the config file
__________________
MacBook Unibody 2.4GHZ // iPod Nano 5G 8GB (Red) // iPhone 3G 16GB (Black) // AirPort Express Early 2008 (pre-n)
twitter | blog | lifestream | last.fm | facebook
Reply With Quote
  #4 (permalink)  
Old 23rd September 2008, 02:53 AM
 
Join Date: Sep 2008
Location: Sydney
Posts: 75
Default

Great find thanks for the head up!!
Reply With Quote
  #5 (permalink)  
Old 27th September 2008, 11:50 AM
 
Join Date: Sep 2008
Location: Sydney, Australia
Posts: 1
Default

Firefly won't stop using the killswitch in bossprefs.
also a bit OT, but is there anyway to edit or delete the custom bossprefs switches like the one you described how to add
Reply With Quote
  #6 (permalink)  
Old 13th November 2008, 08:11 PM
 
Join Date: Nov 2008
Location: Wetherill Park, NSW
Posts: 168
Default

thanks for the guide. Very helpful.
Reply With Quote
  #7 (permalink)  
Old 27th February 2009, 06:11 AM
 
Join Date: Feb 2009
Location: over there
Posts: 1
Default Problems getting Firefly to work

Thanks for this write up. I had this working one day but then I couldn't get it to come on again a few days later. In Boss Prefs it always toggles itself back off. I removed the server, rebooted the phone, and copied the files back over to where they should have been. loaded the plist but got an error saying it was already loaded so I unloaded it. rebooted. Loaded it and when I try to scan for files I get this error: gdbm fatal: read error

What can I do?
Reply With Quote
  #8 (permalink)  
Old 13th June 2009, 03:04 AM
 
Join Date: Jun 2009
Posts: 1
Default Can't get Firefly to work.

Quote:
Originally Posted by pinion View Post
Thanks for this write up. I had this working one day but then I couldn't get it to come on again a few days later. In Boss Prefs it always toggles itself back off. I removed the server, rebooted the phone, and copied the files back over to where they should have been. loaded the plist but got an error saying it was already loaded so I unloaded it. rebooted. Loaded it and when I try to scan for files I get this error: gdbm fatal: read error

What can I do?
I have the same error.
The strange thing is, first I had "Firefly Starter" (icon on springboard) to start the server, this worked well. But after some days it stopt working, couldn't get it to start again. After many clean installs etc. I quit trying until I found "FireFly Setup & Toggle", this worked, so I could go on streaming again. But as before, after some days I couldn't get it to start again. The server wouldn't start. Now I did a clean install again and tried it manually with above guide. Still can't get it to work.

in user Root in terminal:
-"gdbm fatal: read error" when mt-daapd.conf -f command is entered
-"nothing to load" when launchctl command is entered.
Reply With Quote
Reply

Bookmarks

Tags
ipod or iphone, music, stream


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On