Tag Archives: music

Sonos music using external HD on Raspberry Pi

You can attach an external hard drive to a Raspberry Pi and then share music over Sonos. This works very well. Even though my hard drive is connected to the rPI via USB 2.0, the music streams fine, no stutters.

Right now I’m playing Jeff Buckley’s ‘Sketches for My Sweetheart The Drunk’ all over the house. “Vancouver” track is so awesome!

Technically this kind of storage sharing falls under the term Network Attached Storage (NAS). But, that seems like an overblown term for just sharing one disk. There are a lot of features on a full-blown NAS.

How does the RaspberryPI share the storage? By running a server called Samba. This is a set of open-source programs that run in Unix/Linux to provide file and print services compatible with Windows-based clients.

Spin down?
Currently I’m looking into how to enable spin down of the hard drive when idle. Necessary? Supposed to make HD last longer. I just want to reduce power usage. The whole point of a Raspberry Pi in this scenario.

Maybe this page, “Spin Down and Manage Hard Drive Power on Raspberry Pi”, will help.

Update:
Feb 1, 2015
hdparm and sd-idle did not work. trying SDPARM.
sudo blkid
shows:
/dev/sda1: LABEL=”USB B” UUID=”B23A8B373A8AF81D” TYPE=”ntfs” PARTUUID=”b75ac8d0-01″

sudo sdparm –flexible –command=stop /dev/sda1
shows:
/dev/sda1: ST325082 3AS

Feb 3, 2015
The spin down using sdparm is working fine.

Hardware Used

  • Raspberry Pi 2 (Canakit Ulitimate Starter Kit with WIFI)
  • Old USB hub from Staples
  • 3.5 inch 1 GB Hard drive
  • HexStar-3 3.5in External Hard drive enclosure

Technical details
I had a lot of grief getting it to work. Haven’t touched a Linux system in while.

Some articles of the many articles I found information on how to do this are in the links section below. Note that there isn’t one single approach to do this. And, it also depends on what OS your running on Raspberry PI. I’m running Raspbian which I installed via NOOBS; all included in the kit I purchased.

Links
Other articles about this approach:

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Mobile music briefcase using BitTorrent Sync

Streaming, cloud, social, …. Nice stuff! But, what if your behind a firewall and have to rely on the local storage on your mobile device? I was thinking on how to solve this situation, a listen later briefcase.

Use Case

  • You want to select music files to listen to on a device.
  • Costs, Security, and bandwidth limitations preclude streaming.
  • Security will not allow use of thumb drives and other ‘attachable’ devices.
  • You should be able to delete these files.
  • Removing them should not delete the original files.
  • These files should be quickly and securely transferred.

This approach is just a modern version of the “CD storage case” we used in the old days to store some tunes for the long drives.

Solution
One way of implementing this is using BitTorrent Sync (BTSync). Basically we create a “briefcase” folder where we will drop copies of what we want to listen to later. To make this easier to follow, I’ll use the origin as being a Desktop PC. We also create a folder on our mobile devices that will be synchronized with the other folder. BTSync will handle the process of keeping these folders in sync. And, since BTSync is so fast, the sync will happen as the files are dropped on the briefcase folder.

    PC                          Device
+--------+     +---------+     +-----+
| Music  | === |Briefcase| ~~~ |Music|
+--------+     +---------+     +-----+

Though mobile example is used here, the device could be anything, even an automobile with advanced music system. While it is parked in front of home, it could be “charging” on some tunes.

How to setup
1. Of course, you have to first have BTSync installed on both the PC and the mobile devices.
2. Then on your PC run BTSync and choose “Add folder”.
3. Click ‘Generate’ button to generate a secret key.
4. Click ‘Browse’ to navigate to the folder to use as the Briefcase. (I used “Music-BTSync” as the name).
5. On mobile devices create a folder that you want to use as the listen later storage. (I created a “Music-BTSync” on my external SDCard).
5a This folder must be accessible to your mobile music player application.
6. On your mobile device run BitTorrent Sync and choose ‘Add Sync folder’.
7. Use the folder created above.
8. Now we have to get the secret read only key from the PC to the mobile device.
8a. On the PC, share the “Briefcase” folder. By using the mobile option, you can generate a QRcode.
8b. On mobile device, scan or enter that key.
9. On the mobile device, on BTSync’s list “MY SYNC”, the new folder should be listed (mine was music-BTSync).
10. Click the settings sprocket to the right of it.
11. Check on “Automatic sync”

