For those who want to take the easy way out I'm providing an SD card image.
PLEASE READ THIS FIRST
What you need:
Raspberry Pi, model A or B, rev 1 or 2.
USB WiFi Dongle - RT5370 chipset (preferred), or RTL8192U chipset.
*According to one user the RT5372 chipset also works, this is unverified by me so try it if you already have one but if you're buying one get the RT5370 to be safe.
USB Keyboard (for initial setup only)
USB Thumbdrive (Optional - for storing your music)
This image is pre-configured for use with an RT5370 based wifi dongle.
Manual configuration will be required if you intend to use the RTLl8192U chipset, if you're using this chipset note that airplay via AP mode will not work properly. I strongly suggest buying an RT5370 based dongle instead but read this post first before buying on ebay. Instructions for the RTL8192U changes are included near the end of this page.
Note if you plan to add an LCD screen as per part 2 of my tutorial be aware that this image is pre-configured for a Rev 2 Pi, if you're using a Rev 1 pi then you will need to change some files as shown below in the Rev 1 LCD changes section. Just to clarify as of right now all model A pi's are considered rev 2, if you have a model B you can tell if it's a rev 2 by the fact that it has two mounting holes.
You will need an SD card at least 2GB in size but 4GB or higher is highly recommended!
First download the image from here.
Instructions for how to write the image file to the SD card are here:
http://elinux.org/RPi_Easy_SD_Card_Setup
For windows use the Win32Disk Imager instructions, to be safe remove any other removable drives and triple check that the drive letter is your SD card before writing! For Mac I'm sorry you're on your own since I've never done it, I'm sure if you google it you'll find lots of help though.
First boot if using an RT5370 based dongle
1. Once you have the image written to your sd card place it into your Pi and boot it up.2. Since no network is configured the PiFi will fail-over into AP mode, it will take a little while to do so.
3. Using a wifi capable device (smartphone, laptop etc) watch for the PiFi_Mini_AP network to appear.
4. Connect to it and enter the password pifimini00 when prompted. It may take a little while for the connection to fully establish.
5. Once connected open a browser and enter 10.10.10.1 to open the web interface
6. Choose Easy Wifi Setup and enter the SSID and Password of the network you wish to connect to.
7. You can also view the instruction manual if you require more information.
8. Once rebooted it should connect to your network, if it doesn't and it fails over and creates an access point again then you've probably entered some information wrong. Try again.
Basic config for both RT5370 and RTL8192U (set timezones etc)
Note: The following settings are for Canada and US, hopefully if you're from another country you can figure it out for your needs. The image default settings are Int'l 102 key keyboard, en CA local, Regina, SK Canada for timezone (UTC -6:00 no dst).*If you're using an RTL8192U chipset dongle do not plug it in yet, RT5370 users can have theirs plugged in though.
You'll need to connect a keyboard and a display connected to the Pi. Boot up and login, then type
Now if you're using an SD card >2GB you'll want to first choose expand_rootfs.
If you're not in Canada choose "change locale", for US choose both en_US.UTF-8 and en_US.ISO8859-15 by pressing the spacebar, press tab to highligh Ok and press enter.
Choose "change_timezone"
If you live in Canada or US chose America, then on the next screen find the closest city to you that's in the same timezone.
If you want to you can choose "change_pass" at this point to change from the default "raspberry" password.
DO NOT CHOOSE UPDATE - That could break stuff and since it ain't broke already we don't want to fix it :)
If you're using the RT5370 chipset you should be good to go, press tab and choose Finish. If you chose to expand root fs it may ask you if you want to reboot now, go for it.
If you're using the RTL8192U chipset you're not done yet, press tab and choose Finish. If you chose to expand root fs it may ask you if you want to reboot, choose no and proceed to the next section.
Extra config for using an RTL8192U based dongle
1. First we need to switch the hostapd binary file
2. Now we'll swap the hostapd.conf file and then safely shut down the Pi.
5. Wait about 30 seconds until there is no LED activity on the Pi, only the PWR LED should be lit, unplug power.
6. Plug in your wifi dongle and apply power to the Pi again. This time the unit should fail-over to AP mode, this takes a little while so be patient it's not broken :) If it takes more than 5 minutes then maybe it is broken.
7. Using a wifi capable device (smartphone, laptop etc) watch for the PiFi_Mini_AP network to appear.
8. Connect to it and enter the password pifimini00 when prompted. It may take a little while for the connection to fully establish. If using an iOS device wait until you see the wifi symbol at the top of your screen, this indicates you've obtained an IP from the PiFi.
9. Once connected open a browser and enter 10.10.10.1 to open the web interface.
10. Choose Easy Wifi Setup and enter the SSID, Encryption Type, and Password of the network you wish to connect to. Then click "Submit & Reboot'
11. You can also view the instruction manual if you require more information.
12. Once rebooted it should connect to your network, if it doesn't and it fails over and creates an access point again then you've probably entered some information wrong. Try again.
Optional - USB Thumbdrive
The PiFi is configured to automount any USB thumb drives you plug in (note if you want to use an external hard drive they require more power and you'll need a powered usb hub). Simply place your music on the thumbdrive and insert into the PiFi. You'll have to refresh the mpd database to see the new songs, instructions vary depending on which app you're using to control MPD or if you're using the web client. In the user manual there are instructions for how to do this using the built in web-based MPD Controller.NOTE: If you want to remove the USB drive while the PiFi is powered always use the web interface and select "Eject USB Drives", if you don't you could corrupt your USB drive.
If using an LCD display...
If you're going to be using an LCD screen you'll still need to follow part 2 of my other tutorial for wiring etc.On the software side there are a few things you'll need to do.
For rev 1 Pi users only you'll need to switch the LCD.d conf file
Connect the pi up with a monitor and keyboard and login.
If you have an LCD connected you should see it text and the "Welcome to PiFi Mini".
For both rev 1&2 Pi users you'll need to edit your rc.local file and uncomment the lines which start the lcd script in both normal and AP modes.
Goto line 45 and remove the # from in front of this line:
#python /etc/mpc_lcd_info.py& #start lcd script that displays mpd info
Do the same on line 75.
Press control x, press y, press enter. Reboot (type sudo reboot) and you should see the welcome screen come up and after a short period of time you should see song info etc.
Enjoy!
This comment has been removed by the author.
ReplyDeleteI need to download the image as it is deleted in dropbox.
ReplyDeleteI am very interested to do this project on my raspberry pi.
You can use to upload https://mega.co.nz/
Thanks for your attention.
Hi Victor, I apologize that I haven't had time to fix this yet. All of the info is there if you want to try setting it up yourself. I will try and look into the various options people have suggested within the next few days. I am a little leary of the Mega site just because it got taken down. I don't want to put the image somewhere and then have to do it all again a month later because the new Mega site gets shut down again. Thanks for everyone's interest in the project! Hopefully we'll be back in business soon.
ReplyDeletethank you very much for responding so quickly and I know many doubt on mega seen what happened with megaupload. I would appreciate it solve the problem by Property File I've been preparing for this project for over a month. So I would be extremely grateful if you would help me to download the file. Greetings from Madrid.
ReplyDeleteThanks again Victor, its awesome that people from around the world have been building my project! Just FYI I'm currently uploading the new image to Mega and will post the link tomorrow (my upload speed is painfully slow). I feel bad I haven't had the time to properly get back into the coding and improve it, I recently switched careers and have been busy. Since you are from Madrid I'm assuming you heard about this from Fernando's post on http://www.xatakahome.com?
ReplyDeleteHello jph,
ReplyDeletei am trying to foolow your tutorial now for days, i love it without even haveing it gotten to run.
Now I wanted to use your sd card image. My tv is not giving any signal over hdmi...is this turned off? I believe i have to use some display because wifi is not yet ready!?
I have now recognized that the extracted image doesn't boot at all in my RasPi.
DeleteI tried two different SD cards.
Could the boot partition be the problem? In my windows environment, it is not referred to as "boot", whereas usually raspbian images are.
(PS: I have extracted the image with win32diskimager)
With the risk of spamming this blog in mind, I'd like to add my latest experiences.
DeleteI overwrote all the files in the boot partition with files from a fresh raspbian distro and the Pi finally bootet (Model B Rev 2 RasPi from China, 8gb sdhc class 10 from sandisk).
So in my case the boot partition in your image had some problems.
But after that fix it still didn't work properly, my wifi dongle (Edimax, i know about the problems) was not recognized by the bootstrapper. I first tried a workaround with another hostapd from some other site, also didn't work.
sudo apt-get update && sudo apt-get upgrade finally brought it all into place. Now it works! Just great!
Thanks again for this nice blog! I will continue and build (or better: have built) a box on my own. I will try and add some buttons for selection of songs.
One final question: do you know something about the possibility to show airplay information on the lcd? That would be the icing on the cake.
Hi Dirk, sorry I wasn't able to get back to you right away but I'm glad you got everything figured out. After uploading the image I haven't had a chance to download it and verify the integrity of the uploaded image, it is possible that something was corrupted either during the upload or during your download. I'll look into adding an MD5 checksum or something.
DeleteI actually have buttons working, the scripts may even be in the current image, however just when I had that part done I switched jobs and I haven't had time to really touch my Pi since. The rest of January is busy, maybe in February I'll get a chance to sit down and code again.
As for Airplay, the guy that reverse engineered the code basically did enough to accommodate what he wanted to do but didn't implement a lot of the other stuff. I haven't checked the "Shairport" project website for awhile so maybe he has but if not we're kind of stuck with what we've got. I agree though, having song information on the Pi would be the icing on the cake.
This comment has been removed by the author.
ReplyDelete