Sunday, January 27, 2013

Using your Pogoplug with LMS

Observations
I had a problem last night where it was very slow in responding.
But, I had been tweaking the options in my wireless router, and had messed with things when I was setting up a 2nd pogo.

I elected to reinstall everything, I reimaged the USB stick to the VAMP image and then reinstalled LMS. At this point, my network didn't show the Pogo anywhere, so I did it one more time, and it worked fine.

Shutdown
I always shutdown by typing "shutdown now" from a putty session, but there were times when I would shutdown, restart, and it wouldn't come back on my network.
I think I wasn't waiting long enough.
When you unplug power, leave it powered down for at least a minute before plugging power back in.
When I do that, it always seems to come up.

Fixing problems
It is a pretty simple system, but I have had a couple problems, and it can be a little hard to figure out what's going on.

One problem I had was somehow my USB hard drive got messed up, and then things stopped working, caused some head scratching.
So, if your Pogo stops coming up, so you don't see the green light, can't log in or see it in your internet program anymore, then try turning it off, unplugging the hard drive, and turn it back on and see if it works then.  It if works without the hard drive, you need to check your hard drive.

EDIT Feb 24
I have also had problems where the hard drive was fine, but the pogo wouldn't come up with the hard drive connected, but if I disconnect the hard drive, then it does come up.

If you type "df" in a pogo session, you should see something like this:


Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                   127204         0    127204   0% /lib/init/rw
udev                    125128       144    124984   1% /dev
tmpfs                   127204         4    127200   1% /dev/shm
rootfs                 3096336    918248   2020804  32% /
tmpfs                   127204         0    127204   0% /tmp
/dev/sdb1            488383484 129274624 359108860  27% /music


I typed in DF and got some error message, so I decided to just rebuild the stick.

I  reinstalling VAMP on the usb stick, and then reinstalling LMS on the VAMP.
That's when I decided to get an extra stick, and make an image of the stick after LMS was installed, so I would always have a backup copy of LMS I could just copy to a stick.
I added instructions on how to do this on my setup page.


Adding files to LMS/Pogo
Since you overwrote the Pogo software, you can't write to the Pogo like it was intended.
But, there is an easy way to add music to your Pogo, a program called WinSCP.
http://winscp.net/eng/index.php

It gives you a graphical interface so you can drop and drag your files from your PC to the Pogo.

Install it, and log into the Pogo using the same info as putty.

Click to go back to the root directory

Click on the music folder, and you should see your USB hard drive.

Just add the files whereever you want on the hard drive, and then you can rescan in LMS.


iPhone apps

There is a nice Logitech iPhone app that you can use as a remote control.
https://itunes.apple.com/us/app/logitech-squeezebox-controller/id431302899?mt=8

In spite of the bad reviews, I like it, and I don't have to log in every time, so I don't know what people are complaining about.



There are also SSH terminal apps you can use instead of putty.
I have been using serverauditor because it's free, and works for me
https://itunes.apple.com/us/app/server-auditor-ssh-client/id549039908?mt=8

You can set it up to log in automatically, so you don't need to type the login info every time.

After it connects, then touch the line and it will give you a terminal view.
At the terminal view, if you do an upward swipe, it shows the last command used.  Another swipe and the command before that, so you can easily call up the commands you have been using instead of typing them in.

I mostly use this app to shutdown, and I usually don't have to go back very far to find a shutdown.

They do have other most sophisticated ssh terminal apps, but most are not free.  This one is free, and is easy for me to use, and does what I need.


Notes:
cd /scripts
copy "hd-idle-1.03-bin.tar.gz" from the /scripts to root
I used winscp to do this, and copied the file to my PC, and then to root.


Go to root and then unpack it
cd /
tar -xvzf  hd-idle-1.03-bin.tar.gz

editor nano filename
cd /etc/default

nano /hd-idle

Change line to "START_HD_IDLE=true"

view and change permissions
cd /usr/sbin
stat hd-idle
chmod 777 hd-idle

run it (you need to stay in the sbin directory)
/etc/init.d/hd-idle start

Friday, January 25, 2013

Pogoplug Music Server for $30

EDIT
Feb 24
Deleted network setup because it is not required
Added info for creating a backup usb stick image
Added info for using LMS 7.8

Feb 2
I gave up trying to run Logitech Music Server and a USB DAC from the same Pogo.
I am trying to run separately for now, and see if that works OK.
Sometimes it would work OK, and sometimes LMS would not come up.

Jan 29, I was having problems, but it turned out to be a problem with the USB hard drive.
I think the instructions are OK now.