Testing
Loading: Just copy an mp3 into the Briefcase folder on the PC. It should immediately be copied to the mobile device. With a File app on the device you should be able to see it in the sync folder.
Deleting on PC: Delete the file from the Briefcase folder on PC. It should be deleted automatically on the device.
Deleting on Mobile: Load another file on PC, it gets copied. Now delete that file on the mobile device only. It should remain on the PC. This is because of the use of the ‘Read only’ secret key. To change this behavior, do the sharing using a regular secret key.

Listening
This where the problems start. The ability to access and automatically refresh a changed folder varies among portable music player apps. Some like Google Music Player, for example, doesn’t even expose the concept of file folders and other nice to know configuration settings. Poweramp is better in this regard, with some prodding it recognized the new synced files. Still looking for a player that will behave with this sync process.

Alternatives
Various music apps have ways of using caching to store music. They also have various sync capabilities. However, these could be difficult to use in this scenario. Plus, the various parties are trying to monetize content, so optimizing the use of your private music collection is not a great concern.

Does it work?
This morning I put gigabytes of music on a folder on my PC, BTSync synced it to my phone. Now I’m listening to Black Sabbath and Barry White at work. How cool and eclectic is that?

Notes
Microsoft Windows used to have a Briefcase feature. It was removed in Windows 8. This was a limited two-way file synchronization process. With BTSync, there can be many folders in sync. For example, multiple mobile devices can sync to the same PC or home folder.

Tested on
Galaxy Note version 1
Android 4.1.2
BitTorrent Sync v1.3.21.0

Windows 7 64bit
BitTorrent Sync 1.3.94

Related links

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Sonos Wireless HIFI system setup

It was time to upgrade our home music system. The Sonos system met the requirements. At the store I compared Play:5 sound to a Bose system. The Bose sound seemed slightly better, at least with the demo music it was using, but appeared (at the store) to be an iPhone based system and I use an Android smartphone. Since I don’t listen to pop music, and excess bass, I picked the Sonos and don’t regret it.

Setup is easy
Installing was pretty easy. Connect a Sonos Bridge (a separate purchase) to the network, install the Sonos controller app on the smartphone, press a button on the bridge and then on the player. Now you can control the player. The app is not bad. (The current version 4.1 is awesome).

Update:
April 19, 2014: I just saw on news that Sonos is thinking of not requiring the Bridge component: Our Vision for Rock-Solid Wireless, Evolved.

Accessing a folder
So far so good. This is where the problems began. How to access my music on the Windows 7 PC? No matter what I tried, could not access a shared folder. Opened up firewalls, looked at ports, etc. Looked like router issues. Luckily I still had my old wifi router switch that I was using before FIOS was installed to replace cable. I connected that router to the new primary router using a Cascade configuration. I set the music folder on the PC Shared access and tried again. it worked! I can see the file folders now. Not really sure what really made it work. Now I have yet another tangle of wires.

Result
So, what do I have now. I can control Sonos using my Samsung Note running the free Sonos app. The Sonos sounds great. The access to music is fast. In contrast, trying to access music folders using DLNA is torture using my networked Sony TV.

PC Controller won’t install
See solution below.

I tried installing the Sonos controller on Windows. At one step it asks that you press a button on a Sonos component on the network. I press the button on the Bridge, the software says, I found it, then it attempts to set up the connection. Finally, it says it did not find anything. Doh!

Before you get a Sonos check the network hardware compatibility. Unfortunately, the solution offered on this page makes no sense:
“A third party wireless access point is needed. Sonos Controller for iPhone or SONOS CONTROL that are wireless should be associated to this third party access point and not the Actiontec/Qwest.” Ok, how?

