piCorePlayer LCD – Raspberry Pi with Squeezelite and an LCD screen

Thanks to a great Python script from WiredCharlie (LCD Player), an amazing application from Triode (Squeezelite), and a small Linux build for the Raspberry Pi (piCorePlayer); I am finally able to put together a squeezebox player for less than $50!

If you are not familiar with the squeezebox, it is a multi-room wireless music player that blows the doors off of Sonos and other competitive products. Unfortunately Logitech squashed the product, but luckily the community is keeping it alive! It is a amazing product that integrates with all major streaming services and also caters to the hifi user allowing for all forms of lossless and lossy audio formats.

Step 1:
Purchase the following –
*Raspberry Pi B+ ($35.00)
*8GB SD Card ($8.00)
*HD44780 LCD Screen ($7.00 or if potentiometer to control the contrast  is needed $10.00)
*Pack of resistors ($10.00, you only need one 50ohm resistor)

Step 2:
Wire up the LCD screen according to the schematic by WiredCharlie.  Notice you need the 47K potentiometer and 50ohm resistor in addition to the LCD:

piCorePlayerLCD-672x372

Step 3:
Load the following image from your machine on the SD card
Download Here

You can copy the image using “dd” if in Linux or Win32diskimager if in windows (win32diskimager).

Step 4:
Now insert the SD card into your Pi, connect and ethernet cable and boot it up.  After about 30 seconds you can search for its IP address via your router DHCP leases.

Step 5:
Now you can open a web browser and navigate to ‘http://IP-ADDRESS’ and then upgrade to the latest version of piCorePlayer by clicking the update button.

Step 6:
After updating you will need to make some minor modifications to the LCD python script.  SSH into the IP of the Pi (username:  ‘tc’ and password: ‘nosoup4u’) and run the following commands:

sudo vi /opt/bootlocal.sh

Scroll down to a blank line….press the ‘i’ key, and then paste in the following:

sudo /mnt/mmcblk0p2/tce/readsq.py &

Now press the ‘esc’ key, then press ‘:’, then type ‘wq’ and press the enter key.  You should have saved the file and returned to the shell prompt.  Now run the following code to save the changes to the memory card:

sudo filetool.sh -b

Now finally edit the script to control the LCD screen:

sudo vi /mnt/mmcblk0p2/tce/readsq.py

Scroll down and comment out the following lines by inserting a ‘#’ in the front of the two lines of code (line ~1000 so use page down).

subprocess.Popen(["/usr/local/etc/init.d/squeezelite_initd", "stop"])
subprocess.Popen(["/usr/local/etc/init.d/squeezelite_initd", "start"])

Now save and exit as described above using the vi commands.  Finally reboot the Pi to execute the new code.

Step 7(Optional):
If you decide to change the MAC address in the piCorePlayer Squeezelite GUI (so that you can spoof a real squeezebox player to listen to Pandora, etc.) you will need to edit the readsq.py script and change the following line of code.  This will read the new spoofed MAC instead of the hardware MAC address.

mac = subprocess.check_output("grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' /usr/local/sbin/config.cfg", shell=True).upper().rstrip()

You should now have a working player with an active LCD screen.  Happy Listening!!!

 

***Update:***

Code for the readsq.py file to update other versions of piCorePlayer:    readsq.py

Secure Erase – A Wonderful Utility to Securily Wipe Hard Drives

header-acs

I was looking for a utility to wipe a stack of old hard drives that I had in my lab.  We have all heard of Dariks Boot and Nuke, but I was looking for something that was Federally approved (HIPPA, SOX, etc.).  I stumbled upon Secure Erase which was created by G.F. Hughes, D.M. Commins, and T. Coughlin (Source).  From the documentation it states it is the following: “The ANSI T-13 committee which oversees the ATA (also known as IDE) interface specification and the ANSI T-10 committee which governs the SCSI interface specification have incorporated into their standards a command feature known as Secure Erase (SE).  Secure erase is a positive easy-to-use data destroy command, amounting to “electronic data shredding.”  It completely erases all possible user data areas by overwriting, including the so-called g-lists that contain data in reallocated disk sectors (sectors that the drive no longer uses because they have hard errors in them).  SE is a simple addition to the existing “format drive” command present in computer operating systems and storage system software and adds no cost to hard disk drives.  Since the Secure Erase command is carried out within a hard disk drive it doesn’t require any additional software to implement.”

Perfect!  Just what I needed.

The next step is to create a USB bootable drive (MSDOS) and then copy the HDDErase.exe to it.  I used my favorite USB creation utility (rufus) and booted up a machine with the hard drive I wanted to securely erase.  Within 60 minutes it was complete and safely destroyed!  Thanks for a wonderful utility!

You can download Secure Erase here:
HDDEraseWeb.zip