OK, its a little more than $30, depends on what you already have.

But, you get a little box that can be a music server running Logictech Music Server, and it can also drive a USB DAC, you just need to add the DAC.


The Pogoplug is $25 shipped from here
http://astore.amazon.com/vort-20/detail/B0044CL1N0

It needs to be the E02 model, I bought from this link, and got a pink E02, so it was good for me.

Buy a USB memory stick
Directions call out for a 4GB stick, I bought an 8GB, and it worked fine.
Another $8, so now you are at $30.

Instructions for setting up the Pogoplug to be able to act as a music player are here
http://vortexbox.org/content/150-Building-the-VAMP
But, I tried to follow the directins here, and I couldn't get it to work (they deleted some steps, I'm not sure why).

go to
my.pogoplug.com
and register you pogoplug there

Select "Settings" in the upper right
then select "Security" on the left

Check box by
"Enable SSH access for this Pogoplug device"

It will ask for a password, enter one.

Find the ipaddress for the Pogoplug

If you have trouble figuring out the IP address of the pogoplug, the easist way (at least for me) is if you can log in to your router, and have it display a list of the IP addresses on the network.

Otherwise, there are free IP scanners on the internet.
For windows, I used the Colasoft MAC Scanner

Someone had problems when he plugged in the Ethernet through a couple of switches between the Pogo and the router, so I would recommend plugging the Pogo directly into the router, especially when you first set it up, until you have it working like you want.  Once it is working, and you make sure it works after a long power down, then you can try adding switches to see if it makes a difference.
At the end of this page, I talk about adding a wireless device, so you don't need a hard ethernet connection.

Install Colasoft, and have it scan your net.
Read the ID from the bottom of the Pogo, and find it in the list from Colasoft.
Here is my Pogo.  The number on the right is on the bottom of the pogo, the number on the left  is your IP address

Now you can use Putty to log in, but it is kind of basic.
I used extraputty because you can add scripts to it.

Use "root" for user name.

It will ask for the password, use password that you entered when you turned on ssh access.

If you are using a max, you can use terminal instead of putty.

On putty, type the following (or cut and paste, use right click to paste into putty screen)

cd /tmp
wget http://jeff.doozan.com/debian/uboot/install_uboot_mtd0.sh
chmod +x install_uboot_mtd0.sh
export PATH=$PATH:/usr/sbin:/sbin
./install_uboot_mtd0.sh
After install instruction, type "yes" because it will ask you to.

type "yes" again to disable pogoplug services.

Type
fw_setenv arcNumber
fw_setenv machid dd6

Put the USB key into the front port on the PogoPlug and type reboot in your ssh window.

The PogoPlug should go dark then come back up with an orange LED instead of the green one.

You can now SSH to your VAMP. The user is root and the password is nosoup4u

Make sure you can log in and everything is working. Then connect your USB DAC and reboot again.

From terminal in OSX, the 2nd time you log in (step 12), terminal won't let you log in because the ID changed from before.
You need to go to the root of the hard drive, then go to Users\username\.ssh
Delete the known_hosts file

use the same format as before:
"ssh root@xxx.xxx.xxx.xxx" where xxx.xxx.xxx.xxx is the IP address of the pogoplug.
It will ask for the password, use password nosoup4u here, and from now on.

If you add a USB DAC to a “VAMP”, then you will basically have a device that connects through Ethernet, and lets you play music from the USB DAC.

If you type
http://xxx.xxx.xxx.xxx
where xxx.xxx.xxx.xxx is the VAMP address, you should get this




You can stop here, but I didn’t.

At this point, you should have the USB DAC connected, and the USB memory stick.  You should not have the USB hard drive connected yet, you will connect during the music server setup.  If it is connected, just shutdown, and disconnect, then power up again.

You shutdown by typing "shutdown now" in putty.

Adding the Music Server Software
Initially, I tried a different method, but later I found an easier way to do this.

Connect to the Pogo with whatever “putty” type SSH terminal program you used to set it up with the vortexbox instructions that were used previously.

Type “Setup” at the prompt, and the following screen will be displayed.




Select "Library Music-Library Configuration" and OK



Select OK



Connect the USB hard drive now.

Select "USB USB drive" then OK




This is what I got for my drive. I just selected "Yes"



Select "Yes" and let it reboot.

Wait a couple of minutes


NOTE: at this point, if you are having trouble, it could be a problem with the hard drive. I had this problem, and Pogo stopped coming up, either on the internet browser or on Putty. Removing the USB hard drive got it to come up again.

I ended up reformatting the drive (not a quick format, maybe overkill) to fix the drive.
 