Things I tried:
– Connecting the PC directly to the bridge, then the bridge to the old router. Same problem.
– Turning off Windows firewall. Nope.
– Reinstall of controller. Nope.
– Firewall in the router. Tried once, and router ceased working. Had to reset it and configure my network. Yeech. Do non-computer literate people buy this stuff?

I did not try turning off the WIFI in the Actiontec router. I’m surprised Fios is installing this router that may have issues.

Do I return the system? One part of it doesn’t work, the PC software. I got used to the sound and the ease of access to music and radio. Pandora is awesome on this.

PC Controller install SOLVED!
Turns out the Sonos system was trying to use a second network adapter running on my PC, VirtualBox Host-Only Network. Once I disabled that, the Sonos controller installed. I found the solution here, Using a Sonos Desktop Controller with a VPN or VMware adapters.

If you have the Android app do you really even need the PC Sonos controller. Yes! The phone app is good but nothing competes with a large fast easy to use system.

Now I’m piqued, is there any way to associate the controller with a specific adapter? Why doesn’t this cause problems elsewhere? So, if I have to run my Ubuntu in VirtualBox I can’t also run my Sonos controller in the Windows PC?

Update: August 31, 2013: Strange I can now run Sonos controller on PC while running Ubuntu Linux in a Virtual Box. No network issues. Hmmm.

Laptop Controller install not solved
While the PC controller install now works, the install on a laptop that is connected to network via WIFI does not. I think I will try disabling the WIFI on the actiontec and just using the WIFI on the LinkSys router. Will update when I find out if this works.

Environment

  • Windows 7 64bit
  • router: Actiontec MI424WR
  • router: linksys WRT54GS
  • Sonos: Player:5
  • Sonos: Bridge

Links

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

play music app won’t show sd card

On Samsung Galaxy 2, mp3 files stored on the SD card are not being recognized by Google Play Music app. Solution.

I tried some ideas found on Android forums, even uninstalling and reinstalling the app. Nothing worked.

BTW, There is some weird caching that is not shown in the system. Anyway, this is what I did:

  1. I copied everything on the sd card to a a folder on a Kies Air attached PC.
  2. Deleted the files from the sd card.
  3. Powered down the phone.
  4. Turned it back on.
  5. Ran the Play Music app.
  6. It said there is no music on device.
  7. Copied all the music from the folder on the PC (from step 1).
  8. Powered down and back up.
  9. Ran the app again.
  10. Says it is scanning for media.
  11. Finds it.
  12. Give the phone back to it’s owner. Yuck.

All the steps are probably not necessary, but this worked for me.

Update
March 2, 2013: It started happening again. Maybe its time to update to Android’s Ice Cream Sandwich version.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Leonard Cohen’s new CD “Old Ideas”

What is there to say? Another masterpiece. The lyrics/poems, vocalists, instrumental accompaniment, CD packaging, and of course LC.

More

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Eliades Ochoa

Eliades Ochoa achieved world wide fame with his involvement in the “Buena Vista Social Club”. He has not slowed down.

If you listen closely to his works you’ll notice that his guitar playing is actually quite fantastic. Yeah, yeah, rock star X can shred your face off … lol!

Hailed as a “Cuban Johnny Cash,” Eliades Ochoa has an earthy sound and rustic style (topped off by his trademark cowboy hat) that is all his own. The Grammy-winning guitarist and singer was born in a rural mountain town, where he picked up his first tres guitar at age 6. He hasn’t stopped playing since. The self-described “Guajiro” (Cuban provincial) offers piquant renditions of son, guararcha, bolero and changuï, resulting in memorable collaborations with Bob Dylan and, most famously, Buena Vista Social Club. In 2006, he released Se Solto un Leon, a reference to his first album, A Lion is Loose. — from http://www.montrealjazzfest.com/artists/artist.aspx?id=7274

Links

sublime ilusion – Eliades Ochoa

ELIADES OCHOA,PINTATE LOS LABIOS MARIA

eliades ochoa-mi magdalena-.mpg

Eliades Ochoa, Yiri Yiri Bon

AfroCubism

Eliades Ochoa – Volver

Buena Vista Social Club – Chan Chan

Eliades Ochos guitar solo – Buena Vista Social Club

el carretero

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.