Raspberry Pi - SqueezePlug

Purpose

To create an in-car media server to allow the playback of music across the car stereo (in-line or bluetooth), or individual clients via WIFI, and also allow for video to be played to multiple hand held devices via WIFI using uPnP/DLNA technology.

Hardware

Raspberry Pi

I'm using version B which consists of 2 USB ports, 10/100 Base LAN port, and 512Meg of RAM.

WIFI Adapter - TP-Link WN725N

I picked this up on the cheap as it was on sale at the local computer store. It was a bit of a bear to setup on the Pi, but now working, the Pi acts as an access point, and the TP-Link router I was using isn't required anymore. This improves install complexity, as now there are less devices and cables to setup. The system will no longer be open, and is protected by WPA2 encryption.

Router - TPLink SOHO TL-WR740N 150Mbps Wireless N - not required anymore

I bought this router to act as a guest router in my house, but it will double up for use in this project when we are on road trips. It is a basic wireless N router with 4 network ports (non-GigLAN). It has the default firmware installed, but supposedly it can be used with DDWRT. This will be hardwired to the Raspberry Pi, and be an open service to the IPod Touch's.

USB Hub - Targus ACH82EU - 7-port USB 2.0 Hub

This acts as a multiport USB hub for connecting devices both to the Raspberry Pi, and to serve as a charging station. It is a 7-port hub. Pretty much a dumb terminal as it has no LED indicators of any sort. It will serve as the inter-connect between the RPi and the hard drive. This is because I didn't want the drive to be powered directly from the RPi. It's USB is limited to standard current limitations of about 500mA. Considering the RPi draws about that much from the inverter, if the drive was powered from the RPi direct, there could be issues.

The hub will also be used to recharge both iPods and can be even used to recharge other small devices like the cell phones, but will not charge a tablet since each port is limited to 500mA.

Hard Drive - WD Elements SE WDBPCK0010BBK-NESN

1 Terebyte external drive, 2.5" format. It is small and quiet, and should serve nicely as not only the storage drive in this project, but just a general backup drive.

Power - Schumacher PID-410 - 410W 12V inverter. - not required anymore

This is a 12V 410W inverter with 2 AC outlets, and 1 USB outlets. Not only does it have multiple levels of protection, it also includes a display that cycles between showing AV voltage, DC voltage and power draw. The system below draws less than 3W of power.

Clients

2x iPod Touch Gen 4 running 8Player uPnP apps for connecting to the server.

1x "RAVputer" Samsung tablet using the BubbleUPnP app.

Software

SqueezePlug v6.0.2 on an 8Gig SD Card

SqueezePlug has installed and configured the Logitech LMS Server (as of Sept. 8th, 2013), which is a free media server. It also installs a basic version of Raspbian Linux OS...which has been updated to v3.12.22+.

Setup

The general wiring interconnect is shown below:

The previous setup (version v1 I will say):

Log:

I received the Raspberry Pi a while back, and played around with different OS's. During this time I did quite a bit of research on what and how to stream video from a server to an iPod. I originally wanted to stream straight mkv files, and found a VLC setup that could do it from a Windows machine acting as a server to a VLC client on the iPod Touch. It seemed to work, and I found a Linux Debian distro, but figured it would not work on the Pi.

I then discovered SqueezePlug for the Pi, and installed that on a SD card. Setup seemed simple enough, I set up MediaTomb, and LMS servers. I wanted to setup a Samba share to my unRAID server, but it just didn't work. I finally used a small sized flash drive a put some test mkv sample files on it. I then sampled a couple of different lite versions of uPnP client apps on the iPod (8Player and Media Player Lite). The mkv test files were 1080p trailers, and they seemed to play rather well. They didn't exhibit any skipping or stuttering at all. This first test seemed a success.

The second test was to playback two different streams to different iPod's simultaneously. Again I used the sample mkv trailer files, and both iPod's played back the files successfully...again no sputtering or stuttering in the audio/video.