Then, you can go to putty, log in and type "setup" again.



Select “Media-Server Install a Media-Server”, then OK



Select “Squeezebox Install a Squeezebox-Server (free)” then OK



Select "Install Install SqueezeBox on this device" then OK


Select OK

Accept the license, then you will get this:



Select OK, and then installation will start
At some points, screen will stop scrolling for a while, but just be patient.
EDIT Feb 24
I started to used a newer version of LMS, can be found here
LMS Ver 7.8


You need to type this in on the blank line
http://downloads.slimdevices.com/nightly/7.8/sc/2e3000d/logitechmediaserver_7.8.0~1353679004_all.deb

Or just hit OK with the line blank and ver 7.7 will be installed.

For some reason, 7.8 failed to install a couple times, so I uninstalled it, and installed again, and it eventually worked OK.


It took about 10 mins for my installation.

This screen will pop up.


Select OK, then Quit until you get back to the main menu screen.


EDIT Feb 24, 2013  
Deleted Network Configuration stuff, it is not required.



Wait a few minutes, for the light on the front to turn green, then you should be able to open your internet program and
Type "http://xxx.xxx.xxx.xxx:9000"


The Logitech Media Server will open


Login to your account, and then you will get this.





Click on the + by "Music", and you should see the contents of your USB hard drive.

Pick you music directory, then pick your playlist directory.

Go to "Settings" (lower right corner), then "Basic Settings" then pick "English" (or whatever), and then you should be able to see your music.

You can now setup the options however you want.

It should now work as a music server.


Wireless Option
Wired Ethernet is not convenient for me, I wanted to add wireless to it.
I bought one of these since I work by Frys, and it is pretty inexpensive, $20
http://www.frys.com/product/6980167?site=sr:SEARCH:MAIN_RSLT_PG
This is a TP Link model TL-WR702N.

Any router that supports client mode, and the security you use for wireless (ie WEP, WPA, WPA2) will work. I had some old routers that only support WEP, and when I upgraded my security to WPA2 these routers no longer work for me.

Set the the Nano Router to client mode, following the instructions included with it. The router I used doesn't have a switch to set the modes, so you have to do it in software, but it's pretty simple once you connect to it.

I basically just followed the instructions, connected it to my Pogoplug instead of the Ethernet interface, and it worked.

Usually the hardest part about setting up routers is that you might have to change the IP address of the PC you use to set it up. Just remember to revert your settings after you finish setting up the router. I forgot for a while, and had some troubles until I remembered to go back to what it was.

As a bonus, the Nano router is powered via USB, and you can use one of the Pogoplug USB ports to power the router.

It's a very small little box, and now you have a wireless USB DAC.

Cost is up to $50, plus the cost of the DAC.

After I had wireless working, I wanted to assign the IP address in DNS so the address won't change.  Names don't work for me, so I just use addresses.

For me, I need to log into my wireless router, and go to the Ethernet setup page, and I can assign a mac address to a IP address, and name it so I remember what machine it is.

The only wierd thing is on a status page, for the Pogo IP address, I see the mac address for the router, and on the Ethernet setup page, I see the mac address for the Pogo.  But it seems to work OK.

Backup USB stick image
At some point, my USB stick image somehow got corrupted.
I decided to buy an extra 4gb stick, all my other sticks a 8gb because the price difference is small.
I setup the 4gb stick per the instructions above, installing vamp then LMS on the stick.
I setup LMS, scanned my music library, and stopped the plugins I don't use.

After that, I started a putty session, then "shutdown now" to shutdown the Pogo.

Pulled power, and removed the stick.

Put the stick into the PC where you ran the USB Image tool to put the VAMP image on it.
Start the USB Image tool, and then select the stick, and select backup.  It asks for a name, give it a name you'll recognize, I called it something like LMS_v7.8.
It will backup the stick to a new image file.

Now you can create a new stick with this image, and it will be ready to run.
You should just be able to plug it in, and it should just start LMS.
You don't need to install anything, or even setup LMS again.


Observations
I had a problem last night where it was very slow in responding.
But, I had been tweaking the options in my wireless router, and had messed with things when I was setting up a 2nd pogo.

I elected to reinstall everything, I reimaged the USB stick to the VAMP image and then reinstalled LMS.  At this point, my network didn't show the Pogo anywhere, so I did it one more time, and it worked fine.

I'll use it for a few days, without making any changes, and see if thinks are stable.

I also have this page, for hints to make it easier to use such as iPhone apps that I am using and other programs
http://randytsuch-musicserver.blogspot.com/2013/01/using-your-pogoplug-with-lms.html