Saturday, December 26, 2015

It Worked For Me (Sort Of) - Raspberry PI and D-Link DWA-171A1

I recently purchased a D-Link DWA-171A1 Wireless AC Dual Band USB Adapter to use with a Raspberry PI 2 B after seeing a posting that stated that it worked out of the box.  Well…

It didn’t work out of the box but I was able to get it to work by compiling the driver.  I used this code from GitHub on the Raspbian Jessie image dated 11/21/2015

  1. Loaded the Raspbian Jessie image from here: https://www.raspberrypi.org/downloads/raspbian/ Linux raspberrypi (4.1.13-v7+)  to my SD Card.
  2. Added the following packages using apt-get: apt-get install dkms build-essential bc
  3. Downloaded and unzip the driver from abperiasamy/rtl8812AU_8821AU_linux GitHub repository:  https://github.com/abperiasamy/rtl8812AU_8821AU_linux/archive/master.zip
  4. Download the appropriate kernel headers for your version of Raspbian.  I found the ones I needed here: https://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/.
  5. Install the headers using sudo dpkg –i <package name>.deb.
  6. cd to the directory you unziped the driver into.
  7. Using nano or some other editor update the Makefile:
  8. CONFIG_PLATFORM_I386_PC = n
    CONFIG_PLATFORM_ARM_RPI = y
  9. The using the following commands build and install the driver.
  10. # sudo make clean
    # sudo make
    # sudo make install
    # sudo modprobe -a 8812au
You should now see the DWA-171 as a wireless interface and should be able to configure it.
I tried the same procedure using a Raspberry Pi B running Arch Linux with a 3.12.26-1-ARCH kernel and wasn’t able to get the driver to compile.
Thanks to all those who made resources available to help me along this journey.

Thursday, December 24, 2015

Project Raspberry Pi Music Player

Two weeks ago my wife informed me that the CD player attached to our stereo wasn’t working.  After a tinkering with it for a while, I decided that I wasn’t going to be able to fix it.

Over the years, we have moved from playing CDs to listening to music using computers, tablets and MP3 players.  The one time where we use the CD player is during the Holidays.

So now the holidays were almost upon us and no CD player.

I decided that this would be an opportunity to put one of the many single board computers (SBCs) to use.  I had a Raspberry PI B that I have been using in various projects over the past several years.  I had recently added a Raspberry Pi 2 B and a Raspberry Pi Zero so I figured I could turn the older system into a music player.

I figured correctly that given the huge community around the Pi that there would be at least a couple of options.  As it turned out I was not disappointed.

There are a number of options for music players for the Pi.  I checked out four of them installing three before finalizing on one.

The fist three volumio, rune, and Moode have the same look and feel as they came out of the RaspFi project and utilize the Music Player Daemon (MPD).  Pi MusicBox comes from a different lineage and has a different look and feel.

I installed all three RaspFi based versions.  There is one major difference between rune audio Player and volumio / Moode and that is that it is based on Arch Linux where as volumio and Moode based on Raspberian.  All three offer SD card images that can be downloaded, written to an SD card and insterted in the Pi and have you up and running in less than an hour.

These programs all support the Pi’s onboard audio as well as specialty Pi audio i2s audio boards as well as usb audio.  For my installation I am using the onboard audio.  With this setup I just needed a 3.5mm to RCA cable which I connected into my stereo receiver.

I started with volumio and had some success but the player ui would stall and leave me with spinning arrows.  I moved to rune audio Player and it was a much better experience.  I had some problems at first and that led me to check out Moode, but I didn’t like the ui as much and decided to go back and look at solving my problems with rune.

The first problem I had with rune was that songs would cut out.  Doing some network testing I determined that my wifi connection would drop occasionally and that caused the drop outs. The solution to this was to move the songs locally.  At fist moving the songs locally didn’t solve my problem.  Song continued to cut out.  I determined that the usb drive I was using was periodically resetting.  I moved to another usb drive and the problem went away.

I have been running rune for about a week now and am pretty happy with it.  I will detail my build over the next couple of days and post it here.