The third test was to play the same sample mkv trailer on two iPod's at the same time (staggering the start times). This third test was also a success. At this point I felt pretty confident that this project would be a total success.

During testing, I was also settling on 8Player over Media Player Lite. The interface was easy to navigate, and just the general control and video quality seemed better. Though many spoke of Good Player being an excellent app, but at the time, since I was still in the testing phase, and you could only purchase Good Player, I felt that it was to early to make a purchase on something I wasn't sure would work.

Feeling more confident that my test files played back fine, I went and purchased the WD Elements 1T hard drive. Figuring my mkv files are either 720p and 1080p, ranging between 4 Gigs in size to 15 Gigs. They would fill up a 1 Terebyte drive rather nicely. So I threw a bunch of movies on the drive and tried it out. Well, that's when I discovered that 8Player Lite had a 5 video limit. To playback more than 5 videos in the library would require the purchase of the standard "Pro" version.

But worse...the video playback was horrible. 1080p streams would stutter...to much to even enjoy. So I converted the 1080p mkv's files to 720p, but the problem was persistent. I also converted the audio to aac from dts and ac3 formats, but this didn't make a difference. Figuring my WIFI could be at fault, I tried to play the files from the setup to my Windows computer with MPC, and 720 streams played back just fine...so my wireless wasn't an issue after all.

Demoralized, though not defeated, I found a setting in Handbrake to convert video to iPod Touch mp4/m4v standard. Basically the video was 480p, and aac audio. Well this proved to be the difference, as I also found out that iPod's max resolution was 720p. That would explain why it would stutter at the greater resolutions.

So off I went and converted video to this smaller resolution, and started to test them.

One stream on a single iPod Touch was a success.

Two streams on two different iPod Touches was also a success.

My confidence was back again, so I converted my children's movie library (or at least a good chunk). The files are a fraction of the original size, but they look just fine on the iPods small screen. Now I decided to purchase Good Player. The one thing I do like about Good Player is that it is very configurable. Lot's of different settings can be set to accomplish just about any sort of playback. But after configuring it, and playing with the settings, the playback of even this simple streams would produce stutters occasionally, which I didn't experience when using 8Player Lite. I then realize that Good Player was a waste of money, and I should have just payed a little more and got the Pro 8Player, to which I did in the end.

The final test is now to pick up the inverter and try out the setup in the actual car. The results of that test will be here so stay tuned.

*April 21, 2013*

Well the past weekend, I was able to try out the setup in the car. Set it all up, and I was a little worried that the inverter would have issues supplying enough current from the USB port to power the RPi. In the end, everything powered up. The inverter reported that the system was only drawing 3W of power, which was good, as the 12V port that it was plugged into could only supply a max of 120W.

The system finally booted up, and the iPod was able to connect to the MediaTomb service, and I started to playback some video. No stutters. WIFI signal was good and strong. Now to teach the kids on how to use 8Player, and we should be set for those long road trips.

I guess the final question will be if this WIFI signal will interfere with the Bluetooth radio signal, like the WIFI from my phone actually does...but that's another story.

*September 17, 2013*

I started to use the SqueezePlug server more now that I have the Samsung tablet, but something happened to MediaTomb. I could no longer find it via the clients software. I tried re-installing it, using different SD cards, but nothing would correct the issue. Even after a clean install of the SqueezePlug server, I installed both the LMS server and MediaTomb. LMS was found by the clients, but not MediaTomb. So I ended up uninstalling MediaTomb, and am just using the LMS server from here on end. After playing around with it, it is a pretty nice server. Good graphic web interface, and can be set for not only music (like I had first thought), but photos and video as well.

*June 24, 2014*

