Thursday, January 9, 2014

SD card image is back online at

Sorry it took so long but I've now uploaded the latest SD card image to which will hopefully handle the bandwidth needs. You can view my post about the SD card image and how to install it here.


Wednesday, December 11, 2013

SD Card images suspended

SD card image has now been reinstated and is hosted through, I'm still not sure what the daily/monthly bandwidth limitations of this new site are (can't find info for the free account) but hopefully it won't get blocked. View the SD Card image post here.

I received an email from Dropbox today telling me that all of my public links were suspended so in light of this I can't host the SD card images there. Since I depend on sharing other files with clients via dropbox I can't risk having my public links blocked again. I'm going to try and figure out a way to host them somewhere though or failing that start a torrent file.

I apologize for the inconvenience this may cause anyone, worst case you just have to follow the manual instructions which is actually better since you'll learn more :)

Work is still crazy and with the holiday season I don't have really any free time to dedicate to this so don't expect much until the new year.


Wednesday, November 13, 2013

Away from keyboard...

I sincerely apologize for the lack of updates etc. with this project, a few months ago I made a slight career change and left the company I'd worked at for the last 11 years. My new job is really cool but insanely busy so I haven't even had time to look at a Pi let alone do any coding.

I'm hoping that in December things will slow down to a more reasonable pace and I'll get a chance to do catch up on some of my projects.

Until then I'll do my best to respond to comments and questions as soon as I can.


Monday, August 26, 2013

A Quick PSA - A must have for Raspbmc - Wireless mini keyboard/mouse

I got this in the mail last week and I must say my XBMC experience on the Pi is 100 times better. They are on ebay for ~$15 shipped and supposedly are compatible with PS3 and Xbox 360 as well. The listing didn't mention raspberry pi at all but I figured I'd take the risk. When I first plugged it in nothing happened, rebooted the Pi and bingo it works perfectly.

If you hate using the on screen keyboard I highly recommend getting one of these, it'll be the best $15 you ever spend :)

I don't want to link to a particular ebay listing since they are only valid for a short time. Instead just search ebay for "wireless handheld keyboard touchpad" and you should see a bunch. Just FYI they come in white too.

For a few dollars more one of my favourite Chinese retailers looks like it sells the same one:


Sunday, August 18, 2013

PiFi Mini - SD Card Image

SD Image link reinstated, now hosted through here

For those who want to take the easy way out I'm providing an SD card image.


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:

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 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 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/ #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.


Wednesday, July 24, 2013

Help me get space to host an PiFi SD card image!

UPDATE: Thanks to those who signed up using my referral link, I now have a little more space and the pressure is off (for now), I won't stop anyone else who reads this and still wants to sign up since you get a bonus 500MB too and I can always use more space.

I'm getting ready to release an SD card image of the PiFi Mini project but my dropbox space is very low so I'm going to make a shameless plug :)

If I could just get 1 person to create a dropbox account using my link I'll get 500MB which is enough to host 1 image. If I get more then I'll have room to host images for future Pi projects etc.

For those of you who don't know what dropbox is they explain it better than I can

Basically it's free online "cloud" storage that syncs with a folder on your computer, you get 2GB free to start. It's invaluable for sharing content that's too large to email and is really hand when collaborating with others.

So if you don't already have it then do me a solid and use my referral link and I'll get an extra 500MB, I'm not sure if they're still offering it but you might get an extra 500MB too!


Sunday, June 16, 2013

Beware of ebay wifi dongles claiming RT5370 chipset

I just thought I'd give a quick PSA regarding buying wifi dongles on ebay. Sometimes I think ebay's tagline should read "Ebay : Caveat Emptor" instead of "Ebay : World's Online Marketplace" :)

I recently scoured ebay for usb wifi dongles using the RT5370 chipset for use in my PiFi Mini project, I'd found this chipset is nicely supported by raspbian and works great in both managed and ap modes.

I already had one kicking around which I used when I was developing the project but I found it's signal levels lower than they should be so I wanted to order a few others. I ordered two different ones on ebay, one with an external antenna and one without.


Does not work

The version without the antenna arrived first and works great (ebay seller ovolink) and I found the signal levels to be better than the original dongle I was using. A week or so later the antenna version arrived (ebay seller priceneer) but I didn't have a chance to test it right away.

Today I finally tried it and was surprised to find it did not work with my Pi. I plugged it into a Windows PC and using the Device Manager I checked the PID and VID numbers and found that instead of being vid_148f&pid_5370 it shows up as vid_148f&pid_3070. Even stranger was that after taking the casing apart I found the chip inside is indeed marked as RT5370???

As far as I can tell one of two things is happening here:
1) These chips are actually 3070 chips and were deceptively labelled 5370 or
2) They really are 5370 chips but the eeprom was programmed incorrectly.

Now with these dongles being as cheap as they are and all of them coming from China either explanation is possible, theory #2 could be a factory mistake and these were sold out the backdoor. Working in the electronics field I'm always astounded by the amount of fake/counterfeit/backdoor chips out there even when the real thing is only pennies a piece.

Further investigation showed that my Pi was loading the RT2800usb module and a bunch of googling found others had issues with this chipset. One solution shows installing ralink wireless tools, blacklisting the rt2800usb and instead loading the rt2870sta module. More work than a $6 dongle is worth for me at the moment so it's going back in the box for now.

I've sent and ebay message to the seller priceneer explaining that his listing is incorrect and asking if they are willing to do anything. Since it would cost me more than the $6 the dongle is worth to ship it back I'm not going to bother with that. I asked the seller at the very least to update his listing so that others aren't mistakenly ordering it thinking it'll work with their Pi. In their defence they might have been fooled themselves.

If you experience issues and your Pi doesn't seem to be working this could be your issue.

Checkign VID & PID in Raspbian:
Type the following into a terminal session:

One of the lines should read 148f:5370 if it is truly an RT5370 chip, if it reads 148f:3070 or anything with the last 4 digits being something other than 5370 you're likely going to have issues.

Checking VID & PID in Windows:
In Windows as soon as you plug the dongle in if you press the windows key + pause/break to open System Properties, then click on the Hardware tab, then click Device Manager, you should see a device with a yellow triangle and exclamation point and it will be listed as 802.11 n WLAN. Right click on this then click on the Details tab, it will show you the VID and PID numbers.

So in short, be careful when ordering dongles even if they claim to be a certain chipset. If your chipset isn't the 5370 you may be able to get it working by following some help online, however since I've not tested the RT3070 chipset I can't say whether it would work with the PiFi project.

Good luck and buyer beware :)

UPDATE:  The ebay seller Priceneer has contacted me and claim that they mistakenly sent me the wrong item and that they are willing to either refund or reship. They were really quick with a response and seem eager to help resolve the situation.

UPDATE 2: After a few back and forth emails it turns out they cannot send me a replacement that wouldn't suffer the same issue so they're refunding me and letting me keep the original item.