I've decided to make some changes to this system. I ended up picking up a TP-Link TL-WN725N USB WIFI adapter that was on sale real cheap from the local computer store ($10+tax), and made a good stab at setting the Raspberry Pi up as an access point. Doing this I was able to remove the 9V regulator board and the WIFI router (and additional network/power cables). Other future mods will be the USB power hack as I've done to the Pi system in my LightshowPi project. Also I was considering picking up a 3A RPI shutdown switch from Mausberry. This comes with two USB ports, one to power the Pi, and the other to power the USB hub...or maybe I will just power the Pi from the USB hub, and use the second port from the switch to power/charge my tablet. Have to decide on that. In the meantime though, I will continue to use the hookup as indicated above...using that 5V regulator/converter board. I just have to shutdown the RPi manually, connecting to it via the JuiceSSH app.

Anyways, the addition of the WIFI dongle was not as easy as I had thought. I had done some research before picking up the unit, and from a Wiki page, it indicated that the unit worked well as an AP for the Pi, and even worked fine plugged direct into the Pi's USB (not requiring the hub). So I picked up the dongle, only to find out after that there is a Rev Version 1 and a newer Version 2 (v2), which was the version I picked up. I found out that v2 was less compatible to the Pi...and was not a simple plug and play device, as the Linux drivers have not been completely developed. Reason being is that TP-Link uses Realtek chips, and they changed their chipset from v1 to v2. I also found out that my SqueezePlug OS was running on a Raspbian Linux version 3.2.27+, which was very much out dated and not compatible with the v2 dongle. So I had to do the following:

1) Update Raspbian - which I could do within the SqueezePlug setup (SSH terminal using Putty, once logged in, type in setup, then under Advanced Settings). After letting this run...and it took a while, I was finally running Raspbian version 3.12.22+

2) Followed the information from this website. This would get me the most recent RPi Linux drivers for the WN725N dongle, and the basic setup for getting the installed on the RPi. But it still didn't work after following that page down to the letter.

3) It wasn't until I found this website and followed it, I finally got the dongle to work.

It took a few frustrating hours over a course of a couple of days to finally get the dongle to work, but now I have a full fledged RPi AP. I tested the connection using BubbleUPnP that I have running on my tablet and phone. Initially it was a little slow to find the AP, and once connected to it, it was a little slow before BubbleUPnP was able to find the SqueezePlug's Logitech LMS server. But once connected, it played video fine. A good test may be when we go camping this weekend. I may bring the system so the kids have something to watch when they go to bed at night. I tested it with one of the Ipod's and it seemed to work just fine. Good connection, and played a movie no problems.

*July 3, 2014*

Well after the weekend of playing around with the setup while camping, I came across a few bugs in the system. Most minor, but one major. Minor bugs were the system not booting up properly, which led to the RAVPUTER not finding the LMS server. This may have been because I was moving the system around in the car, and may have un-seated the SD OS card in the Pi card slot. The major bug, which I'm trying to figure out now is that the Squeezelite player refuses to connect to the LMS server via WIFI. I found this out by running a debug command, and was getting a constant error return when the system was querying the network for the LMS server. It wasn't until I was home and decided to plug in the LAN connection, that it found the LMS server and everything seemed to be fine. So now the question is how do I force Squeezelite to find the LMS server via WIFI and not a hard-wired LAN connection. I've posted on a few Pi forums to see if anyone has any ideas.

*July 6, 2014*

Continuing where I left off, I was having no success in getting Squeezelite to run properly. I found this one Raspberry Pi forum thread which gave me some ideas on what to try. I even added my issue to it, which I received some good advice, but I still wasn't having any success. I then found these instructions on installing a standalone version of Squeezelite. I basically followed them to a tee, and next thing you know, Squeezelite was running. I rebooted the system, and Squeezelite was still running. I could see the player in the LMS web interface and on my tablets BubbleUPnP Devices tab to control.

I'll still be testing it out for the next few days but I think I finally found a sound solution to this Squeezelite issue. Now getting Squeezelite to work, I don't particularly like the sound output of the player through the onboard audio. My LightshowPi setup isn't this noisy using a different player and it too is using the onboard audio. So my next step, should I continue to use Squeezelite on a regular basis, is to pick up an USB audio adapter. The local computer store has a Creative Labs adapter for just over $20. I'll wait for it to come on sale.