tag:blogger.com,1999:blog-16223078710857274322024-03-19T02:48:21.336-07:00Qui's techNOLOGY BlogA Blog on Technology - gadgets and gizmos and things like that.Qui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-1622307871085727432.post-27691120897929539842015-11-11T20:33:00.005-08:002016-04-24T21:50:04.313-07:00Voice Control Home Automation via Amazon Echo and Siri HomeKit - DIYVoice Control Home Automation via Amazon Echo and Siri HomeKit - DIY<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/hzjeq_L0X0U/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/hzjeq_L0X0U?feature=player_embedded" width="320"></iframe></div>
<br />
This is a quick start tutorial on setting up the Raspberry Pi 2 as a Home Automation System with Voice Control from Amazon Echo (Alexa) or Apple HomeKit (Siri). This is not a comprehensive tutorial, but should get you started.<br />
<br />
<br />
Last Updated: 4/24/2016<br />
<br />
REQUIREMENT:<br />
<br />
<a href="http://www.amazon.com/dp/B00T2U7R7I/?tag=blogqnologyco-20" target="_blank">Raspberry Pi 2</a> or <a href="http://www.amazon.com/dp/B01C6Q2GSY/?tag=blogqnologyco-20" target="_blank">Pi 3</a><br />
<a href="http://www.amazon.com/dp/B00IVPU786/?tag=blogqnologyco-20" target="_blank">8GB or larger microSD Card</a><br />
Aeon Labs Z-Wave Z-Stick - <a href="http://www.amazon.com/dp/B003MWQ30E/?tag=blogqnologyco-20" target="_blank">Series 2</a> OR <a href="http://www.amazon.com/dp/B00X0AWA6E/?tag=blogqnologyco-20" target="_blank">Gen5</a><br />
<a href="http://www.amazon.com/dp/B007UZH7B8/?tag=blogqnologyco-20" target="_blank">Aeon Labs - Z-Wave Smart Energy Switch</a><br />
<br />
OPTIONAL:<br />
<a href="http://www.amazon.com/dp/B00N3RFC4G/?tag=blogqnologyco-20" target="_blank">Logitech Harmony Home Hub</a><br />
<a href="http://www.amazon.com/dp/B00X4WHP5E/?tag=blogqnologyco-20" target="_blank">Amazon Echo</a> or Amazon Dot<br />
<br />
LET'S START:<br />
<br />
<a href="https://www.raspberrypi.org/downloads/raspbian/" target="_blank">Download Raspbian Jessie</a><br />
<a href="https://www.raspberrypi.org/documentation/installation/installing-images/README.md" target="_blank">Write the Raspbian Jessie Image to MicroSD Card</a><br />
Insert MicroSD Card in Raspberry Pi 2 and Boot.<br />
Connect to Pi using SSH (pi/raspberry)<br />
<a href="https://www.raspberrypi.org/documentation/configuration/raspi-config.md" target="_blank">Expand Filesystem - Ensures that all of the SD card storage is available to the OS</a><br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Expand Filesystem and Reboot</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo raspi-config</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Reboot Required and Important</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Initial Update and required packages</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#All one line - cut/paste recommend</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#Go get some coffee</span></div>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get update && </span><span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get -y upgrade && </span><span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get -y install python2.7 libavahi-compat-libdnssd-dev git unzip curl subversion build-essential usbutils psmisc htop samba-common-bin samba php5 php5-cli php5-curl wicd-curses libudev-dev</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">###################################</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#SAFE CUT/PASTE FROM THIS POINT </span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#TO FIRST REBOOT</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">###################################</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#apache get installed somewhere, so stop and disable it</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo /etc/init.d/apache2 stop</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo update-rc.d -f apache2 remove</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Setup SAMBA</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#No password, Everyone has read/write access to \\<IPAddress>\root</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /etc/samba</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo mv smb.conf smb.conf.org</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget --no-check-certificate http://dl.dropbox.com/u/42238/debian/openhab/smb.conf</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo /etc/init.d/samba restart</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#OPENHAB INSTALL</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo mkdir -p /opt/openhab/addons_all</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt/openhab</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Download current release</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget https://bintray.com/artifact/download/openhab/bin/distribution-1.8.2-runtime.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget https://bintray.com/artifact/download/openhab/bin/distribution-1.8.2-addons.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget https://bintray.com/artifact/download/openhab/bin/distribution-1.8.2-demo.zip</span></div>
<div>
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#unzip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo unzip distribution-1.*-runtime.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo unzip distribution-1.*-addons.zip -d /opt/openhab/addons_all</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo unzip -n distribution-1.*-demo.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#delete</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo rm distribution-1.*-runtime.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo rm distribution-1.*-addons.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo rm distribution-1.*-demo.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Addons (aka bindings) is what make OpenHAB so powerful</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#To install Addons, copy them into the addons folder</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp addons_all/org.openhab.action.harmonyhub*.jar addons</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp addons_all/org.openhab.binding.harmonyhub*.jar addons</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp addons_all/org.openhab.binding.exec*.jar addons</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp addons_all/org.openhab.binding.http*.jar addons</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp addons_all/org.openhab.binding.networkhealth*.jar addons</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp addons_all/org.openhab.binding.ntp*.jar addons</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp addons_all/org.openhab.binding.wol*.jar addons</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp addons_all/org.openhab.binding.zwave*.jar addons</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp addons_all/org.openhab.binding.systeminfo*.jar addons</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp addons_all/org.openhab.io.harmonyhub*.jar addons</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp addons_all/org.openhab.persistence.exec*.jar addons</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#SIGAR for OpenHAB Systeminfo Binding</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#https://github.com/openhab/openhab/wiki/Systeminfo-Binding</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo mkdir -p /opt/openhab/lib</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget https://groups.google.com/group/openhab/attach/ab7030271be23f05/sigar-raspbian.zip?part=0.1 -O /tmp/sigar-raspbian.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo unzip /tmp/sigar-raspbian.zip -d /tmp</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp /tmp/sigar-raspbian/lib/* /opt/openhab/lib</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo rm /tmp/sigar-raspbian.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#AMAZON ECHO BRIDGE INSTALL</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Go here for latest - https://github.com/armzilla/amazon-echo-ha-bridge/releases</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo mkdir /opt/amazon-echo-bridge</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt/amazon-echo-bridge</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget --no-check-certificate https://github.com/armzilla/amazon-echo-ha-bridge/releases/download/v0.2.1/amazon-echo-bridge-0.2.1.jar</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#HABMIN1 INSTALLATION</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt/openhab</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget https://github.com/cdjackson/HABmin/releases/download/0.1.3-snapshot/habmin.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo unzip habmin.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo rm habmin.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#delete old zwave binding</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo rm addons/org.openhab.binding.zwave-1.5.0-SNAPSHOT.jar</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#HABMIN2 INSTALLATION - requires HABMIN1</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#HABMIN2 no longer works with OpenHAB 1 (only OpenHAB 2)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt/openhab/addons</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget https://github.com/cdjackson/HABmin/blob/master/addons/org.openhab.io.habmin-1.7.0-SNAPSHOT.jar</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget https://github.com/cdjackson/HABmin2/releases/download/0.0.15/org.openhab.ui.habmin_2.0.0.SNAPSHOT-0.0.15.jar</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo chmod 755 *</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo mkdir -p /opt/openhab/webapps/habmin2</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt/openhab/webapps/habmin2</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget https://github.com/cdjackson/HABmin2/releases/download/0.0.15/HABmin2-0.0.15-release.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo unzip HABmin2-0.0.15-release.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo rm HABmin2-0.0.15-release.zip</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#OPENHAB CONFIG</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#mail, security, zwave, harmonyhub</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt/openhab/configurations</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp openhab_default.cfg openhab.cfg</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#SAMPLE OPENHAB ITEMS</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt/openhab/configurations/items</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget --no-check-certificate http://dl.dropbox.com/u/42238/debian/openhab/default.items</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#SAMPLE OPENHAB SITEMAPS</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt/openhab/configurations/sitemaps</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget --no-check-certificate http://dl.dropbox.com/u/42238/debian/openhab/default.sitemap</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget --no-check-certificate http://dl.dropbox.com/u/42238/debian/openhab/homekit.sitemap</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Z-WAVE Z-STICK OPENHAB CONFIGURATION</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Plug in Z-Stick</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Assuming Z-Wave Stick is attached to ttyUSB0</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo sed -i 's^#zwave:port=^zwave:port=/dev/ttyUSB0^' /opt/openhab/configurations/openhab.cfg</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#CUSTOM SCRIPTS</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo mkdir /opt/openhab/custom_scripts</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Shutdown Windows PC Script</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt/openhab/custom_scripts</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget --no-check-certificate http://dl.dropbox.com/u/42238/debian/openhab/custom_scripts/turnoffWindowsComputer.sh</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo chmod +x turnoffWindowsComputer.sh</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#PHP-FINDMYIPHONE</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt/openhab/custom_scripts</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo git clone git://github.com/albeebe/PHP-FindMyiPhone</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp PHP-FindMyiPhone/class.findmyiphone.php .</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget --no-check-certificate http://dl.dropbox.com/u/42238/debian/openhab/custom_scripts/listiclouddevices.php</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget --no-check-certificate http://dl.dropbox.com/u/42238/debian/openhab/custom_scripts/turnoniphone.php</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget --no-check-certificate http://dl.dropbox.com/u/42238/debian/openhab/custom_scripts/turnoffiphone.php</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#NODEJS for SIRI HomeKit Bridge</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">#Remove conflicting nodejs</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get -y remove nodejs</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">#Install nodejs</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">cd /tmp</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget http://node-arm.herokuapp.com/node_latest_armhf.deb</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo dpkg -i node_latest_armhf.deb</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo rm node_latest_armhf.deb</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#OpenHAB HomeKit Bridge</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo git clone git://github.com/htreu/OpenHAB-HomeKit-Bridge</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd OpenHAB-HomeKit-Bridge</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#This will take a while</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt/OpenHAB-HomeKit-Bridge<br />sudo npm install -g npm@3.3.12<br /><br />#Start OpenHAB on boot<br /></span><span style="font-family: "courier new" , "courier" , monospace;">cd /etc/init.d/</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget --no-check-certificate http://dl.dropbox.com/u/42238/debian/openhab/etc/init.d/openhab</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo chmod a+x openhab</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo update-rc.d openhab defaults</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Home Kit Startup Script Setup</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt/OpenHAB-HomeKit-Bridge</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp start.sh.template start.sh</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo chmod +x start.sh</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Amazon-Echo-Bridge Script Setup</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /opt/amazon-echo-bridge/</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo wget --no-check-certificate http://dl.dropbox.com/u/42238/debian/openhab/echobridgestart.sh</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo chmod +x echobridgestart.sh</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Start bridges on boot</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#delete 'exit 0' (backup rc.local also)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo sed -i.bak '/exit 0/d' /etc/rc.local</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">echo 'sleep 10' | sudo tee --append /etc/rc.local</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">echo 'sudo /opt/amazon-echo-bridge/echobridgestart.sh &' | sudo tee --append /etc/rc.local</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">echo 'sleep 60 #Give OpenHAB Time to Start' | sudo tee --append /etc/rc.local</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">echo 'sudo /opt/OpenHAB-HomeKit-Bridge/start.sh &' | sudo tee --append /etc/rc.local</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">echo 'exit 0' | sudo tee --append /etc/rc.local</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">###################################</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#END CUT/PASTE </span><br />
<span style="font-family: "courier new" , "courier" , monospace;">###################################</span><span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#REBOOT</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo reboot</span></div>
<div>
<br /></div>
<span style="font-family: "courier new" , "courier" , monospace;">#Configure Amazon Echo Bridge at</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#http://IPADDRESS:8081/configurator.html<br />#Add sample items<br />cd /tmp<br />wget --no-check-certificate http://dl.dropbox.com/u/42238/debian/openhab/custom_scripts/iphone.json<br />wget --no-check-certificate http://dl.dropbox.com/u/42238/debian/openhab/custom_scripts/smartswitch.json<br />wget --no-check-certificate http://dl.dropbox.com/u/42238/debian/openhab/custom_scripts/windowspc.json<br />curl -H "Content-Type: application/json" --data @iphone.json http://localhost:8081/api/devices<br />curl -H "Content-Type: application/json" --data @smartswitch.json http://localhost:8081/api/devices<br />curl -H "Content-Type: application/json" --data @windowspc.json http://localhost:8081/api/devices<br /><br />#FIND MY IPHONE SETUP<br />#CONFIGURE SAMPLE SCRIPTS<br />#Edit listiclouddevices.php with your iCloud username (email) and password<br /><br />cd /opt/openhab/custom_scripts<br />sudo nano listiclouddevices.php<br /><br /><br />#Run it to find your deviceID<br />#DeviceID will be something like Eu4EGWK1Yt5+2JtKM7YNA++hxNtDw4ZzZuwT9BLxYcL2d7FaULCJMuHYVNSUzmXV<<br />php ./listiclouddevices.php<br /><br />#Edit turnoniphone.php, turnoffiphone.php<br />#with username, password and deviceID</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo nano </span><span style="font-family: "courier new" , "courier" , monospace;">turnoniphone.php</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">sudo nano </span><span style="font-family: "courier new" , "courier" , monospace;">turnoffiphone.php</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br />#Run scripts to test</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">php ./</span><span style="font-family: "courier new" , "courier" , monospace;">turnoniphone.php</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">php ./</span><span style="font-family: "courier new" , "courier" , monospace;">turnoffiphone.php</span><span style="font-family: "courier new" , "courier" , monospace;"><br /><br /><br />#TURN OFF COMPUTER SCRIPT SETUP<br />#edit script with IPAddress, Username and Password<br />sudo nano turnoffWindowsComputer.sh<br /><br />#Turn on your computer and test script<br />./turnoffWindowsComputer.sh</span><span style="font-family: "courier new" , "courier" , monospace;">#Computer Power On will be handled via WOL Binding</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#https://github.com/openhab/openhab/wiki/Wake-on-LAN-Binding-(WoL)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Test via OpenHAB WebApp - http://IPADDRESS:8080/openhab.app</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
</div>
<div>
<div>
Download the OpenHAB iOS/Android app.<br />
<br />
Ask Alexa to discover your devices - "Alexa, discover devices". Add additional devices via http://IPADDRESS:8081/configurator.html.</div>
</div>
<div>
<br /></div>
<div>
For HomeKit Siri setup, download Elgato Eve on iOS device</div>
<div>
https://itunes.apple.com/us/app/elgato-eve/id917695792?mt=8</div>
<div>
<br /></div>
<div>
Launch Elgato Eve->Add Accessory</div>
<div>
Under "SELECT ACCESSORY" you should see "OpenHAB HomeKit Bridge". Select it.</div>
<div>
Select "Add to xxx" (xxx being whatever name you used)</div>
<div>
Ignore warning about the accessory not being certified - Add Anyway</div>
<div>
Select "Enter code manually"</div>
<div>
Type in "031-45-154"</div>
<div>
<br />
<br /></div>
<div>
To reset HomeKit and start over, delete Elgato Eve app and then go into Settings->Privacy->HomeKit and select "Reset HomeKit Configuration"</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Hardware:</div>
<br />
Amazon Echo - <a href="http://www.amazon.com/dp/B00X4WHP5E/?tag=blogqnologyco-20" target="_blank">http://www.amazon.com/dp/B00X4WHP5E/?tag=blogqnologyco-20</a><br />
Voice Remote for Amazon Echo - <a href="http://www.amazon.com/dp/B00L9EPT8O/?tag=blogqnologyco-20" target="_blank">http://www.amazon.com/dp/B00L9EPT8O/?tag=blogqnologyco-20</a><br />
Logitech Harmony Home Hub - <a href="http://www.amazon.com/dp/B00N3RFC4G/?tag=blogqnologyco-20" target="_blank">http://www.amazon.com/dp/B00N3RFC4G/?tag=blogqnologyco-20</a><br />
Raspberry Pi 2 - <a href="http://www.amazon.com/dp/B00T2U7R7I/?tag=blogqnologyco-20" target="_blank">http://www.amazon.com/dp/B00T2U7R7I/?tag=blogqnologyco-20</a><br />
Aeon Labs Z-Wave Z-Stick Series 2 USB Dongle - <a href="http://www.amazon.com/dp/B003MWQ30E/?tag=blogqnologyco-20" target="_blank">http://www.amazon.com/dp/B003MWQ30E/?tag=blogqnologyco-20</a><br />
(Newer version - Buy this version instead of the above) Aeon Labs Aeotec Z-Wave Z-Stick, Gen5 Z-Wave Plus - ZW090 - <a href="http://www.amazon.com/dp/B00X0AWA6E/?tag=blogqnologyco-20" target="_blank">http://www.amazon.com/dp/B00X0AWA6E/?tag=blogqnologyco-20</a><br />
Wink Connected Home Hub - <a href="http://www.amazon.com/dp/B00PV6GAI4/?tag=blogqnologyco-20" target="_blank">http://www.amazon.com/dp/B00PV6GAI4/?tag=blogqnologyco-20</a><br />
GE Link Smart Connected LED Light Bulb - <a href="http://www.amazon.com/dp/B00NOL16K0/?tag=blogqnologyco-20" target="_blank">http://www.amazon.com/dp/B00NOL16K0/?tag=blogqnologyco-20</a><br />
GE Z-Wave On/Off/Dim Dimmer Switch (45612 - no neutral) - <a href="http://www.amazon.com/dp/B006LQFHN2/?tag=blogqnologyco-20" target="_blank">http://www.amazon.com/dp/B006LQFHN2/?tag=blogqnologyco-20</a><br />
RGB LED Light Strip 5 meter with remote and power supply - <a href="http://www.amazon.com/dp/B00ASHQQKI/?tag=blogqnologyco-20" target="_blank">http://www.amazon.com/dp/B00ASHQQKI/?tag=blogqnologyco-20</a><br />
<br />
Harmony Hub Control for RGB LED discussion - <a href="http://forums.logitech.com/t5/Harmony-Remotes/RGB-Controller-44keys-exist-in-Harmony-DB/td-p/423325" target="_blank">http://forums.logitech.com/t5/Harmony-Remotes/RGB-Controller-44keys-exist-in-Harmony-DB/td-p/423325</a><br />
<br />
Not shown in video, but I have everything running through this so I can monitor energy usage. I would also be able to determine if my TV is on by the amount of watts being drawn.<br />
Aeon Labs - Z-Wave Smart Energy Switch - <a href="http://www.amazon.com/dp/B007UZH7B8/?tag=blogqnologyco-20" target="_blank">http://www.amazon.com/dp/B007UZH7B8/?tag=blogqnologyco-20</a><br />
<br />
Software:<br />
<br />
Raspbian Jessie - <a href="https://www.raspberrypi.org/downloads/raspbian/">https://www.raspberrypi.org/downloads/raspbian/</a><br />
OpenHab - <a href="http://www.openhab.org/getting-started/index.htm" target="_blank">http://www.openhab.org/getting-started/index.htm</a>l<br />
Amazon Echo Bridge - <a href="https://github.com/armzilla/amazon-echo-ha-bridge" target="_blank">https://github.com/armzilla/amazon-echo-ha-bridge</a><br />
OpenHab HomeKit Bridge - <a href="https://github.com/htreu/OpenHAB-HomeKit-Bridge" target="_blank">https://github.com/htreu/OpenHAB-HomeKit-Bridge</a><br />
PHP-FindMyiPhone - <a href="https://github.com/albeebe/PHP-FindMyiPhone" target="_blank">https://github.com/albeebe/PHP-FindMyiPhone</a><br />
<br />
=======<br />
Credit/References:<br />
<br />
<a href="https://www.reddit.com/r/homeautomation/comments/377onm/extending_amazon_echo_voice_control_to_existing/">https://www.reddit.com/r/homeautomation/comments/377onm/extending_amazon_echo_voice_control_to_existing/</a><br />
<br />
Getting Started with OpenHAB Home Automation on Raspberry Pi<br />
<a href="http://www.makeuseof.com/tag/getting-started-openhab-home-automation-raspberry-pi/" target="_blank">http://www.makeuseof.com/tag/getting-started-openhab-home-automation-raspberry-pi/</a><br />
<div>
<br />
<div>
[HOW TO] CONTROL YOUR OPENHAB ITEMS USING THE AMAZON ECHO - <a href="http://tinsley.io/2015/06/control-your-items-using-the-amazon-echo-openhab/" target="_blank">http://tinsley.io/2015/06/control-your-items-using-the-amazon-echo-openhab/</a><br />
<br />
OpenHAB Community - <a href="https://community.openhab.org/" target="_blank">https://community.openhab.org/</a><br />
<br />
<br /></div>
</div>
Qui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.com325tag:blogger.com,1999:blog-1622307871085727432.post-7961446013582803202015-04-10T14:37:00.002-07:002015-05-07T10:22:45.597-07:00OpenWRT on Pogoplug v3/Oxnas (Pro/Classic)This tutorial assumes you have completed my previous tutorial - <a href="http://blog.qnology.com/2015/04/hacking-pogoplug-v3oxnas-proclassic.html"><span style="color: blue;">Hacking the Pogoplug v3/Oxnas (Pro/Classic) with Debian</span></a><br />
- and already running Debian from a USB drive on the Pogoplug V3.<br />
<span style="font-family: inherit;"><br /></span>
OpenWRT will be installed on the internal flash (NAND) of the Pogoplug. You will still be able to boot Debian from USB when attached.<br />
<span style="font-family: inherit;"><br />Known Issues:</span><br />
<span style="font-family: inherit;"> - RT3090 (PCIE) Wi-Fi in the Pro is not working. </span><br />
<div>
<span style="font-family: inherit;"> - LED not working</span><br />
<span style="font-family: inherit;">- <a href="http://wiki.openwrt.org/doc/hardward/doc/soc.oxnas" target="_blank">Other known issues from OpenWRT wiki</a></span><br />
<span style="font-family: inherit;"><br /></span>
<a href="http://blog.qnology.com/p/openwrt-on-pogoplug-v3oxnas-proclassic.html" target="_blank">My console installation log can be found here.</a><br />
<span style="font-family: inherit;"><br /></span></div>
<div>
<span style="font-family: inherit;">All commands below needs to be executed from Debian.</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Verify MTD partition</span><br />
<span style="font-family: Courier New, Courier, monospace;">cat /proc/mtd<br />#root@debian:~# cat /proc/mtd<br />#dev: size erasesize name<br />#mtd0: 00e00000 00020000 "boot"<br />#mtd1: 07200000 00020000 "data"<br /><br />#download firmware/nand utilities<br />cd /tmp<br />wget http://download.qnology.com/pogoplug/v4/fw_printenv<br />wget http://download.qnology.com/pogoplug/v4/fw_setenv<br />wget http://download.qnology.com/pogoplug/v4/ubiattach<br />wget http://download.qnology.com/pogoplug/v4/ubimkvol<br />wget http://download.qnology.com/pogoplug/v4/ubiformat<br /><br />#make executable<br />chmod +x fw_printenv fw_setenv ubiattach ubimkvol ubiformat <br /><br />#format mtd1 (data)<br />/tmp/ubiformat /dev/mtd1<br /><br />#attach<br />/tmp/ubiattach /dev/ubi_ctrl -m 1<br />/tmp/ubimkvol /dev/ubi0 -m -N rootfs<br /><br />#mount ubi rootfs to /tmp/ubi<br />mkdir /tmp/ubi<br />mount -t ubifs ubi0:rootfs /tmp/ubi<br /><br />#We're using the snapshot trunk release.</span><br />
<span style="font-family: Courier New, Courier, monospace;">#There is no rootfs tarball, so we'll extract </span><br />
<span style="font-family: Courier New, Courier, monospace;">#it from the squashfs sysupgrade tar</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd /tmp</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-pogoplug-pro-squashfs-sysupgrade.tar</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#extract</span><br />
<span style="font-family: Courier New, Courier, monospace;">tar -xvf openwrt-oxnas-pogoplug-pro-squashfs-sysupgrade.tar</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#unsquashfs<br />apt-get install squashfs-tools<br />unsquashfs sysupgrade-pogoplug-pro/root</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#move extracted rootfs to ubi</span><br />
<span style="font-family: Courier New, Courier, monospace;">mv squashfs-root/* /tmp/ubi</span><br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">#download kernel zImage</span><br />
<span style="font-family: Courier New, Courier, monospace;">mkdir -p /tmp/ubi/boot</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd </span><span style="font-family: 'Courier New', Courier, monospace;">/tmp/ubi/boot</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-zImage</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#rename zImage file</span><br />
<span style="font-family: Courier New, Courier, monospace;">mv openwrt-oxnas-zImage zImage</span><br />
<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#download fdt</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget http://downloads.openwrt.org/snapshots/trunk/oxnas/generic/openwrt-oxnas-pogoplug-pro.dtb<br />wget http://download.qnology.com/pogoplug/oxnas/ox820-pogoplug-classic.dtb</span><span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;">sync</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd /</span><br />
<span style="font-family: Courier New, Courier, monospace;">umount /tmp/ubi</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Setup uBoot Environment</span><br />
<span style="font-family: Courier New, Courier, monospace;">#Cut and Paste this whole section</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv zimage '/boot/zImage'</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">/tmp/fw_setenv loadaddr '0x60500000'</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv fdt_addr '0x62c00000'</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv loadubi 'echo Trying to boot from NAND ...;if run mountubi; then run loadubizimage;run loadubifdt;ubifsumount;run bootzubi;fi'</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv mountubi 'ubi part data; ubifsmount ubi0:rootfs'</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv loadubizimage 'ubifsload ${loadaddr} ${zimage}'</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv loadubifdt 'ubifsload ${fdt_addr} ${fdt_file_ubi}'</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv bootzubi 'echo Booting from nand ...; run setargsubi; bootz ${loadaddr} - ${fdt_addr};'</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv setargsubi 'setenv bootargs console=ttyS0,115200n8 ubi.mtd=1 root=ubi0:rootfs rw rootfstype=ubifs rootwait ${mtdparts}'</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Select the appropriate fdt - Pro (Wi-Fi) versus regular.</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#Pogoplug Pro</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv fdt_file_ubi '/boot/openwrt-oxnas-pogoplug-pro.dtb'</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Non-Pro (use this if unsure)<br />/tmp/fw_setenv fdt_file_ubi '/boot/ox820-pogoplug-classic.dtb'<br /><br />#S</span><span style="font-family: 'Courier New', Courier, monospace;">etup boot order.</span><br />
<span style="font-family: Courier New, Courier, monospace;">#USB first, then UBI/NAND</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv dt_bootcmd_usb 'usb start; run dt_usb_bootcmd; usb stop'</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv bootcmd 'run dt_bootcmd_usb; run loadubi; reset'</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#poweroff Pogoplug and then remove USB flash drive.</span><br />
<span style="font-family: Courier New, Courier, monospace;">poweroff</span><br />
<br />
<h3>
OpenWRT Initial Boot via Telnet</h3>
At this point, we're ready to boot into OpenWRT. During the bootup process the LED on the Pogoplug will blink. However once it successfully boots into OpenWRT the LED will be completely off.<br />
<br />
Note that by default, OpenWRT will default to 192.168.1.1 and will (or should) act as a DHCP Server. Plug a network cable from your computer directly into the Pogoplug and power it on (do not plug the Pogoplug into your router). You should now be able to Telnet into the Pogoplug at 192.168.1.1 (username and password not required). If you're not able to telnet into the Pogoplug try setting a static IP address of 192.168.1.2 on your computer.<br />
<br />
Note that SSH is disabled and will automatically start after a root password is set.<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">
#set passwd and enable ssh</span><br />
<span style="font-family: Courier New, Courier, monospace;">passwd</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Reconfigure Network to DHCP Client</span><br />
<span style="font-family: Courier New, Courier, monospace;">#disable dhcp server on lan</span><br />
<span style="font-family: Courier New, Courier, monospace;">#Ignore if any error.</span><br />
<span style="font-family: Courier New, Courier, monospace;">uci set dhcp.lan.ignore=1</span><br />
<span style="font-family: Courier New, Courier, monospace;">uci commit dhcp</span><br />
<span style="font-family: Courier New, Courier, monospace;">/etc/init.d/dnsmasq restart</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#set wired ethernet interface to dhcp client</span><br />
<span style="font-family: Courier New, Courier, monospace;">uci set network.lan.proto=dhcp</span><br />
<span style="font-family: Courier New, Courier, monospace;">uci commit network</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#reboot</span><br />
<span style="font-family: Courier New, Courier, monospace;">reboot</span><br />
<h3>
OpenWRT SSH and Initial Package Installation</h3>
<div>
Plug the Pogoplug and your computer back into your network/router. Check your router for the IP Address assigned to your Pogoplug. You should now be able to SSH into the Pogoplug.<br />
<br />
Note that since we're using the daily snapshot trunk build of OpenWRT, you'll need to install your kernel packages right away (kmod-xxx), otherwise it will get out of sync.</div>
<div>
<br /></div>
<span style="font-family: Courier New, Courier, monospace;">opkg update </span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Pogoplug has 128MB flash</span><br />
<span style="font-family: Courier New, Courier, monospace;">#No need to be stingy on the packages</span><br />
<span style="font-family: Courier New, Courier, monospace;">opkg install nano wget luci uboot-envtools pciutils usbutils htop wireless-tools kmod-rt2x00-pci kmod-usb-storage block-mount kmod-fs-ext4 kmod-fs-vfat kmod-fs-ntfs kmod-nls-cp437 kmod-nls-iso8859-1 e2fsprogs fdisk kmod-usb2 samba36-server samba36-client luci-app-samba <span style="orphans: 2; text-align: -webkit-auto; widows: 2;">kmod-rtl8187 wireless-tools kmod-usb-net-asix-ax88179 </span><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">kmod-rt2800-lib kmod-rt2800-usb kmod-rt2x00-lib kmod-rt2x00-usb </span><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">kmod-usb-serial-pl2303 kmod-usb-serial-cp210x kmod-usb-serial-ftdi </span><span style="color: #222222; font-size: 1em; line-height: 27px; orphans: 2; white-space: pre-wrap; widows: 2;">picocom screen</span></span><br />
<div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br />
<span style="font-family: 'Courier New', Courier, monospace;">#Assume you're using the USB RT5370 Wi-Fi below </span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#Regenerate Wi-Fi configuration</span></div>
</div>
<span style="font-family: Courier New, Courier, monospace;">#Verify if Wi-Fi is working properly</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">rm -f /etc/config/wireless </span><br />
<span style="font-family: Courier New, Courier, monospace;">wifi detect > /etc/config/wireless</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#If wireless is working properly, you should see something</span><br />
<span style="font-family: Courier New, Courier, monospace;">cat /etc/config/wireless</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Enable Wi-Fi<br />sed -i 's^option disabled 1^option disabled 0^' /etc/config/wireless</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">/etc/init.d/network restart</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
Note that the built in Wi-Fi (PCIE) on the Pogoplug Pro is not working.<br />
<br />
If you need wireless, I would highly recommend a USB Wi-Fi card based on the RT5730 chipset for less than $8.<br />
<div>
<br /></div>
<a href="http://www.amazon.com/gp/search?ie=UTF8&camp=1789&creative=9325&index=aps&keywords=RT5370&linkCode=ur2&tag=blogqnologyco-20">Mini Wireless 150Mbs USB Ralink RT5370</a> (or from <a href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=9&pub=5575059262&toolid=10001&campid=5337506712&customid=&icep_uq=rt5370&icep_sellerId=&icep_ex_kw=&icep_sortBy=12&icep_catId=&icep_minPrice=&icep_maxPrice=&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=lg">Ebay</a>)</div>
Qui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.com60tag:blogger.com,1999:blog-1622307871085727432.post-1873683851717327632015-04-07T13:24:00.002-07:002015-04-23T09:12:23.714-07:00Hacking the Pogoplug v3/Oxnas (Pro/Classic) with Debian<span style="font-family: inherit;">This is quick publish tutorial on installing Debian on the Pogoplug V3(Oxnas)<br /><br /> All credit to @bodhi on <a href="http://forum.doozan.com/index.php">Jeff Doozan's Forum</a> for the uBoot, Debian rootfs, instructions and support. Note that I re-hosted some of @bodhi's files for an easier install.<br /><br /><br /><b>References:</b></span><br />
<ul>
<li><span style="font-family: inherit;"><a href="http://forum.doozan.com/read.php?2,16044" style="font-family: inherit;">Bodhi's latest Oxnas kernel builds and rootfs</a></span></li>
<li><span style="font-family: inherit;"><a href="http://forum.doozan.com/read.php?3,16017" style="font-family: inherit;">Bodhi's latest u-boot-oxnas builds</a></span></li>
</ul>
<span style="font-family: inherit;"> <br /><span style="color: red;">WARNING: You can potentially brick your Pogoplug following this tutorial. Your warranty will be voided. These instructions are for the Pogoplug V3/Oxnas. Flashing the uBoot below on any other model of the Pogoplug will result in a brick. There is no going back to the Pogoplug OS. You will not be able to use the my.pogoplug.com service. Proceed at your own risk.</span></span><br />
<span style="font-family: inherit;"><span style="color: red;"><br /></span></span>
<br />
<h3>
<span style="font-family: inherit;"><b>Requirements</b>:</span></h3>
<div>
<span style="font-family: inherit;"><br /></span></div>
<span style="font-family: inherit;">1) <a href="http://www.amazon.com/dp/B005FNDJHS/?tag=blogqnologyco-20">Pogoplug V3</a> - Dual 700Mhz ARM, 128MB RAM, SATA (internal), Gigabit Ethernet, 4 USB 2.0 Ports, Wireless<span style="color: red;">*</span><br /><br /><span style="color: red;">*</span>Only Pogoplug Pro comes with built in Wi-Fi (AzureWave AW-NE762H 802.11 b/g/n PCI Express RT3090)<br /><br />Model numbers located on bottom of foot. Please ignore the label on the box. You can potential receive a Pogoplug V2 (POGO-E02 Kirkwood) when buying a P21/P22.</span><br />
<ul><span style="font-family: inherit;">
<li><a href="http://www.adorama.com/COCPOGOP02.html" style="font-family: inherit;">POGO-P01</a><span style="font-family: inherit;"> - Pro (Wi-Fi)</span></li>
<li><a href="http://www.adorama.com/COCPOGOP02.html" style="font-family: inherit;">POGO-P02</a><span style="font-family: inherit;"> - Pro (Wi-Fi)</span></li>
<li><a href="http://www.amazon.com/dp/B005FNDJHS/?tag=blogqnologyco-20" style="font-family: inherit;">POGO-P21 - V3</a></li>
<li><a href="http://www.amazon.com/dp/B005IULTI4/?tag=blogqnologyco-20" style="font-family: inherit;">POGO-P22 - V3</a></li>
<li><span style="font-family: inherit;">POGO-P24 - V3</span></li>
<li><span style="font-family: inherit;">POGO-P25 - V3</span></li>
<li><span style="font-family: inherit;">POGO-B01 - Classic</span></li>
<li><span style="font-family: inherit;">POGO-B02 - Classic</span></li>
<li><span style="font-family: inherit;">POGO-B03 - Classic</span></li>
<li><span style="font-family: inherit;">POGO-B04 - Classic</span></li>
</span></ul>
<span style="font-family: inherit;">
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaQXzZ67r3BEUvf_srT5MtWRAWhfUpggtiXrmZST-lGWOhH1qeCs21b71WmymssfrBsVFKWyIw8_oNZnuxsEjYWVow56cL-4Ml5CQFeFu6uk4KX8ktjJJOUYp095fTGr-tIo1pH2L4hWex/s1600/Pogoplug+Oxnas+Photos.jpg"><img border="0" height="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaQXzZ67r3BEUvf_srT5MtWRAWhfUpggtiXrmZST-lGWOhH1qeCs21b71WmymssfrBsVFKWyIw8_oNZnuxsEjYWVow56cL-4Ml5CQFeFu6uk4KX8ktjJJOUYp095fTGr-tIo1pH2L4hWex/s1600/Pogoplug+Oxnas+Photos.jpg" width="640" /></a><br /><br />Check the bottom of the Pogoplug's foot for correct model<br /> <br /><br />2) USB Flash Drive (2GB+) or USB Hard Drive</span><br />
<span style="font-family: inherit;"><br /> Recommendations/Tested:</span><br />
<ul><span style="font-family: inherit;">
<li><a href="http://www.amazon.com/dp/B00LLER2CS/?tag=blogqnologyco-20" style="font-family: inherit;">SanDisk Ultra Fit USB 3.0 Low-Profile Flash Drive</a></li>
<li><a href="http://www.amazon.com/dp/B005FYNSUA/?tag=blogqnologyco-20" style="font-family: inherit;">SanDisk Cruzer Fit 8GB Flash Drive</a></li>
<li><a href="http://www.amazon.com/dp/B00H4XH5FY/?tag=blogqnologyco-20" style="font-family: inherit;">Seagate Backup Plus 2TB Portable External Hard Drive USB 3.0</a></li>
<li><a href="http://www.amazon.com/dp/B00829THO6/?tag=blogqnologyco-20" style="font-family: inherit;">Seagate Backup Plus 1 TB USB 3.0 Portable Hard Drive (USM Slot)</a></li>
<li><a href="http://www.amazon.com/dp/B00E055H5O/?tag=blogqnologyco-20" style="font-family: inherit;">WD My Passport Ultra 2TB Portable External Hard Drive USB 3.0</a><span style="font-family: inherit;"> </span></li>
</span></ul>
<span style="font-family: inherit;">
</span>
<br />
<h3>
<span style="font-family: inherit;"><b><br /></b></span></h3>
<h3>
<span style="font-family: inherit;"><b> Outline of Steps:</b></span></h3>
<ul><span style="font-family: inherit;">
<li><a href="http://support.pogoplug.com/hc/en-us/articles/202307860-How-do-I-enable-SSH-" style="font-family: inherit;">Enable SSH access to Pogoplug</a></li>
</span></ul>
<ul><span style="font-family: inherit;">
<li><span style="font-family: inherit;">uBoot Installation via SSH Console</span></li>
</span></ul>
<ul><span style="font-family: inherit;">
<li><span style="font-family: inherit;">Setup Netconsole</span></li>
</span></ul>
<ul><span style="font-family: inherit;">
<li><span style="font-family: inherit;">Debian Installation on USB Hard/Flash Drive</span></li>
</span></ul>
<ul><span style="font-family: inherit;">
<li><span style="font-family: inherit;">Initial Debian Setup</span></li>
</span></ul>
<ul><span style="font-family: inherit;">
<li><span style="font-family: inherit;">Upgrade Debian to 3.18.5 kernel</span></li>
</span></ul>
<ul><span style="font-family: inherit;">
<li><span style="font-family: inherit;">Pogoplug Pro Wireless Configuration</span></li>
</span></ul>
<br />
<span style="font-family: inherit;">
</span>
<br />
<h3>
<span style="font-family: inherit;"><br /></span></h3>
<h3>
<span style="font-family: inherit;">Enable SSH Access to Pogoplug</span></h3>
<div>
<span style="font-family: inherit;"><br /></span></div>
<span style="font-family: inherit;">There are two methods to enable SSH on your Pogoplug.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">1) Official Method - Activate on my.pogoplug.com and then enable SSH</span><br />
<ul style="font-family: inherit;">
<li><span style="font-family: inherit;">Power on the Pogoplug and connect it to you network.</span></li>
<li><span style="font-family: inherit;">Log into </span><a href="http://my.pogoplug.com/" style="font-family: inherit;">http://my.pogoplug.com</a><span style="font-family: inherit;"> and activate your Pogoplug @ </span><a href="https://pogoplug.com/activate/" style="font-family: inherit;">https://pogoplug.com/activate/</a></li>
<li><a href="http://support.pogoplug.com/hc/en-us/articles/202307860-How-do-I-enable-SSH-" style="font-family: inherit;">Enable SSH access by going to my.pogoplug.com and then go to General Settings-> Security.</a></li>
<li><span style="font-family: inherit;">Note that if you don't see the "Enable SSH Access" option, try power cycling the Pogoplug.</span></li>
</ul>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">2) Backdoor Method (</span><a href="http://dc22.gtvhacker.com/index.php/PogoPlug_Mobile" style="font-family: inherit;">credit to GTVHacker.com</a><span style="font-family: inherit;">)</span><br />
<br />
<span style="font-family: inherit;">Make sure your Pogoplug is connected to your network and has internet access.</span><br />
<br />
<span style="font-family: inherit;">Check your router or use a </span><a href="http://www.advanced-ip-scanner.com/" style="font-family: inherit;">network scanning tool</a><span style="font-family: inherit;"> (</span><a href="https://itunes.apple.com/us/app/inet-network-scanner/id340793353" style="font-family: inherit;">iNet Network Scanner</a><span style="font-family: inherit;"> on iPhone) to determine the IP Address of the Pogoplug.</span><br />
<br />
<span style="font-family: inherit;">From a Linux computer (e.g. another Pogoplug running Debian/Alarm) run the below curl command.</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">curl -k "https://root:ceadmin@[PogoplugIPAddress]/sqdiag/HBPlug?action=command&command=dropbear%20start";</span><br />
<br />
<span style="font-family: inherit;">Note that the backdoor method is not persistent (SSH access will not be available after a reboot).</span><br />
<br />
<h3>
<b><span style="font-family: inherit;">uBoot Installation via SSH Console</span></b></h3>
<div>
<b><span style="font-family: inherit;"><br /></span></b></div>
<span style="font-family: inherit;">Use </span><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" style="font-family: inherit;">Putty</a><span style="font-family: inherit;"> or your </span><a href="http://www.9bis.net/kitty/?page=Download" style="font-family: inherit;">favorite SSH client</a><span style="font-family: inherit;"> to connect to your Pogoplug.</span><br />
<br />
<span style="font-family: inherit;">If you used the "Official Method" for activating and enabling SSH on your Pogoplug, then the username will be "root" and the password will be whatever you set (note that it's not the same password used to log into my.pogoplug.com).</span><br />
<span style="font-family: inherit;">For the "Backdoor Method", the username and password is root/ceadmin.</span><br />
<br />
<span style="font-family: inherit;">From here, everything is done via the SSH console.</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;"><br />#Verify Pogoplug is expected version (Oxnas)<br />cat /proc/cpuinfo | grep Hardware<br /><br />#Stop here if not expected output.<br />#Expected output<br />#Hardware : <span style="color: red;">Oxsemi NAS</span><br /><br /> #stop my.pogoplug.com service<br />killall hbwd<br /><br /><br />#download firmware utilities<br />cd /tmp<br />wget http://download.qnology.com/pogoplug/v4/nanddump<br />wget http://download.qnology.com/pogoplug/v4/nandwrite<br />wget http://download.qnology.com/pogoplug/v4/flash_erase<br />wget http://download.qnology.com/pogoplug/v4/fw_printenv<br />wget http://download.qnology.com/pogoplug/v4/fw_setenv</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#make executable<br />chmod +x flash_erase fw_printenv fw_setenv nanddump nandwrite</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#remount '/' as read/write<br />#by default the Pogoplug OS (internal flash) is read only<br />mount -o remount,rw /</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#setup fw_env.config for oxnas<br />echo "/dev/mtd0 0x00100000 0x20000 0x20000">/etc/fw_env.config</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#save original envs<br />/usr/local/cloudengines/bin/blparam > /blparam.txt</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Download and flash new uBoot<br />wget http://download.qnology.com/pogoplug/oxnas/uboot.2013.10-tld-4.ox820.bodhi.tar<br />wget http://download.qnology.com/pogoplug/oxnas/uboot.2013.10-tld-4.ox820.bodhi.tar.md5</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#check md5sum<br />md5sum -c uboot.2013.10-tld-4.ox820.bodhi.tar.md5</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#extract uBoot files<br />tar -xf uboot.2013.10-tld-4.ox820.bodhi.tar<br /><br /><span style="color: red;"> #BE EXTRA CAREFUL WITH THE THESE COMMANDS.<br />#NO TYPOS! CUT AND PASTE.<br />#Erase and flash uboot on mtd0<br />#Flash encoded spl stage1 to 0x0<br />/tmp/flash_erase /dev/mtd0 0x0 6<br />/tmp/nandwrite /dev/mtd0 uboot.spl.2013.10.ox820.850mhz.mtd0.img</span><br /><br /><span style="color: red;">#Flash uboot to 0x40000<br />/tmp/nandwrite -s 262144 /dev/mtd0 uboot.2013.10-tld-4.ox820.mtd0.img</span></span><br />
<span style="font-family: Courier New, Courier, monospace;"><span style="color: red;">#Flash uboot environment<br />#Erase 1 block starting 0x00100000<br />/tmp/flash_erase /dev/mtd0 0x00100000 1<br />/tmp/nandwrite -s 1048576 /dev/mtd0 pogopro_uboot_env.img</span><br /><br /> #Set MAC Address<br />/tmp/fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)"</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#default to pogoplug classic dtb<br />/tmp/fw_setenv fdt_file '/boot/dts/ox820-pogoplug-classic.dtb'<br />/tmp/fw_setenv dt_load_dtb 'ext2load usb 0:1 $dtb_addr $fdt_file'<br /><br />#double check the MAC Address matches with<br />#what is on the bottom of your Pogoplug<br />/tmp/fw_printenv ethaddr<br /><br />#print out all uboot environment parameters<br />#make sure there are no errors<br />/tmp/fw_printenv > /fw_printenv.txt<br />/tmp/fw_printenv</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<h3>
Setup Netconsole</h3>
<span style="font-family: inherit;">More info here - <a href="http://forum.doozan.com/read.php?3,14,14">http://forum.doozan.com/read.php?3,14,14</a></span><span style="font-family: Courier New, Courier, monospace;"><br /><br /> </span><br />
<span style="font-family: Courier New, Courier, monospace;">#Update IP Addresses as appropriate<br />#ipaddr = Pogoplug IP<br />/tmp/fw_setenv preboot 'run preboot_nc'<br />/tmp/fw_setenv ipaddr '192.168.1.10'<br />/tmp/fw_setenv serverip '192.168.1.100'</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<h3>
Debian Installation on USB Hard/Flash Drive</h3>
<br />
Plug in your USB flash drive<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Partition your USB flash/hard drive</span><br />
<span style="font-family: Courier New, Courier, monospace;">/sbin/fdisk /dev/sda</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"># Type in the following commands to erase</span><br />
<span style="font-family: Courier New, Courier, monospace;"># and re-partition USB flash/hard drive</span><br />
<span style="font-family: Courier New, Courier, monospace;"> #<span style="color: red;">(WARNING - FLASH/HARD DRIVE WILL BE COMPLETELY WIPED):</span></span><br />
<span style="font-family: Courier New, Courier, monospace;"> #</span><br />
<span style="font-family: Courier New, Courier, monospace;"> # p # list current partitions</span><br />
<span style="font-family: Courier New, Courier, monospace;"># o # to delete all partitions</span><br />
<span style="font-family: Courier New, Courier, monospace;"># n # new partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># p # primary partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># 1 (one) # first partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <enter> # default start block</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <enter> # default end block (to use the whole drive)</span><br />
<span style="font-family: Courier New, Courier, monospace;"># If you're using a hard drive, create a small</span><br />
<span style="font-family: Courier New, Courier, monospace;"># 4GB partition instead of using the whole drive,</span><br />
<span style="font-family: Courier New, Courier, monospace;"># leaving the rest for a data partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># +4G # to create a 4GB partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># w # write new partition to disk</span><br />
<br />
<br />
<span style="font-family: Courier New, Courier, monospace;"> #Format USB Flash Drive</span><br />
<span style="font-family: Courier New, Courier, monospace;"> cd /tmp</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget http://archlinuxarm.org/os/pogoplug/mke2fs</span><br />
<span style="font-family: Courier New, Courier, monospace;">chmod 755 mke2fs</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#format as ext3 and label partition as 'rootfs'</span><br />
<span style="font-family: Courier New, Courier, monospace;">./mke2fs -L rootfs -j /dev/sda1</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#mount</span><br />
<span style="font-family: Courier New, Courier, monospace;">mkdir /tmp/usb</span><br />
<span style="font-family: Courier New, Courier, monospace;">mount /dev/sda1 /tmp/usb</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd /tmp/usb</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Download Debian rootfs</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget http://download.qnology.com/pogoplug/oxnas/Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2</span><br />
<span style="font-family: Courier New, Courier, monospace;"> wget http://download.qnology.com/pogoplug/oxnas/Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2.md5</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#check md5sum</span><br />
<span style="font-family: Courier New, Courier, monospace;">md5sum -c Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2.md5</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#extract</span><br />
<span style="font-family: Courier New, Courier, monospace;">tar -xvjf Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#cleanup</span><br />
<span style="font-family: Courier New, Courier, monospace;">rm Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2*</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Sync and reboot, cross your fingers</span><br />
<span style="font-family: Courier New, Courier, monospace;">sync</span><br />
<span style="font-family: Courier New, Courier, monospace;"> cd ..</span><br />
<span style="font-family: Courier New, Courier, monospace;"> umount /tmp/usb</span><br />
<span style="font-family: Courier New, Courier, monospace;">reboot</span><br />
<br />
<br />
<span style="font-family: inherit;">At this point, your Pogoplug should boot back up into Debian. Note that the IP Address of your Pogoplug may have changed. Double check your router for the IP Address assigned to your Pogoplug or use a </span><a href="http://www.advanced-ip-scanner.com/" style="font-family: inherit;">network scanning tool</a><span style="font-family: inherit;"> (</span><a href="https://itunes.apple.com/us/app/inet-network-scanner/id340793353" style="font-family: inherit;">iNet Network Scanner</a><span style="font-family: inherit;"> on iPhone) to determine the IP Address of the Pogoplug.</span><br />
<br />
<span style="font-family: inherit;">For Debian, the default username and password is root/root.</span><br />
<br />
<h3>
<span style="font-family: inherit;"> Initial Debian Setup</span></h3>
<br />
<span style="font-family: Courier New, Courier, monospace;">#Change password<br /> passwd<br /><br /> #Generate New OpenSSH Keys<br /> rm /etc/ssh/ssh_host*<br /> ssh-keygen -A<br /><br />#Initial update<br /> apt-get update<br /> apt-get upgrade<br /><br />#Set hostname to DebianPlug or whatever you like<br />echo DebianPlug>/etc/hostname<br /><br />#Set Time Zone<br /> tzselect</span><br />
<span style="font-family: Courier New, Courier, monospace;">reboot</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<h3>
<span style="font-family: inherit;">Upgrade Debian to 3.18.5 kernel</span></h3>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">Latest kernel and instructions here - </span><a href="http://forum.doozan.com/read.php?2,16044" style="font-family: inherit;">http://forum.doozan.com/read.php?2,16044</a><br />
<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#backup original kernel files<br />cd /boot<br />mkdir backup<br />mv *3.17* backup<br />mv uImage backup/uImage3.17<br />mv uInitrd backup/uInitrd3.17<br /><br />#download from bodhi's dropbox<br />wget --no-check-certificate https://www.dropbox.com/s/o9fp0xg8b6aajg6/linux-3.18.5-oxnas-tld-1.bodhi.tar.bz2<br /><br />#check md5<br />echo "df386f09cf7323472d40432d3da382d5 linux-3.18.5-oxnas-tld-1.bodhi.tar.bz2" |md5sum -c<br /><br />#extract<br />tar -xvjf linux-3.18.5-oxnas-tld-1.bodhi.tar.bz2<br /><br />#install kernel and headers<br />dpkg -i linux-image-3.18.5-oxnas-tld-1_1_armel.deb<br />dpkg -i linux-headers-3.18.5-oxnas-tld-1_1_armel.deb<br /><br />#Create uImage and uInitrd manually<br />mkimage -A arm -O linux -T kernel -C none -a 0x60008000 -e 0x60008000 -n Linux-3.18.5-oxnas-tld-1 -d /boot/vmlinuz-3.18.5-oxnas-tld-1 /boot/uImage<br /><br />mkimage -A arm -O linux -T ramdisk -C gzip -a 0x60000000 -e 0x60000000 -n initramfs-3.18.5-oxnas-tld-1 -d /boot/initrd.img-3.18.5-oxnas-tld-1 /boot/uInitrd<br /><br /><br />#clean up<br />rm linux-3.18.5-oxnas-tld-1.bodhi.tar.bz2<br />rm *.dtb<br /><br />#reboot and verify<br />reboot</span><br />
<span style="font-family: Courier New, Courier, monospace;">uname -a</span><br />
<br />
<br />
<h3>
<span style="font-family: inherit;"> Pogoplug Pro Wireless Configuration</span></h3>
<br />
<span style="font-family: Courier New, Courier, monospace;"> #update fdt file to pogoplug pro and reboot<br /><span style="color: red;">#Warning: if you don't truly have a pro, your pogoplug<br />#will not boot properly.</span><br />fw_setenv fdt_file '/boot/dts/ox820-pogoplug-pro.dtb'<br />reboot</span><br />
<br />
<span style="font-family: inherit;">Follow </span><a href="http://blog.qnology.com/2014/11/debian-on-pogoplug-tutorial-wireless.html" style="font-family: inherit;">Debian on Pogoplug Tutorial - Wireless Configuration</a><br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIGccoPFYvODXdbwbUU12RDswjdA1G8T5LkOEdwlhoy-GXfDizVbSMp0LSb5UZySZJpEbmokCzunJl6V4s7LU6teMkTcqH4G6P46mjiXOBrR3KLFqWtHxMKXjmg2Z9yUfjouc_S6-uFotJ/s1600/Pogoplug++Pro+PCIE+Wireless+Card.JPG" style="font-family: inherit; margin-left: auto; margin-right: auto;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIGccoPFYvODXdbwbUU12RDswjdA1G8T5LkOEdwlhoy-GXfDizVbSMp0LSb5UZySZJpEbmokCzunJl6V4s7LU6teMkTcqH4G6P46mjiXOBrR3KLFqWtHxMKXjmg2Z9yUfjouc_S6-uFotJ/s1600/Pogoplug++Pro+PCIE+Wireless+Card.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption"><br />Pogoplug Pro - AzureWave AW-NE762H 802.11 b/g/n PCI Express RT3090 <br /></td></tr>
</tbody></table>
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvkzfC2HssBcie21px-2Qr_4kW810EObKkOP17EJerT7ZooQSr1GXgz8EuYEJQvFdLn-cyBEp_sAJLnpjGjEIuqdpOrjHAHgng4NJ3MvUoguPjpb5r1XhSgKVBLAF07V3FSyy6qZAlIr_e/s1600/Pogoplug+V3.JPG" style="clear: left; font-family: inherit; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvkzfC2HssBcie21px-2Qr_4kW810EObKkOP17EJerT7ZooQSr1GXgz8EuYEJQvFdLn-cyBEp_sAJLnpjGjEIuqdpOrjHAHgng4NJ3MvUoguPjpb5r1XhSgKVBLAF07V3FSyy6qZAlIr_e/s1600/Pogoplug+V3.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><div style="font-size: medium; text-align: start;">
<span style="font-family: inherit;">Pogoplug V3 - Dual 700Mhz ARM, 128MB RAM, SATA (internal),</span></div>
<div style="font-size: medium; text-align: start;">
<span style="font-family: inherit;">Gigabit Ethernet, 4 USB 2.0 Ports, Wireless (Pro only)</span></div>
</td></tr>
</tbody></table>
<br />
<br />
<br />
<div>
<div>
<div>
<div>
<b></b></div>
</div>
</div>
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F1.bp.blogspot.com%2F-56LanZ3bAZI%2FVSTIpqFdvVI%2FAAAAAAAAAgM%2FgYquj8n7BSA%2Fs1600%2FPogoplug%252BOxnas%252BPhotos.jpg&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaQXzZ67r3BEUvf_srT5MtWRAWhfUpggtiXrmZST-lGWOhH1qeCs21b71WmymssfrBsVFKWyIw8_oNZnuxsEjYWVow56cL-4Ml5CQFeFu6uk4KX8ktjJJOUYp095fTGr-tIo1pH2L4hWex/s1600/Pogoplug+Oxnas+Photos.jpg" --><!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F1.bp.blogspot.com%2F-E8rjRtXnY1c%2FVSTIvMoExYI%2FAAAAAAAAAgU%2F8W6IZpLqRPw%2Fs1600%2FPogoplug%252B%252BPro%252BPCIE%252BWireless%252BCard.JPG&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIGccoPFYvODXdbwbUU12RDswjdA1G8T5LkOEdwlhoy-GXfDizVbSMp0LSb5UZySZJpEbmokCzunJl6V4s7LU6teMkTcqH4G6P46mjiXOBrR3KLFqWtHxMKXjmg2Z9yUfjouc_S6-uFotJ/s1600/Pogoplug++Pro+PCIE+Wireless+Card.JPG" --><!-- Blogger automated replacement: "https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2F4.bp.blogspot.com%2F-_89K8LAAGLA%2FVSTIw24EoBI%2FAAAAAAAAAgc%2FgZkddbRr_4o%2Fs1600%2FPogoplug%252BV3.JPG&container=blogger&gadget=a&rewriteMime=image%2F*" with "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvkzfC2HssBcie21px-2Qr_4kW810EObKkOP17EJerT7ZooQSr1GXgz8EuYEJQvFdLn-cyBEp_sAJLnpjGjEIuqdpOrjHAHgng4NJ3MvUoguPjpb5r1XhSgKVBLAF07V3FSyy6qZAlIr_e/s1600/Pogoplug+V3.JPG" -->Qui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.com129tag:blogger.com,1999:blog-1622307871085727432.post-67603584483103784442015-02-11T17:40:00.001-08:002015-12-14T11:03:21.394-08:00OpenWRT on Pogoplug Mobile<b><span style="font-family: inherit;">Booting OpenWRT from internal flash on Pogoplug Mobile</span></b><br />
<span style="font-family: inherit;"><b><br /></b>In this tutorial we're replacing the original Pogoplug OS on the internal flash with OpenWRT. OpenWRT is a lightweight but feature rich Linux distribution for embedded devices. </span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">The Pogoplug is </span>arguably one of the best OpenWRT platform for the price and performance. You can use OpenWRT on the Pogoplug as your main Linux distro skipping the need for a USB flash drive or SD Card, or just use it as a Rescue System (for fixing corrupt disk or reinstallation) if something goes wrong with your ALARM or Debian installation.<br />
<br />
<ul style="background-color: white; color: #666666; font-size: 13.1999998092651px; line-height: 16.7999992370605px; margin: 0.5em 0px; padding: 0px 2.5em;">
<li><a href="http://www.amazon.com/dp/B006I5MKZY/?tag=blogqnologyco-20" target="_blank">Pogoplug Series 4 (POGO-V4-A3-01)</a> or <a href="http://www.amazon.com/dp/B005GM1Q1O/?tag=blogqnologyco-20" target="_blank">Pogoplug Mobile (POGO-V4-A1-01)</a></li>
<ul>
<li><a href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=9&pub=5575059262&toolid=10001&campid=5337506712&customid=&icep_uq=pogoplug+mobile&icep_sellerId=&icep_ex_kw=&icep_sortBy=12&icep_catId=&icep_minPrice=&icep_maxPrice=&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=lg" target="_blank">Less than $15.00 shipped for the Mobile on Ebay</a> or <a href="http://www.amazon.com/dp/B005GM1Q1O/?tag=blogqnologyco-20" target="_blank">Amazon</a></li>
<li><a href="http://blog.qnology.com/p/difference-between-pogoplug-mobile-and.html" target="_blank">Difference Between Pogoplug Mobile and Series 4</a> (tl;dr - get the Series 4 is you want additional USB Ports and USM SATA Slot)</li>
</ul>
<ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;">
</ul>
</ul>
<span style="font-family: inherit;"><br />
This tutorial assumes you have completed my previous tutorial - <a href="http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html">Hacking the Pogoplug v4 (Series 4 and Mobile) with Linux (Debian or Arch)</a> - and already running Debian or ArchLinuxARM (from a USB drive or SD Card) on the Pogoplug Mobile.</span><br />
<div>
<div>
<span style="font-family: inherit;"><br />Note that for the Series 4, the USB3 ports does not work properly yet with OpenWRT. Hopefully this will get resolved in the near future. [Edit] - Looks like the USB3 ports work with USB3 devices and if you plug in a USB3 device, the other USB3 port will work with a USB2 device.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="color: red; font-family: inherit;">WARNING: There is no going back to the Pogoplug OS. You will not be able to use the my.pogoplug.com service. Please proceed at your own risk.</span><br />
<span style="color: red; font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">LETS GET STARTED:</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">Boot up Debian or ArchLinuxARM on your Pogoplug. All commands below assumes you're running Debian or ALARM.</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">#Update mtdparts so we have one continuous partition to work with.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">cd /tmp</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">wget http://download.qnology.com/pogoplug/v4/fw_setenv</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">chmod +x fw_setenv</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">#setup fw_env.config</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">echo "/dev/mtd0 0xc0000 0x20000 0x20000">/etc/fw_env.config</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">#1MB for the uBoot, the rest for rootfs (~122MB)<br />/tmp/fw_setenv mtdparts 'mtdparts=orion_nand:1M(u-boot),-(rootfs)'</span><span style="font-family: "courier new" , "courier" , monospace;"><br /></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">#This reboot is important</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">reboot</span><br />
<br />
<span style="font-family: inherit;">After rebooting double check the mtdpart is correct.</span></div>
<div>
<br /></div>
<span style="font-family: "courier new" , "courier" , monospace;">cat /proc/mtd</span><br />
<div>
<br />
<span style="font-family: "courier new" , "courier" , monospace;">#root@debian:~# cat /proc/mtd<br />#dev: size erasesize name<br />#mtd0: 00100000 00020000 "u-boot"<br />#mtd1: 07f00000 00020000 "rootfs"<br />#mtd2: 00010000 00008000 "spi0.0"</span><br />
<div>
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#download firmware/nand utilities</span></div>
<span style="font-family: "courier new" , "courier" , monospace;">cd /tmp</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">wget http://download.qnology.com/pogoplug/v4/fw_printenv</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">wget http://download.qnology.com/pogoplug/v4/fw_setenv</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">wget http://download.qnology.com/pogoplug/v4/</span><span style="font-family: "courier new" , "courier" , monospace;">ubiattach</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">wget http://download.qnology.com/pogoplug/v4/</span><span style="font-family: "courier new" , "courier" , monospace;">ubimkvol</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">wget http://download.qnology.com/pogoplug/v4/</span><span style="font-family: "courier new" , "courier" , monospace;">ubiformat</span><br />
<br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#make executable</span></div>
<span style="font-family: "courier new" , "courier" , monospace;">chmod +x </span><span style="font-family: "courier new" , "courier" , monospace;">fw_printenv </span><span style="font-family: "courier new" , "courier" , monospace;">fw_setenv</span><span style="font-family: "courier new" , "courier" , monospace;"> </span><span style="font-family: "courier new" , "courier" , monospace;">ubiattach </span><span style="font-family: "courier new" , "courier" , monospace;">ubimkvol </span><span style="font-family: "courier new" , "courier" , monospace;">ubiformat</span><span style="font-family: "courier new" , "courier" , monospace;"> </span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">#format mtd1 (rootfs)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Will be prompted for confirmation three times.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/tmp/ubiformat /dev/mtd1</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">/tmp/</span><span style="font-family: "courier new" , "courier" , monospace;">ubiattach -p /dev/mtd1</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/tmp/</span><span style="font-family: "courier new" , "courier" , monospace;">ubimkvol /dev/ubi0 -m -N rootfs</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">#mount ubi rootfs to /tmp/ubi</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">mkdir /tmp/ubi</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">mount -t ubifs ubi0:rootfs </span><span style="font-family: "courier new" , "courier" , monospace;">/tmp/ubi</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">#Chaos Calmer 15.05</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">cd /tmp</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">wget http</span><span style="font-family: "courier new" , "courier" , monospace;">://downloads.openwrt.org/chaos_calmer/15.05/kirkwood/generic/openwrt-15.05-kirkwood-generic-rootfs.tar.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">wget http://downloads.openwrt.org/chaos_calmer/15.05/kirkwood/generic/openwrt-15.05-kirkwood-zImage </span><br />
<span style="font-family: 'courier new', courier, monospace;">wget http://downloads.openwrt.org/chaos_calmer/15.05/kirkwood/generic/md5sums</span><span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">#Trunk release.</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Note that Barrier Breaker 14.07 doesn't work.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#cd /tmp</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#wget http://downloads.openwrt.org/snapshots/trunk/kirkwood/generic/openwrt-kirkwood-generic-rootfs.tar.gz</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#wget http://downloads.openwrt.org/snapshots/trunk/kirkwood/generic/openwrt-kirkwood-zImage</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#wget http://downloads.openwrt.org/snapshots/trunk/kirkwood/generic/md5sums</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">#check that zImage and rootfs.tar.gz are OK</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">md5sum -c md5sums</span><span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br />#extract rootfs.tar.gz to ubi rootfs at </span><span style="font-family: "courier new" , "courier" , monospace;">/tmp/ubi</span><br />
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cd </span><span style="font-family: "courier new" , "courier" , monospace;">/tmp/ubi</span></div>
<span style="font-family: "courier new" , "courier" , monospace;">tar xvzf /tmp/openwrt*rootfs.tar.gz</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">mkdir boot</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">mv /tmp/openwrt*kirkwood-zImage ./boot/zImage</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">#FDT from http://forum.doozan.com/read.php?2,12096<br />cd boot</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">wget http://download.qnology.com/pogoplug/v4/</span><span style="font-family: "courier new" , "courier" , monospace;">kirkwood-pogoplug_v4.dtb<br /><br />sync<br />cd /</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">umount </span><span style="font-family: "courier new" , "courier" , monospace;">/tmp/ubi</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"><br />#Setup uBoot Environment</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#Cut and Paste this whole section</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/tmp/fw_setenv fdt_file '/boot/kirkwood-pogoplug_v4.dtb'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/tmp/</span><span style="font-family: "courier new" , "courier" , monospace;">fw_setenv loadaddr '0x800000'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/tmp/</span><span style="font-family: "courier new" , "courier" , monospace;">fw_setenv zimage '/boot/zImage'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/tmp/</span><span style="font-family: "courier new" , "courier" , monospace;">fw_setenv fdt_addr '0x1c00000'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/tmp/</span><span style="font-family: "courier new" , "courier" , monospace;">fw_setenv loadubi 'echo Trying to boot from NAND ...;if run mountubi; then run loadubizimage;run loadubifdt;ubifsumount;run bootzubi;fi'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/tmp/</span><span style="font-family: "courier new" , "courier" , monospace;">fw_setenv mountubi 'ubi part rootfs; ubifsmount ubi0:rootfs'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/tmp/</span><span style="font-family: "courier new" , "courier" , monospace;">fw_setenv loadubizimage 'ubifsload ${loadaddr} ${zimage}'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/tmp/</span><span style="font-family: "courier new" , "courier" , monospace;">fw_setenv loadubifdt 'ubifsload ${fdt_addr} ${fdt_file}'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/tmp/</span><span style="font-family: "courier new" , "courier" , monospace;">fw_setenv bootzubi 'echo Booting from nand ...; run setargsubi; bootz ${loadaddr} - ${fdt_addr};'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/tmp/</span><span style="font-family: "courier new" , "courier" , monospace;">fw_setenv setargsubi 'setenv bootargs console=${console},${baudrate} ${optargs} ubi.mtd=1 root=ubi0:rootfs rw rootfstype=ubifs rootwait ${mtdparts}'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Setup boot order.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#USB->SD->SATA->UBI/NAND</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">/tmp/</span><span style="font-family: "courier new" , "courier" , monospace;">fw_setenv bootcmd 'run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; run loadubi; reset'<br /><br />#poweroff Pogoplug and remove SD Card and USB flash drive.</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">poweroff</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: inherit;">At this point, we're ready to boot into OpenWRT. Note that by default, OpenWRT will default to 192.168.1.1 and will act as a DHCP Server. Plug a network cable from your computer directly into the Pogoplug and power it on. You should now be able to Telnet into the Pogoplug at 192.168.1.1 (username and password not required). Note that SSH is disabled and will automatically start after a root password is set.</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">#####Initial Boot via Telnet######</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#set passwd and enable ssh</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">passwd</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br />#Reconfigure Network to DHCP Client</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#disable dhcp server on lan</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">uci set dhcp.lan.ignore=1</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">uci commit dhcp</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">/etc/init.d/dnsmasq restart</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">#set wired ethernet interface to dhcp client</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">uci set network.lan.proto=dhcp</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">uci commit network</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">reboot</span><br />
<br />
<br />
<span style="font-family: inherit;">Plug the Pogoplug and your computer back into your network. Check your router for the IP Address assigned to your Pogoplug. You should now be able to SSH into the Pogoplug.</span><br />
<span style="font-family: inherit;"><br />
Note that since we're using the daily snapshot trunk build of OpenWRT, you'll need to install your kernel packages right away (kmod-xxx), otherwise it will get out of sync.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">#####Initial OpenWRT configuration</span><span style="font-family: "courier new" , "courier" , monospace;">#####</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">opkg update</span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">#Install some essential packages<br />opkg install nano wget luci uboot-envtools pciutils usbutils </span><span style="font-family: "courier new" , "courier" , monospace;">kmod-usb2 </span><span style="font-family: "courier new" , "courier" , monospace;">kmod-usb3 kmod-mmc </span><span style="font-family: "courier new" , "courier" , monospace;">kmod-usb-storage block-mount kmod-fs-ext4 kmod-fs-vfat kmod-fs-ntfs kmod-nls-cp437 kmod-nls-iso8859-1 e2fsprogs fdisk </span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">#SAMBA - configure via luci web gui</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">opkg install samba36-server samba36-client luci-app-samba</span><br />
<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Major credit goes to @moonman on the ArchLinuxArm Forum - <a href="http://archlinuxarm.org/forum/viewtopic.php?f=30&t=8383">http://archlinuxarm.org/forum/viewtopic.php?f=30&t=8383</a></span></div>
</div>
Qui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.com825tag:blogger.com,1999:blog-1622307871085727432.post-78208731331515940402014-11-26T14:13:00.002-08:002014-11-26T14:14:45.959-08:00Debian on Pogoplug Tutorial - Webmin Installation<h3 class="post-title entry-title" itemprop="name" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 22px; font-stretch: normal; font-weight: normal; margin: 0.75em 0px 0px; position: relative;">
This is a continuation of my <a href="http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html">Hacking the Pogoplug v4 (Series 4 and Mobile) with Linux (Debian or Arch)</a> Tutorial.</h3>
<div>
<br /></div>
<b><br /><br /><span style="font-size: large;">Webmin Installation</span></b><br />
<div>
<b><span style="font-size: large;"><br /></span></b></div>
<span style="font-family: Courier New, Courier, monospace;">#Install required packages<br />apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python<br /><br /> #downloand and install webmin<br /> cd /tmp<br /> wget <a href="http://prdownloads.sourceforge.net/webadmin/webmin_1.720_all.deb">http://prdownloads.sourceforge.net/webadmin/webmin_1.720_all.deb</a><br /> dpkg --install webmin_1.720_all.deb<br /><br /><br />#Webmin will automatically start on boot up.<br />#To stop Webmin from starting at bootup<br />update-rc.d -f webmin remove<br /><br /> #Auto Start Webmin on Boot<br />update-rc.d webmin defaults</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>Access Webmin @ https://IPAddress:10000<br />
<br />
Reference: <a href="http://www.webmin.com/deb.html">http://www.webmin.com/deb.html</a>Qui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.com105tag:blogger.com,1999:blog-1622307871085727432.post-44954884528832134422014-11-26T13:11:00.002-08:002015-11-09T15:21:30.213-08:00Debian on Pogoplug Tutorial - MJPG-Streamer (WebCam) Installation<h3 class="post-title entry-title" itemprop="name" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 22px; font-stretch: normal; font-weight: normal; margin: 0.75em 0px 0px; position: relative;">
This is a continuation of my <a href="http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html">Hacking the Pogoplug v4 (Series 4 and Mobile) with Linux (Debian or Arch)</a> Tutorial.</h3>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b>Tested WebCams:</b></div>
<div>
<ul>
<li><a href="http://www.amazon.com/dp/B004FHO5Y6/?tag=blogqnologyco-20" target="_blank">Logitech HD Webcam C270</a></li>
<li><a href="http://www.amazon.com/dp/B003LVZO8S/?tag=blogqnologyco-20" target="_blank">Logitech HD Webcam C310</a></li>
<li><a href="http://www.amazon.com/dp/B006JH8T3S/?tag=blogqnologyco-20" target="_blank">Logitech HD Pro Webcam C920</a> (Highly recommended)</li>
</ul>
<div>
<b><br /></b>
<b>NOTE - Newer kernel needs a patch. See https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=109352. Will update tutorial when I get a chance.</b><br />
<b><br /></b>
<b>MJPG-Streamer Installation</b><br />
<br /></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#Install required packages</span></div>
</div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">apt-get install unzip subversion libv4l-dev libjpeg8-dev imagemagick build-essential psmisc<br /><br />#build mjpg-streamer<br />mkdir /tmpbuild<br />cd /tmpbuild<br />wget http://sourceforge.net/code-snapshots/svn/m/mj/mjpg-streamer/code/mjpg-streamer-code-182.zip<br />unzip mjpg-streamer-code-182.zip<br />cd mjpg-streamer-code-182/mjpg-streamer<br />make<br />make install<br />cd /<br />rm -rf /tmpbuild<br /><br />#Test - start mjpg_streamer on port 8088</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">#http://ipaddress:8088<br />mjpg_streamer -i "/usr/local/lib/input_uvc.so -f 15 -r 640x480 -d /dev/video0" -o "/usr/local/lib/output_http.so -w /usr/local/www -p 8088"<br /><br />#Download service file for auto start on bootup<br />cd /etc/init.d<br />wget --no-check-certificate <a href="https://dl.dropboxusercontent.com/u/42238/pogoplug/debian/mjpg_streamerd">https://dl.dropboxusercontent.com/u/42238/pogoplug/debian/mjpg_streamerd</a><br />chmod +x mjpg_streamerd<br />update-rc.d mjpg_streamerd defaults</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
Motion (webcam security software) installation and configuration to come in another tutorialQui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.com279tag:blogger.com,1999:blog-1622307871085727432.post-90717170180276216102014-11-26T12:58:00.002-08:002014-11-30T18:27:22.270-08:00Debian on Pogoplug Tutorial - Wireless Configuration<h3 class="post-title entry-title" itemprop="name" style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 22px; font-stretch: normal; font-weight: normal; margin: 0.75em 0px 0px; position: relative;">
This is a continuation of my <a href="http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html">Hacking the Pogoplug v4 (Series 4 and Mobile) with Linux (Debian or Arch)</a> Tutorial.</h3>
<div>
<br /></div>
<div>
<b><br /></b></div>
<div>
<b>Tested Wi-Fi Adapters:</b></div>
<div>
<div>
<ul>
<li><a href="http://www.amazon.com/dp/B0017GS382/?tag=blogqnologyco-20" target="_blank">AirLink AWLL3028 802.11g Wireless USB Adapter (RTL8187B)</a></li>
<li><a href="http://www.amazon.com/dp/B000QYGNKQ/?tag=blogqnologyco-20" target="_blank">Alfa AWUS036H (RTL8187)</a> (My personal favorite Wi-Fi adapter)</li>
<li><a href="http://www.amazon.com/dp/B006JWMOOI/?tag=blogqnologyco-20" style="background-color: white; font-family: inherit;" target="_blank">Etekcity High Power 802.11 B/N/G 300M USB Wireless 1000mw Wifi Network Adapter with Dual Antenna</a><span style="background-color: white; font-family: inherit;"> (RT3072)</span></li>
<li><a href="http://www.amazon.com/gp/search?ie=UTF8&camp=1789&creative=9325&index=aps&keywords=RT5370&linkCode=ur2&tag=blogqnologyco-20" target="_blank">Mini Wireless 150Mbs USB Ralink RT5370</a> (or from <a href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=9&pub=5575059262&toolid=10001&campid=5337506712&customid=&icep_uq=rt5370&icep_sellerId=&icep_ex_kw=&icep_sortBy=12&icep_catId=&icep_minPrice=&icep_maxPrice=&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=lg" target="_blank">Ebay</a>)</li>
<li><a href="http://www.amazon.com/dp/B003MTTJOY/?tag=blogqnologyco-20" target="_blank">Edimax EW-7811Un</a></li>
</ul>
</div>
</div>
<div>
<div>
<span style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 22px;"><br /></span></div>
<div>
<span style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 22px;">Wi-Fi Configuration for Debian on Pogoplug</span></div>
<span style="font-family: Courier New, Courier, monospace;"></span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><span style="font-family: Courier New, Courier, monospace;"><br /></span></span></div>
<span style="font-family: Courier New, Courier, monospace;">
#Add "non-free" repo<br />echo "deb http://http.debian.net/debian/ wheezy main contrib non-free">>/etc/apt/sources.list</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Update repo<br />apt-get update</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Install required Wi-Fi packages and common non-free Wi-Fi adapter firmware<br />apt-get install wireless-tools wpasupplicant usbutils firmware-ralink firmware-realtek firmware-atheros<br /><br />#Bring up Wi-Fi adapter. If you get an error, try rebooting.<br />ifconfig wlan0 up<br /><br />#Scan available Wi-Fi networks<br />iwlist wlan0 scanning</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br />#Update interfaces file with Wi-Fi configuration<br />nano /etc/network/interfaces</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Add the following to the end of the /etc/network/interfaces file<br />#Update "YourWiFiNetworkName" and "YourWiFiPassword" with appropriate values.</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#/etc/network/interfaces</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">#auto wlan0</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#iface wlan0 inet dhcp<br /># wpa-ssid "YourWiFiNetworkName"<br /># wpa-psk "YourWiFiPassword"</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Restart Networking Service<br />/etc/init.d/networking restart<br /><br />#Check if Wi-Fi configuration successful</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">#Note the IP Address assigned to wlan0</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">ifconfig</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
At this point, you should be able to reboot and unplug the Ethernet network cable from the Pogoplug. <br />
<br />
Notes: I don't use wireless with my Pogoplugs so have not tested Wi-Fi extensively. If you don't have a stable Wi-Fi connection, you may want to look into a Wi-Fi auto reconnect script. If I find a good script or method for Wi-Fi auto reconnect, I'll post it. If you have a good solution, please share via the comments. <br />
<br />
If you lose Wi-Fi connection, plugging in the Ethernet network cable should work, but note that it may take 2-3 minutes for the Pogoplug to pick up a IP Address.<br />
<br />
Reference: <a href="https://wiki.debian.org/rtl819x#Debian_7_.22Wheezy.22">https://wiki.debian.org/rtl819x#Debian_7_.22Wheezy.22</a></div>
Qui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.com113tag:blogger.com,1999:blog-1622307871085727432.post-77842359751612896142014-07-27T11:20:00.003-07:002016-01-04T21:00:41.451-08:00Hacking the Pogoplug v4 (Series 4 and Mobile) with Linux (Debian or Arch)This is a quick publish tutorial on hacking the Pogoplug V4 - Series 4 or Mobile - with Debian or Arch Linux ARM. Last updated <b>01/04/2016</b>.<br />
<div>
<div>
<br />
Major credit to @bodhi on <a href="http://forum.doozan.com/index.php" target="_blank">Jeff Doozan's Forum</a> (and Jeff himself) for the <a href="http://forum.doozan.com/read.php?3,12381" target="_blank">uBoot</a>, <a href="http://forum.doozan.com/read.php?2,12096" target="_blank">Debian rootfs</a>, instructions and support. Note that I re-hosted some of @bodhi's files for an easier install.<br />
<br />
This tutorial assumes you're starting with a brand new, never modified Pogoplug Mobile or Series 4. However, if you have a previously modified Pogoplug V4, the uBoot instructions will work under Debian/ALARM if you want to upgrade your uBoot for SD Card booting and want to boot the default Pogoplug OS.<br />
<br />
At the end of this tutorial your Pogoplug will be booting Debian (or ALARM) from a SD Card. Instructions for booting off a USB Hard/Flash Drive is also included.<br />
<br />
My recommendation is to boot via SD Card to keep the USB port free for a USB Hard Drive, USB DAC (for MPD, Airplay and/or SqueezeLite), WebCam, Wi-Fi Adapter or printer.</div>
<div>
<span style="color: red;"><br /></span></div>
<div>
<span style="color: red;">WARNING: You can potentially brick your Pogoplug following this tutorial. Your warranty will be voided. Proceed at your own risk. I didn't think I needed to say this but I do - these instructions are for the Pogoplug V4. Flashing the uBoot below on any other model of the Pogoplug will result in a brick. </span><br />
<br />
If you made a mistake, bricked your Pogoplug or simply didn't understand what you got yourself into or want to start fresh, you're in luck! <a href="http://www.ebay.com/sch/items/?_nkw=pogoplug+mobile&_sacat=&_ex_kw=&_mPrRngCbx=1&_udlo=4&_udhi=20&_sop=15&_fpos=&_fspt=1&_sadis=&LH_CAds=" target="_blank">Here is a ~$13 solution.</a><br />
<span style="color: red;"><br /></span></div>
<div>
<b><span style="font-size: large;">Requirements:</span></b></div>
<ul>
<li><a href="http://www.amazon.com/dp/B006I5MKZY/?tag=blogqnologyco-20" target="_blank">Pogoplug Series 4 (POGO-V4-A3-01)</a> or <a href="http://www.amazon.com/dp/B005GM1Q1O/?tag=blogqnologyco-20" target="_blank">Pogoplug Mobile (POGO-V4-A1-01/POGO-V4-A1-05)</a></li>
<ul>
<li><a href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=9&pub=5575059262&toolid=10001&campid=5337506712&customid=&icep_uq=pogoplug+mobile&icep_sellerId=&icep_ex_kw=&icep_sortBy=12&icep_catId=&icep_minPrice=&icep_maxPrice=&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=lg" target="_blank">Less than $15.00 shipped for the Mobile on Ebay</a> or <a href="http://www.amazon.com/dp/B005GM1Q1O/?tag=blogqnologyco-20" target="_blank">Amazon</a></li>
<li><a href="http://blog.qnology.com/p/difference-between-pogoplug-mobile-and.html" target="_blank">Difference Between Pogoplug Mobile and Series 4</a> (tl;dr - get the Series 4 is you want additional USB Ports and USM SATA Slot)</li>
</ul>
<li>USB Flash Drive, USB Hard Drive or SD Card (2GB+)</li>
<ul>
<li>Recommendations/Tested:</li>
<ul>
<li><a href="http://www.amazon.com/dp/B00M55BMBE/?tag=blogqnologyco-20" target="_blank">SanDisk Ultra Class 10 SDHC Memory Card</a></li>
<li style="margin: 0px 0px 0.25em; padding: 0px;"><a href="http://www.amazon.com/dp/B00LLER2CS/?tag=blogqnologyco-20" target="_blank">SanDisk Ultra Fit USB 3.0 Low-Profile Flash Drive</a></li>
<li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="color: black;"><a href="http://www.amazon.com/dp/B005FYNSUA/?tag=blogqnologyco-20" target="_blank">SanDisk Cruzer Fit 8GB Flash Drive</a></span></li>
<li style="margin: 0px 0px 0.25em; padding: 0px;"><a href="http://www.amazon.com/dp/B00H4XH5FY/?tag=blogqnologyco-20" target="_blank">Seagate Backup Plus 2TB Portable External Hard Drive USB 3.0 </a></li>
<li><a href="http://www.amazon.com/dp/B00829THO6/?tag=blogqnologyco-20" target="_blank">Seagate Backup Plus 1 TB USB 3.0 Portable Hard Drive (USM Slot)</a></li>
<li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="color: black;"><a href="http://www.amazon.com/dp/B00E055H5O/?tag=blogqnologyco-20" target="_blank">WD My Passport Ultra 2TB Portable External Hard Drive USB 3.0</a></span></li>
</ul>
</ul>
</ul>
<div>
<b><span style="font-size: large;">Outline of Steps:</span></b></div>
<div>
<ol>
<li><a href="http://support.pogoplug.com/hc/en-us/articles/202307860-How-do-I-enable-SSH-" target="_blank">Enable SSH access to Pogoplug</a></li>
<li>uBoot Installation via SSH Console </li>
<ul>
<li>Kill Pogoplug Service and Download uBoot Flashing Utilities</li>
</ul>
<ul>
<li>Download and Flash New uBoot</li>
<li>Download and Flash Default uBoot Environment Parameters</li>
<li>Update uBoot Environment Parameters</li>
</ul>
<li>Setup Netconsole (optional but highly recommended)</li>
<li>Boot default Pogoplug OS when USB/SD Card not attached</li>
<li>Debian/ALARM Installation on SD Card (or USB Hard/Flash Drive)</li>
</ol>
</div>
<div>
<div>
<br /></div>
<b>Enable SSH Access to Pogoplug</b><br />
<b><br /></b>
There are two methods to enable SSH on your Pogoplug.<br />
<b><br /></b>
1) Official Method - Activate on my.pogoplug.com and then enable SSH<br />
<div>
<ul>
<li>Power on the Pogoplug and connect it to you network.</li>
<li>Log into <a href="http://my.pogoplug.com/">http://my.pogoplug.com</a> and activate your Pogoplug @ <a href="https://pogoplug.com/activate/" target="_blank">https://pogoplug.com/activate/</a></li>
<li><a href="http://support.pogoplug.com/hc/en-us/articles/202307860-How-do-I-enable-SSH-" target="_blank">Enable SSH access by going to my.pogoplug.com and then go to General Settings-> Security.</a></li>
<li>Note that if you don't see the "Enable SSH Access" option, try power cycling the Pogoplug.</li>
</ul>
</div>
</div>
<div>
<br />
2) Backdoor Method (<a href="http://dc22.gtvhacker.com/index.php/PogoPlug_Mobile" target="_blank">credit to GTVHacker.com</a>)<br />
<br />
Make sure your Pogoplug is connected to your network and has internet access.<br />
<br />
<span style="font-family: inherit;">Check your router or use a </span> <a href="http://www.advanced-ip-scanner.com/" target="_blank">network scanning tool</a> (<a href="https://itunes.apple.com/us/app/inet-network-scanner/id340793353" style="font-family: inherit;" target="_blank">iNet Network Scanner</a> on iPhone) to determine the IP Address of the<span style="font-family: inherit;"> Pogoplug. </span><br />
<br />
From a Linux computer (e.g. another Pogoplug running Debian/Alarm) run the below curl command.<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">curl -k "https://root:ceadmin@[<span style="color: red;">PogoplugIPAddress</span>]/sqdiag/HBPlug?action=command&command=dropbear%20start";</span><br />
<br />
If the above curl command doesn't work, your Pogoplug may need to be updated. Leave it plugged in for a hour or two and then try the command again.<br />
<br />
Note that the backdoor method is not persistent (SSH access not available after a reboot).<br />
<br />
<br />
<b>SSH/Putty into Pogoplug V4 and Perform Installation</b></div>
<div>
<br />
Use <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">Putty </a>or your favorite SSH client to connect to your Pogoplug.<br />
<br />
If you used the "Official Method" for activating and enabling SSH on your Pogoplug, then the username will be "root" and the password will be whatever you set (note that it's not the same password used to log into my.pogoplug.com).</div>
<div>
<br />
For the "Backdoor Method", the username and password is root/ceadmin.<br />
<br />
From here, everything is done via the SSH console. Here is a <a href="http://download.qnology.com/pogoplug/v4/PogoplugMobileInstallationLog.txt" target="_blank">complete console installation log</a>. Open it up and compare with what you're seeing on your ssh console screen as you're going through the tutorial.<br />
<div>
<b><br /></b>
<b>Kill Pogoplug Service and Download uBoot Flashing Utilities</b><br />
<b><br /></b><span style="font-family: Courier New, Courier, monospace;"> #stop my.pogoplug.com service</span><br />
<span style="font-family: Courier New, Courier, monospace;">killall hbwd</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />#download firmware utilities</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd /tmp</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">wget http://download.qnology.com/pogoplug/v4/nanddump</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget http://download.qnology.com/pogoplug/v4/nandwrite</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget http://download.qnology.com/pogoplug/v4/flash_erase</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget http://download.qnology.com/pogoplug/v4/fw_printenv</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget http://download.qnology.com/pogoplug/v4/fw_setenv</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#make execuable</span><br />
<span style="font-family: Courier New, Courier, monospace;">chmod +x flash_erase fw_printenv fw_setenv nanddump nandwrite</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#remount '/' as read/write</span><br />
<span style="font-family: Courier New, Courier, monospace;">#by default the Pogoplug OS (internal flash) is read only</span><br />
<span style="font-family: Courier New, Courier, monospace;">#skip if running from Debian/ALARM</span><br />
<span style="font-family: Courier New, Courier, monospace;">mount -o remount,rw /</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#setup fw_env.config</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo "/dev/mtd0 0xc0000 0x20000 0x20000">/etc/fw_env.config</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<b>Download and Flash new uBoot</b><br />
<b><br /></b>
<span style="font-family: Courier New, Courier, monospace;">#download uboot and md5</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget <a href="http://download.qnology.com/pogoplug/v4/uboot.2014.07-tld-1.pogo_v4.bodhi.tar">http://download.qnology.com/pogoplug/v4/uboot.2014.07-tld-1.pogo_v4.bodhi.tar</a></span><br />
<span style="font-family: Courier New, Courier, monospace;">wget <a href="http://download.qnology.com/pogoplug/v4/uboot.2014.07-tld-1.pogo_v4.bodhi.tar.md5">http://download.qnology.com/pogoplug/v4/uboot.2014.07-tld-1.pogo_v4.bodhi.tar.md5</a></span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#check md5sum</span><br />
<span style="font-family: Courier New, Courier, monospace;">md5sum -c </span><span style="font-family: 'Courier New', Courier, monospace;">uboot.2014.07-tld-1.pogo_v4.bodhi.tar.md5</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />#extract uboot<br />tar -xf uboot.2014.07-tld-1.pogo_v4.bodhi.tar</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="color: red; font-family: 'Courier New', Courier, monospace;"><b>#Erase and flash uboot on mtd0</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><span style="color: red;">#BE EXTRA CAREFUL WITH THE NEXT TWO COMMANDS. NO TYPOS! CUT AND PASTE.</span></b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><span style="color: red;">/tmp/flash_erase /dev/mtd0 0 4<br />/tmp/nandwrite /dev/mtd0 /tmp/uboot.2014.07-tld-1.pogo_v4.mtd0.kwb</span></span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<b>Download and Flash uBoot Environment Parameters</b></div>
<div>
<b><br /></b>
<span style="font-family: Courier New, Courier, monospace;">#download default uboot env settings and md5</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget <a href="http://download.qnology.com/pogoplug/v4/uboot.2014.07-tld-1.environment.img.bodhi.tar">http://download.qnology.com/pogoplug/v4/uboot.2014.07-tld-1.environment.img.bodhi.tar</a></span><br />
<span style="font-family: Courier New, Courier, monospace;">wget <a href="http://download.qnology.com/pogoplug/v4/uboot.2014.07-tld-1.environment.img.bodhi.tar.md5">http://download.qnology.com/pogoplug/v4/uboot.2014.07-tld-1.environment.img.bodhi.tar.md5</a></span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#check md5 sum</span><br />
<span style="font-family: Courier New, Courier, monospace;">md5sum -c uboot.2014.07-tld-1.environment.img.bodhi.tar.md5</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#extract uboot env settings</span><br />
<span style="font-family: Courier New, Courier, monospace;">tar -xf uboot.2014.07-tld-1.environment.img.bodhi.tar</span><br />
<br />
<span style="color: red; font-family: Courier New, Courier, monospace;"><b>#Flash default uboot env setting</b></span><br />
<b style="font-family: 'Courier New', Courier, monospace;"><span style="color: red;">#BE EXTRA CAREFUL WITH THE NEXT TWO COMMANDS. NO TYPOS! CUT AND PASTE.</span></b><br />
<span style="color: red; font-family: 'Courier New', Courier, monospace;">/tmp/flash_erase /dev/mtd0 0xc0000 1</span><br />
<span style="color: red; font-family: Courier New, Courier, monospace;">/tmp/nandwrite -s 786432 /dev/mtd0 uboot.2014.07-tld-1.environment.img</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<b>Update uBoot Environment Parameters</b><br />
<b><br /></b>
<span style="font-family: 'Courier New', Courier, monospace;">#SET MACADDRESS</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)"</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#double check the MAC Address matches with </span><br />
<span style="font-family: Courier New, Courier, monospace;">#what is on the bottom of your Pogoplug</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">/tmp/fw_printenv ethaddr</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#set archNumber and machid (for LED)</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv arcNumber 3960</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv machid F78</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#set rootfs file system type</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv usb_rootfstype ext3</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#set to original mtd partition layout</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv mtdparts 'mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)'</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#print out all uboot environment parameters</span><br />
<span style="font-family: Courier New, Courier, monospace;">#make sure there are no errors</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_printenv</span><br />
<br />
<br />
<b><span style="font-family: inherit;">Setup Netconsole (Optional but highly recommended)</span></b><br />
<b><span style="font-family: inherit;"><br /></span></b>
<span style="font-family: inherit;">More info here - <a href="http://forum.doozan.com/read.php?3,14,14">http://forum.doozan.com/read.php?3,14,14</a></span></div>
<div>
<span style="font-family: inherit;">Just run the below commands if you are not sure.</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Update IP Addresses as needed<br />/tmp/fw_setenv serverip 192.168.1.100</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv ipaddr 192.168.1.10</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv if_netconsole 'ping $serverip'</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv start_netconsole 'setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;'</span><br />
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv preboot 'run if_netconsole start_netconsole'</span><br />
<b><br /></b>
<b><br /></b>
<b>Boot default Pogoplug OS when USB/SD Card not attached</b><br />
<br />
Note that this section only works on a new unmodified Pogoplug. It assumes the command are all executed from within the default Pogoplug OS and not from Arch Linux or Debian.<br />
<br />
If you previously installed the uBoot from archlinuxarm.org and/or already running ALARM or Debian, use these instructions instead - <a href="http://blog.qnology.com/p/pogoplug-v4-boot-default-pogoplug-os.html" target="_blank">Pogoplug v4 - Add option to boot default Pogoplug OS when USB/SD Card is Not Attached</a>.<br />
<br />
To boot the default Pogoplug OS, we will need to chain load the original (dockstar) uboot which we'll download and store on the internal flash. The boot order will be USB, MMC/SD, SATA (Series 4 only) and then last, the original uBoot which will then load the default Pogoplug OS.<br />
<br />
Don't forget that you'll need to activate the Pogoplug on my.pogoplug.com if you plan on SSHing into the default Pogoplug OS.<br />
<b><br /></b>
<span style="font-family: Courier New, Courier, monospace;">#remount '/' as read/write</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">mount -o remount,rw /</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#download original uboot</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cd /</span></div>
<span style="font-family: Courier New, Courier, monospace;">wget <a href="http://download.doozan.com/uboot/files/uboot/uboot.mtd0.dockstar.original.kwb">http://download.doozan.com/uboot/files/uboot/uboot.mtd0.dockstar.original.kwb</a></span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#update boot order to include pogoplug OS</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">/tmp/fw_setenv </span><span style="font-family: 'Courier New', Courier, monospace;">bootcmd 'run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; run bootcmd_pogo; reset'</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#chain load original uboot</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">/tmp/fw_setenv </span><span style="font-family: Courier New, Courier, monospace;">bootcmd_pogo 'if ubi part root 2048 && ubifsmount ubi:rootfs && ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi'</span><br />
<b><br /><br />Debian/ALARM Installation on SD Card (or USB Hard/Flash Drive)</b></div>
</div>
<div>
<div>
<br /></div>
<div>
Insert SD Card or USB Hard/Flash Drive. The commands below are for Debian on a SD Card. However, I've noted the difference for USB Hard/Flash Drive and Arch Linux.</div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#stop my.pogoplug.com service (just in case)<br />killall hbwd<br /><br />#make device node for mmc/sd card</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#skip command for usb install<br />mknod /tmp/mmcblk0 b 179 0</span></div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Partition your SD Card</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">/sbin/fdisk /tmp/mmcblk0</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#OR Partition your USB Flash/Hard Drive</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#/sbin/fdisk /dev/sda</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"># Type in the following commands to erase</span><br />
<span style="font-family: Courier New, Courier, monospace;"># and re-partition SD Card/USB Flash/Hard Drive</span><br />
<span style="font-family: Courier New, Courier, monospace;">#(<span style="color: red;">WARNING - FLASH/HARD DRIVE WILL BE COMPLETELY WIPED</span>):</span><br />
<span style="font-family: Courier New, Courier, monospace;">#</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <b>p </b># list current partitions</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <b>o </b># to delete all partitions</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <b>n</b> # new partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <b>p</b> # primary partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <b>1</b> (one) # first partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <<b>enter</b>> # default start block</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <<b>enter</b>> # default end block (to use the whole drive)</span><br />
<span style="font-family: Courier New, Courier, monospace;"># If you're using a hard drive, create a small</span><br />
<span style="font-family: Courier New, Courier, monospace;"># 4GB partition instead of using the whole drive,</span><br />
<span style="font-family: Courier New, Courier, monospace;"># leaving the rest for a data partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <b>+4G</b> # create a 4GB partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <b>w</b> # write new partition to disk</span><br />
<span style="font-family: Courier New, Courier, monospace;"></span><br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">#make device node for partition</span></div>
</div>
<span style="font-family: 'Courier New', Courier, monospace;">#command not needed for USB install</span><br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">mknod /tmp/mmcblk0p1 b 179 1</span></div>
<div>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#download format utility</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">cd /tmp</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget http://archlinuxarm.org/os/pogoplug/mke2fs</span><br />
<span style="font-family: Courier New, Courier, monospace;">chmod +x mke2fs</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#format newly created partition</span><br />
<span style="font-family: Courier New, Courier, monospace;">#ext3 with "rootfs" as label</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">/tmp/mke2fs -L rootfs -j /tmp/mmcblk0p1</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#OR format USB Flash/Hard Drive</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#/tmp/mke2fs -L rootfs -j /dev/sda1</span><br />
<div>
</div>
<br />
<span style="font-family: Courier New, Courier, monospace;">#create mount point<br />mkdir /tmp/mnt</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#mount SD Card</span><br />
<span style="font-family: Courier New, Courier, monospace;">mount /tmp/mmcblk0p1 /tmp/mnt</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#OR mount USB Flash/Hard Drive</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#mount /dev/sda1 /tmp/mnt</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#download Debian rootfs and md5</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd /tmp/mnt</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">wget <a href="http://download.qnology.com/pogoplug/v4/Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2">http://download.qnology.com/pogoplug/v4/Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2</a></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">wget <a href="http://download.qnology.com/pogoplug/v4/Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2.md5">http://download.qnology.com/pogoplug/v4/Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2.md5</a></span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#check md5</span><br />
<span style="font-family: Courier New, Courier, monospace;">md5sum -c Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2.md5</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />#extract and delete</span><br />
<span style="font-family: Courier New, Courier, monospace;">tar -xjf Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2</span><br />
<span style="font-family: Courier New, Courier, monospace;">rm Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2</span><br />
<span style="font-family: Courier New, Courier, monospace;">rm </span><span style="font-family: 'Courier New', Courier, monospace;">Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2.md5</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">#OR For Arch Linux ARM</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#</span><span style="font-family: 'Courier New', Courier, monospace;">cd /tmp/mnt</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#wget http://archlinuxarm.org/os/ArchLinuxARM-kirkwood-latest.tar.gz </span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#tar -xzvf ArchLinuxARM-kirkwood-latest.tar.gz</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#rm ArchLinuxARM-kirkwood-latest.tar.gz</span></div>
<span style="font-family: Courier New, Courier, monospace;"><br />#Make SD Card first boot device (optional)<br />#Default boot order is USB->MMC/SD->SATA->POGO_OS</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">/tmp/fw_setenv bootcmd 'run bootcmd_mmc; </span><span style="font-family: 'Courier New', Courier, monospace;">run bootcmd_usb;</span><span style="font-family: 'Courier New', Courier, monospace;"> </span><span style="font-family: 'Courier New', Courier, monospace;">run bootcmd_sata; run bootcmd_pogo; reset'</span></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Sync and reboot, cross your fingers</span><br />
<span style="font-family: Courier New, Courier, monospace;">sync<br />cd ..<br />umount /tmp/mnt<br />/sbin/reboot</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
At this point, your Pogoplug should boot back up into Debian or Arch Linux ARM. Note that the IP Address of your Pogoplug may have changed. Double check your router for the IP Address assigned to your Pogoplug or use a <a href="http://www.advanced-ip-scanner.com/" target="_blank">network scanning tool</a> (<a href="https://itunes.apple.com/us/app/inet-network-scanner/id340793353" style="font-family: inherit;" target="_blank">iNet Network Scanner</a> on iPhone) to determine the IP Address of the Pogoplug.<br />
<br />
For Debian the default username and password is root/root. For Arch Linux ARM (ALARM) the username and password is alarm/alarm.<br />
<br /></div>
</div>
<b>Initial Debian Setup</b><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Change password<br />passwd<br /><br />#Generate New OpenSSH Keys<br />rm /etc/ssh/ssh_host*<br />ssh-keygen -A</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Initial update<br />apt-get update<br />apt-get upgrade</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Set hostname to DebianPlug or whatever you like</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo DebianPlug>/etc/hostname<br /><br />#Set Time Zone<br />tzselect </span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span>
<b><span style="font-family: inherit;">Upgrade Debian to 3.18.5 kernel (optional)</span></b><br />
<span style="font-family: inherit;">Latest kernel and instructions here - <a href="http://forum.doozan.com/read.php?2,12096">http://forum.doozan.com/read.php?2,12096</a></span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">#backup original kernel files</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">cd /boot</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">mkdir backup</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">mv *3.14* backup</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">mv uImage backup/uImage3.14</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">mv uInitrd backup/uInitrd3.14</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">#download from bodhi's dropbox</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">wget --no-check-certificate https://www.dropbox.com/s/n7utrgwky1b2rg9/linux-3.18.5-kirkwood-tld-1-bodhi.tar.bz2</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">#check md5</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">echo "68c96df62427c69bc7599ff31859b9b4 linux-3.18.5-kirkwood-tld-1-bodhi.tar.bz2" |md5sum -c</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">#extract</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">tar -xvjf linux-3.18.5-kirkwood-tld-1-bodhi.tar.bz2</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">tar -xvf linux-dtb-3.18.5-kirkwood-tld-1.tar</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">#install kernel and headers</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">dpkg -i linux-image-3.18.5-kirkwood-tld-1_1_armel.deb</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">dpkg -i linux-headers-3.18.5-kirkwood-tld-1_1_armel.deb</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">#generate new uImage and uInitrd with fdt file. No need to modify uboot env</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">cp -a zImage-3.18.5-kirkwood-tld-1 zImage.fdt</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">cat dts/kirkwood-pogoplug_v4.dtb >> zImage.fdt</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.18.5-kirkwood-tld-1 -d zImage.fdt uImage</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.18.5-kirkwood-tld-1 -d initrd.img-3.18.5-kirkwood-tld-1 uInitrd</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">rm zImage.fdt</span></span><br />
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#clean up</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">rm linux-3.18.5-kirkwood-tld-1-bodhi.tar.bz2<br />
rm linux-dtb-3.18.5-kirkwood-tld-1.tar</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#reboot and verify</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">uname -a</span></div>
</div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br /></div>
<b>Install SAMBA for a simple NAS (Network Attached Storage) - Debian</b><br />
<b><br /></b>
Plug in your USB Hard Drive and partition and format the drive as ext3.<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">mkdir -p /media/usb/share</span><br />
<span style="font-family: Courier New, Courier, monospace;">mount /dev/sda1 /media/usb/share</span><br />
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">apt-get install samba<br />cd /etc/samba<br />mv smb.conf smb.conf.bak<br /><br />#download example smb.conf for public share<br />#no authentication require, everyone has <br />#read/write access to / (root$) and usb (/media/usb/share)<br />wget --no-check-certificate <a href="https://dl.dropboxusercontent.com/u/42238/pogoplug/debian/smb.conf">https://dl.dropboxusercontent.com/u/42238/pogoplug/debian/smb.conf</a><br />/etc/init.d/samba restart</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#For automount after reboot use /etc/fstab</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">echo "/dev/sda1 /media/usb ext3 rw,noatime,nofail 0 0" >> /etc/fstab</span></div>
<div>
<br />
<br />
<b><span style="font-size: large;">Debian Pogoplug Tutorials:</span></b><br />
<ul>
<li><a href="http://blog.qnology.com/2014/11/debian-on-pogoplug-tutorial-wireless.html" target="_blank"><span style="color: black; font-family: inherit;">Debian on Pogoplug Tutorial - Wireless Configuration</span></a></li>
<li><a href="http://blog.qnology.com/2014/11/debian-on-pogoplug-tutorial-mjpg.html" target="_blank"><span style="color: black; font-family: inherit;">Debian on Pogoplug Tutorial - MJPG-Streamer (WebCam) Installation</span></a></li>
<li><a href="http://blog.qnology.com/2014/11/debian-on-pogoplug-tutorial-webmin.html" target="_blank"><span style="color: black; font-family: inherit;">Debian on Pogoplug Tutorial - Webmin Installation</span></a></li>
<li><span style="font-family: inherit;">More to come</span></li>
</ul>
<b><br /></b>
<b>Troubleshooting</b><br />
<br />
On the Series 4, only the top USB port is bootable. The blue USB 3.0 ports on the back of the Series 4 are not bootable.<br />
<br />
Not all SD cards and USB flash drive are equal. If you're having issues booting into ALARM or Debian, try using a different SD card or USB flash drive.<br />
<br />
Double check that you're SD Card is not in the "locked" (read only) position.<br />
<br />
Cannot SSH back into the Pogoplug - double check the IP Address assigned to your Pogoplug. After booting Debian/ALARM, chances are your router will assign the Pogoplug a different IP Address. Check your router or use a network scanning tool to help figure out what IP Address was assigned to your Pogoplug.<br />
<br />
<a href="http://forum.doozan.com/read.php?3,14,14" target="_blank">Use Netconsole to see what's going on</a>. Hopefully you followed my recommendation and setup netconsole.<br />
<br />
Reinstallation - If you need to setup a new SD Card or USB Flash Drive, what you need to do is use a Linux computer or boot a Live Linux CD to partition, format (please make sure to use ext3 and not ext4), download and extract the rootfs to your SD Card or USB Flash Drive. Here is a basic outline of the steps from the <a href="http://archlinuxarm.org/support/reinstallation" target="_blank">ArchLinuxArm.org website</a>. Note for Debian, you'll want to use the link to the tarball in this tutorial.<br />
<br />
Note that it's fairly difficult or nearly impossible to truly brick the Pogoplug v4 because it supports UART booting using a serial connection. More info here - <a href="http://forum.doozan.com/read.php?3,7852,7852">http://forum.doozan.com/read.php?3,7852,7852</a>. Use <a href="https://www.dropbox.com/s/bx1usk1bzt87ufh/kwboot" target="_blank">bodhi's kwboot found here</a>.<br />
<br />
<br />
<b>Miscellaneous Links and Reference</b><br />
<ul><span style="font-family: inherit;">
<li><a href="http://linuxengineering.wordpress.com/2014/08/03/performance-tuning-with-pogoplug-v4/" style="font-family: inherit;" target="_blank">Performance Tuning with Pogoplug v4 on Arch Linux ARM</a></li>
<li><a href="http://fortysomethinggeek.blogspot.de/2013/03/pogoplug-series-4-archlinux-review.html" style="font-family: inherit;" target="_blank">PogoPlug Series 4 (ArchLinux) review</a></li>
<li><a href="http://mhassan.me/2012/11/17/pogoplug-v4-disassembly-and-attaching-serial-cable/" target="_blank">Pogoplug V4 Disassembly and Attaching Serial Cable</a></li>
<li><a href="http://forum.doozan.com/read.php?2,12096" target="_blank">Go here for the latest Debian kernel or rootfs</a>. </li>
<li><span style="font-family: inherit;">For Arch Linux ARM, please check out my previous tutorial: </span><a href="http://blog.qnology.com/2013/03/tutorial-pogoplug-e02-with-arch-linux.html" style="font-family: inherit;" target="_blank">[Tutorial] - Pogoplug E02/V4 with Arch Linux ARM - NAS (SAMBA), AirPlay, AirPrint, Google CloudPrint, SqueezeBox (Logitech Media Server), SqueezeLite, Plex Media Server</a></li>
</span></ul>
<b><br /></b>
<b>Self Promotion</b><br />
<b><br /></b>
Three Pogoplugs gave their lives bringing you this tutorial and countless hours. If you would like to show your support for this blog, please check out my <a href="http://airenabler.qnology.com/" target="_blank">AirEnabler</a> or buy me a cup of coffee (link above). Thank you for your support.<br />
<br />
<br /></div>
Qui Honghttp://www.blogger.com/profile/01067911447249645259noreply@blogger.com355tag:blogger.com,1999:blog-1622307871085727432.post-70212348207607119012014-03-31T10:09:00.001-07:002014-08-18T19:30:30.632-07:00DIY Portable AirPlay Speaker System<b>DIY Portable AirPlay Speaker System</b>:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7OquOc-2em0Bhpbp_DEZs9QeU9UGU188zXf0oHh1bgpYiw5FDEsaM4QbVLp4KI7whbM0Uh8Tgyxt-g3nKip7cBo73b-YmqUHeP6NWbpIBx_Pa6BaOwP8B68y_NtuMr6Iw0U2l9kIgVSZZ/s1600/Desktop2.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7OquOc-2em0Bhpbp_DEZs9QeU9UGU188zXf0oHh1bgpYiw5FDEsaM4QbVLp4KI7whbM0Uh8Tgyxt-g3nKip7cBo73b-YmqUHeP6NWbpIBx_Pa6BaOwP8B68y_NtuMr6Iw0U2l9kIgVSZZ/s1600/Desktop2.jpg" height="426" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
This is something I've been working off/on for over a year now. Originally inspired by the <a href="https://www.google.com/search?q=Boominator&rlz=1C1CHFX_enUS388US388&es_sm=93&tbm=isch&tbo=u&source=univ&sa=X&ei=FZs5U8uXCeSOyAHKhYCoCg&ved=0CDQQsAQ&biw=1120&bih=604" target="_blank">Boominator</a>. However, I lack the carpentry skills and tools, so I decided to build this instead. I believe it's fairly unique in that it's totally portable (battery operated) and supports AirPlay.<br />
<br />
<a href="http://www.amazon.com/gp/customer-media/product-gallery/B00EZWVZ44/ref=cm_cr_dp_cust_img_see_all_txt" target="_blank">Another photo of the back with captions on Amazon</a><br />
<br />
YouTube Video:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/w4SnFp-g1iY?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br /></div>
<div>
<b>Features:</b><br />
<ul>
<li>AirPlay support provided by AirEnabler - broadcast it's own Wi-Fi network and allows iOS device to automatically maintain 3G/LTE connection for internet radio streaming from Pandora or iTunes Radio.</li>
<li>Battery operated; 6-8 hours on low-medium volume.</li>
<li>Runs off battery or AC wall charger and support charging while playing</li>
<li>Expandable to stereo (add 2nd speaker)</li>
<li>Switch out li-ion battery for 12v motorcycle battery for extended play (camping).</li>
</ul>
</div>
<div>
<br /></div>
<div>
<b>Parts:</b><br />
<b><br /></b>
<a href="http://www.amazon.com/dp/B00EZWVZ44/?tag=blogqnologyco-20" target="_blank">AirEnabler Adapter Kit (for Apple AirPlay)</a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6od3IsD6tgZxtb8C9di2FVfVYc19bVdNtSu6CN1jKdv1mGHa3GL6jbXT8Y-Qm5fE3D1QHRppVK5CTh-waY9la-1kIFcDNqYrUXiUlYzb-Iu8rLeeHu8wjH5IY3-p9ECwkUj8-deZKPeAq/s1600/airenabler.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6od3IsD6tgZxtb8C9di2FVfVYc19bVdNtSu6CN1jKdv1mGHa3GL6jbXT8Y-Qm5fE3D1QHRppVK5CTh-waY9la-1kIFcDNqYrUXiUlYzb-Iu8rLeeHu8wjH5IY3-p9ECwkUj8-deZKPeAq/s1600/airenabler.jpg" height="200" width="150" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16882290268" target="_blank">Polk Audio Monitor 35B Compact Bookshelf Speakers</a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq5sAAOG-KuU-LGaVvo_fv2OAFVZhcKfqbYgXllL58iOOLOOuASu8XJ3VpX7CmG_VEGvgvvFLLZdFxyy91gbj9p_YLeRh3uos6nsGyUu4aW0IKa2zvVXrpbOVbnCIO4p_mp4L8m1-aTCp6/s1600/polk.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq5sAAOG-KuU-LGaVvo_fv2OAFVZhcKfqbYgXllL58iOOLOOuASu8XJ3VpX7CmG_VEGvgvvFLLZdFxyy91gbj9p_YLeRh3uos6nsGyUu4aW0IKa2zvVXrpbOVbnCIO4p_mp4L8m1-aTCp6/s1600/polk.jpg" height="130" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
<div>
<a href="http://www.amazon.com/dp/B00C2P61FO/?tag=blogqnologyco-20" target="_blank">Lepai LP-2020+ Tripath Class-T Amplifier</a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0WSAQoayDSkRN3V7LGWJ44HKzl0TLvkXVBSTjyTSX6jk8wbV87ivNp0jaDigs9DVK5vLkRVnHk4ymIjktMmLscNFyTaVd-maYTvpnKnO33NmH9_ScHqjwcGtm91xA7GKojii_rrqx0jMz/s1600/lepai.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0WSAQoayDSkRN3V7LGWJ44HKzl0TLvkXVBSTjyTSX6jk8wbV87ivNp0jaDigs9DVK5vLkRVnHk4ymIjktMmLscNFyTaVd-maYTvpnKnO33NmH9_ScHqjwcGtm91xA7GKojii_rrqx0jMz/s1600/lepai.jpg" height="200" width="200" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<a href="http://www.amazon.com/dp/B00EH9X7TG/?tag=blogqnologyco-20" target="_blank">12V 6800mAh Lithium Ion Rechargeable Battery</a></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQzrk_sY-s0ffuV38bwCNkChfqnaCRPh6EJ1InhFSA_b8jYlSny77oyjQQaa2mztOCy7TPEYVuh8ecsDyermq6k5V-S5jhyphenhyphenaG-1GaQHhh9fyBCekCyQmF62cpHJcAsqMEtKXCLe9AcAgQj/s1600/battery.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQzrk_sY-s0ffuV38bwCNkChfqnaCRPh6EJ1InhFSA_b8jYlSny77oyjQQaa2mztOCy7TPEYVuh8ecsDyermq6k5V-S5jhyphenhyphenaG-1GaQHhh9fyBCekCyQmF62cpHJcAsqMEtKXCLe9AcAgQj/s1600/battery.jpg" height="133" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="http://www.amazon.com/dp/B00825NB24/?tag=blogqnologyco-20" target="_blank">Voltage Meter - Blue LED</a></div>
<div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA7mouoxA-tXpWxrVneJ_2LZN7nWeB-lR_yEDrqLVUVOmzovJc5zQvweHlQdvxmhwW1HfNAgFu1Mla5zwmGi5EiPL2Z1_M-nwzgursDbk86nI2YB5ci7zTJ2b71BDREzWhSTgIC-7uNZ74/s1600/voltage.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA7mouoxA-tXpWxrVneJ_2LZN7nWeB-lR_yEDrqLVUVOmzovJc5zQvweHlQdvxmhwW1HfNAgFu1Mla5zwmGi5EiPL2Z1_M-nwzgursDbk86nI2YB5ci7zTJ2b71BDREzWhSTgIC-7uNZ74/s1600/voltage.jpg" height="200" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
</div>
<div>
<a href="http://www.ebay.com/itm/DC-Converter-Step-Down-Module-12V-to-5V-micro-usb-output-power-adapter-for-phone-/261203074650?pt=LH_DefaultDomain_0&hash=item3cd0ea9e5a" target="_blank">DC Converter Step Down Module - 12v to 5v with microusb</a></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtc1sOlLhmeTv4xcn_j4_TjH442MRIf__UWKFAudI-tDpQNHjlaT-4iRYg88abFo3Mx1Ke6XjxfQ8TpIAbCnAj1F0J4ZIQy9XO8EVdpKv157eiBrS9C6GQhjd05jpxQetSh1uQRaXLOYiM/s1600/microusb.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtc1sOlLhmeTv4xcn_j4_TjH442MRIf__UWKFAudI-tDpQNHjlaT-4iRYg88abFo3Mx1Ke6XjxfQ8TpIAbCnAj1F0J4ZIQy9XO8EVdpKv157eiBrS9C6GQhjd05jpxQetSh1uQRaXLOYiM/s1600/microusb.jpg" height="200" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
<div>
<div>
<a href="http://www.amazon.com/dp/B0050H9A18/?tag=blogqnologyco-20" target="_blank">2.1 x 5.5mm DC Power Cable Splitter (1 Female to 2 Male)</a></div>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-fpF51dC6F_mtZe-vBF87uNoOGEkag0dgJBU52IVW_RLa_sxApz8DhivKtj7OLV2-xroG9JnCGMnOsVwgBDvTyHmcRKvAeWCOrR-cUVTfvxwTBLHnXl1CubITmWWaP2ulJ9g4B2tI0w35/s1600/splitter.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-fpF51dC6F_mtZe-vBF87uNoOGEkag0dgJBU52IVW_RLa_sxApz8DhivKtj7OLV2-xroG9JnCGMnOsVwgBDvTyHmcRKvAeWCOrR-cUVTfvxwTBLHnXl1CubITmWWaP2ulJ9g4B2tI0w35/s1600/splitter.jpg" height="200" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
<div>
<a href="http://www.amazon.com/dp/B005CMP434/?tag=blogqnologyco-20" target="_blank">2.1 x 5.5mm DC Power Adapter Plug Female</a></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkesLt_cRoZezcVPAVHtJ2pZIes04fvLidBPWZ30Ts8KqA8rK4nqnBQsREcuxFP-Max6Up_T57S9Vvu-FR-rlIdNKKgi3GnxuiuMXS-kd9oqC5k9uNJsu6OdJwK6-x9C-_bdJAlMYevAOT/s1600/dcplugf.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkesLt_cRoZezcVPAVHtJ2pZIes04fvLidBPWZ30Ts8KqA8rK4nqnBQsREcuxFP-Max6Up_T57S9Vvu-FR-rlIdNKKgi3GnxuiuMXS-kd9oqC5k9uNJsu6OdJwK6-x9C-_bdJAlMYevAOT/s1600/dcplugf.jpg" height="200" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="http://www.amazon.com/dp/B005SRECEU/?tag=blogqnologyco-20" target="_blank">Double Sided Foam Tape</a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaiMvAQqawb_xgk2u13Ugqeg_FqpDs94cCvkM_iii_Y1jWygTiqzSsNhf2fvi43bE5H7z8UYKa25u8mnBnUuiTcuqFnVognsf808UYXHEkIsQXsWtuMcLAFrCOMjemhD55x9IvPbVgMk9i/s1600/tape.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaiMvAQqawb_xgk2u13Ugqeg_FqpDs94cCvkM_iii_Y1jWygTiqzSsNhf2fvi43bE5H7z8UYKa25u8mnBnUuiTcuqFnVognsf808UYXHEkIsQXsWtuMcLAFrCOMjemhD55x9IvPbVgMk9i/s1600/tape.jpg" height="175" width="200" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Qui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.com156tag:blogger.com,1999:blog-1622307871085727432.post-61562351878857682722013-12-27T21:07:00.000-08:002014-02-10T17:40:33.701-08:00iPhone/Android VPN to PPTP VPN Server on TomatoUSB RouteriPhone/Android Phone Home - PPTP VPN Server for iPhone or Android on TomatoUSB Router<br />
<br />
This is a quick tutorial on how to setup a PPTP VPN Server on your TomatoUSB Router. A PPTP VPN is ideal because it's fairly secure, simple to setup and both Android and iOS has built in PPTP VPN Clients which makes it convenient.<br />
<br />
A VPN is a secure way for an iPhone or Android device to access local network resources such as internal web sites (SSL not required for secure access), samba shares, and SqueezeBox Server without the need to open up additional network ports on the router.<br />
<br />
If you're looking for a router for this project, check out my <a href="http://blog.qnology.com/2012/12/tutorial-apple-airplay-on-tomatousb.html" target="_blank">[Tutorial] Apple AirPlay on TomatoUSB Router</a>.<br />
<br />
<b><span style="font-size: large;">Assumptions</span>:</b><br />
<br />
1) You're running <a href="http://tomato.groov.pl/?page_id=78" target="_blank">Shibby's BIG-VPN build</a> of TomatoUSB<br />
2) Dynamic DNS is setup (Required for Client Setup). See my<br />
<a href="http://blog.qnology.com/2013/02/tutorial-30-minutes-or-less-site-to.html" target="_blank">[Tutorial - 30 Minutes or Less] Site to Site VPN with TomatoUSB and OpenVPN</a> post for instructions on setting up Dynamic DNS Address.<br />
<br />
<b><span style="font-size: large;">Steps</span>:</b><br />
<br />
1) Configure PPTP Server<br />
2) Configure iPhone (iOS 7) VPN Client and Connect<br />
3) Configure Android VPN Client and Connect - In Progress<br />
<div>
<br /></div>
<b><span style="font-size: large;">Configure PPTP Server</span></b><br />
<br />
Log into your TomatoUSB Router and go to VPN Tunneling->PPTP Server.<br />
<br />
On the PPTP Server Configuration Page:<br />
<br />
- Check Enable<br />
- For Remote IP Address Range, pick a small IP Address range that is outside the scope of your DHCP Server but on the same network segment. For instance, I'm using 192.168.200.X as my network segment. My DHCP Server IP Adddress Range is 192.168.200.101-151. So I used 192.168.200.10-11 (outside the DHCP Range), giving me two IP Addresses (for two incoming iPhone).<br />
- Set Broadcast Relay Mode to Both<br />
- Set Encryption to MPPE-128<br />
- Leave DNS Servers, WINS Servers, MTU and MRU at the default values.<br />
- Under PPTP User List, add a user and set a password. You will need this info during the next step, Configure iPhone VPN Client.<br />
- Save<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBk4m1OTUixfm_dntyEh-3DhYphqZyopqeWY4JbImIw6XAKjMeI6VGuqhxqUm1lBzkZMeRKsaANI1v-w3H92Wkn_gtW4vkc4X_1z1qte_-a56AFsxKGyBGk8o7MXZiPMIewFWXdQSDk5zJ/s1600/PPTP+VPN+Server+TomatoUSB.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBk4m1OTUixfm_dntyEh-3DhYphqZyopqeWY4JbImIw6XAKjMeI6VGuqhxqUm1lBzkZMeRKsaANI1v-w3H92Wkn_gtW4vkc4X_1z1qte_-a56AFsxKGyBGk8o7MXZiPMIewFWXdQSDk5zJ/s640/PPTP+VPN+Server+TomatoUSB.PNG" height="494" width="640" /></a></div>
<br />
<b><span style="font-size: large;">Configure iPhone VPN Client and Connect</span></b><br />
<br />
On your iPhone, go to Settings->General->VPN->Add VPN Configuration.<br />
Select PPTP<br />
Fill in the Description<br />
For Server use your Dynamic DNS Address<br />
Account name ("pptpuser" in this tutorial) and password.<br />
Leave everything else as default.<br />
Save.<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQWA-VClF8_hT7qoWzdWGNNA2U3YQ0GY45kf3gyYKLpFB9oEcz9spIQ7BIA3IhHh8p4CNvn22NOtZ-6Ve2M6Bka_WgXbIDJblcKee8s6UYIyqpgjAPkF5Ji40jP3AP3qcC_fV-lTAMUNM1/s1600/iPhone+PPTP+VPN+Configuration.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQWA-VClF8_hT7qoWzdWGNNA2U3YQ0GY45kf3gyYKLpFB9oEcz9spIQ7BIA3IhHh8p4CNvn22NOtZ-6Ve2M6Bka_WgXbIDJblcKee8s6UYIyqpgjAPkF5Ji40jP3AP3qcC_fV-lTAMUNM1/s640/iPhone+PPTP+VPN+Configuration.PNG" height="640" width="355" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small; text-align: start;">Settings->General->VPN->Add VPN Configuration</span></td></tr>
</tbody></table>
<br />
Turn on VPN by going to Settings and sliding on "VPN". Note the "VPN" icon next to the clock when connected to VPN.<br />
<div>
<br />
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtkIrt52FG683eyAX9WPURECYCdyHYvJsY0UGAcTiDxJgI-AxnzfrXh3R-zXA7Ek42QQc5ABO0xMyGKFNoFnKU2OQrTDjVgzRBekkyYG4rBEq_84x7TEz8Durkw5Htq-cUEqqAaEE1JjjK/s1600/iPhone+Settings+VPN.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtkIrt52FG683eyAX9WPURECYCdyHYvJsY0UGAcTiDxJgI-AxnzfrXh3R-zXA7Ek42QQc5ABO0xMyGKFNoFnKU2OQrTDjVgzRBekkyYG4rBEq_84x7TEz8Durkw5Htq-cUEqqAaEE1JjjK/s640/iPhone+Settings+VPN.PNG" height="640" width="360" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Turn iPhone VPN on by going to Settings and sliding on VPN</td></tr>
</tbody></table>
<br />
<b><span style="font-size: large;">Configure Android VPN Client and Connect</span></b><br />
<b><span style="font-size: large;"><br /></span></b>
Go to "Wireless and network" settings -> VPN settings.<br />
Select "Add PPTP VPN"<br />
<div>
Set VPN server name<br />
Enable Encryption</div>
<div>
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
</div>
</div>
Qui Honghttp://www.blogger.com/profile/01067911447249645259noreply@blogger.com139tag:blogger.com,1999:blog-1622307871085727432.post-31121916297265757112013-11-06T22:03:00.002-08:002015-04-22T19:44:52.891-07:00How to Install Optware and SAMBA on the Pogoplug<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
In this tutorial, I'm going to show you how to install optware and samba on your Pogoplug to create a cheap and simple NAS.</div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br />
Last Updated - 4/22/2015<br />
<br />
<b>Why do you want to do this?</b><br />
<b><br /></b>
I'm a big fan of the my.pogoplug.com service that comes with the Pogoplug. It allows you to easily access your files from the web or your mobile device and even allows you to share your content with friends and family. Not to mention, the great automatic iPhone/Android photostream backup feature and remote mp3 playback.<br />
<br />
However, one thing the Pogoplug lacks is a simple and fast way to access your content on your local network; you need to install additional software on your MAC/PC and content can be slow to access and upload because the data go through the Pogoplug cloud.<br />
<br />
This tutorial will show you how to extend the functionality of the Pogoplug (existing my.pogoplug.com service is not affected), adding SAMBA (Windows File Sharing) support which doesn't require additional software to be installed on your PC/MAC and faster access to your content.<br />
<br /></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<b>What is optware?</b><br />
<br />
Optware is a package manager that allows you to install additional software on your embedded linux device such as the Pogoplug (think of it as a free little "App Store"), while maintaining the stock my.pogoplug.com functionality.</div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br /></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<b>Requirements</b>:</div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br /></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
1) Pogoplug - V2 such as the E02, V3 (oxnas) such as the Pogoplug P21/P22/Pogoplug Pro or the V4, also known as the Series 4 and Mobile. Pretty much any existing Pogoplug model is supported.</div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
2) USB Hard Drive - 2TB or less recommended.</div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br /></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<b>Outline of Steps:</b></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br /></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
1) SSH into Pogoplug</div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
2) Partition and Format USB Hard Drive</div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
3) Install Optware</div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
4) Install SAMBA</div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
5) Make sure everything works after a reboot</div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br /></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<b>SSH into Pogoplug</b></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="text-align: -webkit-auto;"><br /></span>
<span style="text-align: -webkit-auto;">In some cases, you can directly ssh into your Pogoplug. In other cases, you have to activate the Pogoplug on my.pogoplug.com and then enable SSH via their website. For the Pogoplug E02 (and potential other models), if you haven't activated your Pogoplug (new out of the box), you should be able to SSH into it using root/ceadmin as the username/password. If you have activated it, you'll need to </span><a href="http://support.pogoplug.com/hc/en-us/articles/200409955-How-do-I-enable-SSH-" style="text-align: -webkit-auto;" target="_blank">e</a><span style="text-align: -webkit-auto;"><a href="http://support.pogoplug.com/hc/en-us/articles/202307860-How-do-I-enable-SSH-" rel="nofollow" target="_blank">nable SSH via my.pogoplug.com</a> and set your own username and password. On the Pogoplug Mobile, I had to activate and then enable SSH. If you don't see the option to enable SSH, try rebooting your Pogoplug.</span><br />
<span style="text-align: -webkit-auto;"><br /></span>
For the Pogoplug V4 (Mobile and Series 4) and the Pogoplug Pro, you can use the backdoor method documented in my other blog post here versus activating on the my.pogoplug.com site - <a href="http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html">http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html</a>.<br />
<br /></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
SSH into Pogoplug using Putty or similar app</div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br /></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<b>Partition and Format USB Hard Drive</b></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br /></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
Plug in your USB Hard Drive to your Pogoplug.</div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br /></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="text-align: -webkit-auto;"><span style="font-family: Courier New, Courier, monospace;">#stop my.pogoplug.com service</span></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">killall hbwd</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#partition drive</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#create two partitions,<span style="text-align: -webkit-auto;"> a small 4GB partition</span></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="text-align: -webkit-auto;"><span style="font-family: Courier New, Courier, monospace;">#for optware and the rest for your data</span></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">busybox fdisk /dev/sda</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"># Type in the following commands to erase</span><br />
<span style="font-family: Courier New, Courier, monospace;"># and re-partition the USB Hard Drive </span><br />
<span style="font-family: Courier New, Courier, monospace;">#<span style="color: red;">(WARNING - USB HARD DRIVE WILL BE COMPLETELY WIPED)</span>: </span><br />
<span style="font-family: Courier New, Courier, monospace;"># </span><br />
<span style="font-family: Courier New, Courier, monospace;"># p # list current partitions</span><br />
<span style="font-family: Courier New, Courier, monospace;"># o # to delete all partitions</span><br />
<span style="font-family: Courier New, Courier, monospace;">#</span><br />
<span style="font-family: Courier New, Courier, monospace;"># Create 1st Partition for Optware</span><br />
<span style="font-family: Courier New, Courier, monospace;">#</span><br />
<span style="font-family: Courier New, Courier, monospace;"># n # new partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># p # primary partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># 1 (one) # first partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <enter> # default start block</span><br />
<span style="font-family: Courier New, Courier, monospace;"># +4G # to create a 4GB partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># </span><br />
<span style="font-family: Courier New, Courier, monospace;"># Create 2nd Partition for Data</span><br />
<span style="font-family: Courier New, Courier, monospace;">#</span><br />
<span style="font-family: Courier New, Courier, monospace;"># n # new partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># p # primary partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <enter> # default to second partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <enter> # default start block</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <enter> # default end block #use the whole flash drive</span><br />
<span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;"># w # write new partition to disk</span><span style="font-family: Courier New, Courier, monospace;"></span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#download mke2fs to format partition</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">cd /tmp</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">wget <a href="http://download.qnology.com/pogoplug/optware/mke2fs">http://download.qnology.com/pogoplug/optware/mke2fs</a></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">chmod +x mke2fs</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#format and label partition</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">./mke2fs -L optware -j /dev/sda1</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">./mke2fs -L data -j /dev/sda2</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#remount root to be writable</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">mount -o remount,rw /</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#create /opt folder</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">mkdir /opt</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#mount usb drive as /opt</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">mount /dev/sda1 /opt</span></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br /></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<b><br /></b></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<b>Install Optware</b></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<b><br /></b></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">############################</span><span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;">#####</span><span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;">#####</span><span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;">#####</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"># Install optware ipkg (package manager)</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"># Assumes /opt is mounted at this point</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">############################</span><span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;">#####</span><span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;">#####</span><span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;">#####</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#download ipkg</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">cd /opt</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">wget <a href="https://www.blogger.com/goog_2017565580">http://</a></span><a href="http://download.qnology.com/pogoplug/optware/plug.tar.gz"><span style="font-family: 'Courier New', Courier, monospace;">download.qnology.com</span><span style="font-family: Courier New, Courier, monospace;">/pogoplug/optware/plug.tar.gz</span></a></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">tar -xzvf plug.tar.gz</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">rm plug.tar.gz</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;"># Setup profile</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="text-align: -webkit-auto;"><span style="font-family: Courier New, Courier, monospace;">cd /etc</span></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">wget <a href="http://download.qnology.com/pogoplug/optware/profile">http://download.qnology.com/pogoplug/optware/profile</a></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">chmod 755 profile</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">source /etc/profile</span></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br /></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: 'Courier New', Courier, monospace;">#update available packages</span></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<div style="font-family: 'Times New Roman'; text-align: -webkit-auto;">
<span style="font-family: Courier New, Courier, monospace;">ipkg update</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
</div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br /></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<b>Install Samba</b></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<b><br /></b></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;">ipkg install samba36 libnsl nano</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#download example smb.conf</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">cd /opt/etc/samba</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">wget <a href="https://www.blogger.com/goog_2017565576">http://</a></span><a href="http://download.qnology.com/pogoplug/optware/smb.conf"><span style="font-family: 'Courier New', Courier, monospace;">download.qnology.com</span><span style="font-family: Courier New, Courier, monospace;">/pogoplug/optware/smb.conf</span></a></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#Edit smb.conf (optional)</span><br />
<span style="font-family: Courier New, Courier, monospace;">#to add additional samba shares</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#nano /opt/etc/samba/smb.conf</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#Start SAMBA</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">/opt/etc/init.d/S08samba start</span></div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<br />
<div style="font-family: 'Times New Roman'; orphans: auto; widows: auto;">
You should now be able to access your Pogoplug's USB Hard Drive by \\pogoplug\usb or \\IPAddress\usb</div>
<div>
<br />
<br /></div>
</div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<b style="text-align: -webkit-auto;">Make sure everything works after a reboot</b></div>
<div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="text-align: -webkit-auto;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="text-align: -webkit-auto;"><span style="font-family: Courier New, Courier, monospace;">#backup original rcS startup file</span></span><br />
<span style="text-align: -webkit-auto;"><span style="font-family: Courier New, Courier, monospace;">#restore the rcS.original file to revert</span></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">cp /etc/init.d/rcS /etc/init.d/rcS.original</span></div>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<div style="text-align: -webkit-auto;">
<span style="font-family: Courier New, Courier, monospace;">#download mount script and make it executable</span></div>
<div style="text-align: -webkit-auto;">
<span style="font-family: Courier New, Courier, monospace;">cd /etc/init.d</span></div>
<div style="text-align: -webkit-auto;">
<span style="font-family: Courier New, Courier, monospace;">wget <a href="https://www.blogger.com/goog_2017565586">http://</a></span><a href="http://download.qnology.com/pogoplug/optware/mount_optext3"><span style="font-family: 'Courier New', Courier, monospace;">download.qnology.com</span><span style="font-family: Courier New, Courier, monospace;">/pogoplug/optware/mount_optext3</span></a></div>
<div style="text-align: -webkit-auto;">
<span style="font-family: Courier New, Courier, monospace;">chmod +x mount_optext3</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#add mount script to rcS file so it </span><br />
<span style="font-family: Courier New, Courier, monospace;">#runs automatically after a reboot</span><br />
<span style="font-family: Courier New, Courier, monospace;">#this script will mount /opt</span><br />
<span style="font-family: Courier New, Courier, monospace;">#the data partition is automatically mounted by the pogoplug software</span></div>
<div style="text-align: -webkit-auto;">
<span style="font-family: Courier New, Courier, monospace;">echo "/etc/init.d/mount_optext3" >> /etc/init.d/rcS</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
</div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#start samba on reboot</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="text-align: -webkit-auto;"><span style="font-family: Courier New, Courier, monospace;">echo "/opt/etc/init.d/S08samba start" >> /etc/init.d/rcS</span></span><br />
<span style="text-align: -webkit-auto;"><span style="font-family: Courier New, Courier, monospace;"><br /></span></span>
<span style="text-align: -webkit-auto;"><span style="font-family: Courier New, Courier, monospace;">reboot</span></span></div>
</div>
<div>
<br />
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
<b style="text-align: -webkit-auto;">Adding an Additional/Second USB Hard Drive</b></div>
<div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
</div>
</div>
<br />
1) Attach additional USB Drive to Pogoplug.<br />
<br />
2) Partition additional USB Drive. See "Partition and Format USB Hard Drive" section, but just create one partition.<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace; orphans: 2; widows: 2;"> busybox fdisk /dev/sdb</span><br />
<br />
3) Format and Label additional USB Drive<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace; orphans: 2; widows: 2;">./mke2fs -L data2 -j /dev/sdb1</span><br />
<div>
<br /></div>
4) Remount root to be writable<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace; orphans: 2; text-align: -webkit-auto; widows: 2;"> mount -o remount,rw /</span><br />
<br />
4) Edit the smb.conf file and add an additional section that is similar to the "[usb]" section.<br />
<br />
<span style="background-color: white; line-height: 16.799999237060547px; orphans: 2; widows: 2;"><span style="font-family: Courier New, Courier, monospace;"> nano /opt/etc/samba/smb.conf</span></span><br />
<br />
[usb2]<br />
path = /tmp/.cemnt/mnt_sdb1/<br />
read only = no<br />
public = yes<br />
writable = yes<br />
guest ok = yes<br />
<br />
5) Reboot. You should now be able to access the additional drive as \\pogoplug\usb2<br />
<br />
<br />
<b><span style="font-family: inherit;">Miscellaneous Notes</span></b><br />
<br />
<span style="font-family: inherit;">On the Pogoplug V2 (E02) and Pogoplug v4 (Mobile and Series), you can actually use one of the internal flash partition for /opt. </span>Only recommended for more advanced users.</div>
<div>
<br />
Edit 4/22/2015 - The below instructions for the Pogoplug V4 will also work on the Pogoplug Pro.<br />
<br />
<a class="GCUXF0KCPF" href="http://blog.qnology.com/p/pogoplug-v4-optware-and-samba-on-nand.html" style="background-color: #fff9e7; border: 0px; color: #1155cc; display: inline-block; margin: 0px 10px 0px 0px; max-width: 100%; overflow: hidden; padding: 0px; text-decoration: none; text-overflow: ellipsis; vertical-align: baseline; white-space: nowrap; width: auto;" target="_blank"><span style="font-family: inherit;">Pogoplug V4 - Optware and SAMBA on NAND (Internal Flash)</span></a><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">The below instructions are for the E02.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">The E02 has a small partition (~90MB) that isn't used - MTD3, which is just enough for Optware and SAMBA.</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">####################################<br /># Pogoplug V2 - Use internal flash partition for /opt<br />####################################</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#remount root to be writable<br />mount -o remount,rw /<br /><br />#create /opt folder<br />mkdir /opt<br /><br />#erase mtdblock3<br />cd /tmp<br />wget <a href="http://download.doozan.com/uboot/flash_eraseall">http://download.doozan.com/uboot/flash_eraseall</a><br />echo "/dev/mtd0 0xc0000 0x20000 0x20000">/etc/fw_env.config<br />/tmp/flash_eraseall /dev/mtd3</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#mount internal flash partition as /opt<br />mount /dev/mtdblock3 /opt</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>Changes to above instructions if using internal flash for /opt<br />
- only one partition needed on your USB hard drive<br />
- "Install Optware" and "Install Samba" instructions unchanged<br />
- modify the smb.conf file for correct partition<br />
path = /tmp/.cemnt/mnt_sda<span style="background-color: yellow;"><b>1</b></span>/ <br />
- In the "Make sure everything works after a reboot" section, you don't need the mount_optext3 script</div>
- Add the "mount /dev/mtdblock3 /opt" command before the "/opt/etc/init.d/S08samba start" command in the /etc/init.d/rcS file. <br />
<div>
<br />
<b>Troubleshooting</b><br />
<b><br /></b>
<span style="font-family: Courier New, Courier, monospace;">/opt</span> not mounting - check the content of the <span style="font-family: Courier New, Courier, monospace;">/etc/init.d/rcS</span> file and make sure <span style="font-family: Courier New, Courier, monospace;">/etc/init.d/mount_optext3</span> is called. Also double check that the <span style="font-family: Courier New, Courier, monospace;">/etc/init.d/mount_optext3</span> file exist and is executable. Minimize the number of attached USB drives<br />
<br />
samba not working (\\pogoplug\usb not accessible) - double check that /opt is mounted correctly. Make sure that "<span style="font-family: Courier New, Courier, monospace;">/opt/etc/init.d/S08samba start</span>" is the last line in the <span style="font-family: Courier New, Courier, monospace;">/etc/init.d/rcS</span> file. Verify that the /<span style="font-family: Courier New, Courier, monospace;">opt/etc/samba/smb.conf </span>exist.<br />
<br />
data partition not mounted - the data partition is automatically mounted by the pogoplug software to something like <span style="font-family: Courier New, Courier, monospace;">/tmp/.cemnt/mnt_sda2</span>. Run the "<span style="font-family: Courier New, Courier, monospace;">df -h</span>" command to see what's mounted. Check the <span style="font-family: Courier New, Courier, monospace;">/etc/init.d/rcS</span> file to make sure the pogoplug software start command ("<span style="font-family: Courier New, Courier, monospace;">/etc/init.d/hbmgr.sh start</span>") isn't commented out (begins with #).</div>
<div>
<br /></div>
<div>
<br />
<b>Future Updates</b><br />
<b><br /></b>
I'll be flushing this tutorial with additional howtos in the near future. Please leave a comment and what you would like to see added.<br />
<br />
<br /></div>
<div>
<span style="font-family: inherit;">CREDITS AND REFERENCES:</span><br />
<a href="http://aaronrandall.com/blog/category/pogoplug/">http://aaronrandall.com/blog/category/pogoplug/</a><br />
<a href="http://www.razva.ro/how-to-install-samba-on-pogoplug-4/">http://www.razva.ro/how-to-install-samba-on-pogoplug-4/</a><br />
<a href="http://www.nslu2-linux.org/wiki/Optware/PlugComputers">http://www.nslu2-linux.org/wiki/Optware/PlugComputers</a></div>
<div>
<a href="http://blog.klug.me/2013/01/22/installing-optware-on-your-pogoplug/">http://blog.klug.me/2013/01/22/installing-optware-on-your-pogoplug/</a><br />
<a href="http://turriebuntu.wordpress.com/pogoplugdockstar-pages/add-samba-to-your-pogoplug/">http://turriebuntu.wordpress.com/pogoplugdockstar-pages/add-samba-to-your-pogoplug/</a><br />
<br /></div>
Qui Honghttp://www.blogger.com/profile/01067911447249645259noreply@blogger.com166tag:blogger.com,1999:blog-1622307871085727432.post-3251828136798970192013-10-08T17:11:00.000-07:002015-04-10T13:19:34.637-07:00Pogoplug V2 and V3 Serial Connection - E02, P21/P22, ProThis is a quick how to tutorial on setting up a serial console connection to the Pogoplug E02 (V2) or P21/P22 (V3 oxnas).<br />
<div>
<br />
Instructions for the Pogoplug V4 <a href="http://mhassan.me/2012/11/17/pogoplug-v4-disassembly-and-attaching-serial-cable/" target="_blank">here</a>.<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
A serial console connection is useful for recovering from a corrupt uboot environment or for troubleshooting general boot up issues.<br />
<div>
<br />
You should be able to add a serial connection to your Pogoplug for less than $10 and in under 30 minutes.<br />
<br /></div>
<div>
<b>Requirements:</b></div>
<div>
<br /></div>
<div>
1) <a href="http://www.amazon.com/dp/B009GXEF8A/?tag=blogqnologyco-20" target="_blank">USB to TTL Converter</a> - I have a couple cheap USB to TTL converters based on the PL-2303HX chipset. Note that this chipset is not supported under Windows 8 and most PL-2303HX being sold on Amazon and Ebay are using fake chips which are not supported by the official drivers on Prolific's website. I'm using the drivers found <a href="http://www.usglobalsat.com/s-24-support-drivers.aspx" target="_blank">here</a>. Personally, I use a Pogoplug running Arch/Debian to connect to my problematic Pogoplug, so the lack of Windows 8 support isn't a problem for me.<br />
<br />
<a href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=9&pub=5575059262&toolid=10001&campid=5337506712&customid=&icep_uq=PL2303+USB+RS232+TTL&icep_sellerId=&icep_ex_kw=&icep_sortBy=12&icep_catId=&icep_minPrice=&icep_maxPrice=&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=lg" target="_blank">Ebay is another good source the the USB to TTL Converter.</a></div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS4aSEVw9xJEp5KtZKrts2Wj96YQw1mqJhb7Vc-w9CWKDx9nRPBletDhDbiDLKab38LYJD1kkubRs51Snmd3NxUouvR1ihUicW6uZrb1HeuYhwJixiXn1zfFFhZs4-ZUy1_skkmVsMTK5v/s1600/USB-TTL-Converter.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS4aSEVw9xJEp5KtZKrts2Wj96YQw1mqJhb7Vc-w9CWKDx9nRPBletDhDbiDLKab38LYJD1kkubRs51Snmd3NxUouvR1ihUicW6uZrb1HeuYhwJixiXn1zfFFhZs4-ZUy1_skkmVsMTK5v/s400/USB-TTL-Converter.JPG" height="300" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Prolific PL-2303HX USB to TTL Converter<br />
<br /></td></tr>
</tbody></table>
<div>
2) <a href="http://www.amazon.com/dp/B00DRQK928/?tag=blogqnologyco-20" target="_blank">CD-ROM Audio Cable (Sound Blaster/MPC-2)</a> - you need the one with a white connector (Sound Blaster plug) at one end and a black connector (MPC-2) at the other end. I got mine from a old computer. You can pick one up on <a href="http://www.amazon.com/dp/B00DRQK928/?tag=blogqnologyco-20" target="_blank">Amazon for less than $5</a> otherwise <a href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=9&pub=5575059262&toolid=10001&campid=5337506712&customid=&icep_uq=sound+blaster+MPC-2&icep_sellerId=&icep_ex_kw=&icep_sortBy=12&icep_catId=&icep_minPrice=&icep_maxPrice=&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=lg" target="_blank">Ebay is another good source</a>.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHjiN-Xw53yVovkHzeK3fBgPohNPX0bhwA2lCtObUafr7Xildd4uf6bnLpw4aGYg5ecEHlI9O16ST8uPFou98yTWme1eKmvC6nSXtFiFk2ZjsoGGg7Tsujuwdv9eh8nuenCq4cHsgvxbAH/s1600/IMG_2963.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHjiN-Xw53yVovkHzeK3fBgPohNPX0bhwA2lCtObUafr7Xildd4uf6bnLpw4aGYg5ecEHlI9O16ST8uPFou98yTWme1eKmvC6nSXtFiFk2ZjsoGGg7Tsujuwdv9eh8nuenCq4cHsgvxbAH/s400/IMG_2963.JPG" height="300" width="400" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
3) Safety pin - used to modify the CD-ROM Audio Cable.<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjugVo3Q9zwUoezxUW8bcGzK6aw_lPs_Y6ue4vf_vS4AhlEDhQKAPO587ovSdRX69tOMQQDGjZT1tJcQQQkIAu5lT0fpVgXWtPopyDh8dozT_WLtsenhv-eNSR7QFeoCzq3D1Z5n6CWY6a_/s1600/Safety_Pin.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjugVo3Q9zwUoezxUW8bcGzK6aw_lPs_Y6ue4vf_vS4AhlEDhQKAPO587ovSdRX69tOMQQDGjZT1tJcQQQkIAu5lT0fpVgXWtPopyDh8dozT_WLtsenhv-eNSR7QFeoCzq3D1Z5n6CWY6a_/s320/Safety_Pin.jpg" height="233" width="320" /></a></div>
<div>
<br /></div>
<div>
4) Small flat head screwdriver (optional)</div>
<div>
<br /></div>
<div>
<b>Outline of Steps:</b></div>
<div>
<br /></div>
<div>
1) Opening up the Pogoplug</div>
<div>
2) Modify CD-ROM Audio Cable</div>
<div>
3) Connect the USB to TTL Converter to the Pogoplug</div>
<div>
3) Install Drivers and Connect via Putty</div>
<div>
<br /></div>
<div>
Lets get started.</div>
<div>
<br /></div>
<div>
<b>Opening up the Pogoplug</b></div>
<div>
<b><br /></b></div>
<div>
This part is pretty easy. You actually don't even need any tools, just a little force. </div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3C66xGlY7XX2Cb9dQyrtgEtvU_496bEK7XgKBb-IkFrL9yuuazUARAXbH5Fa75goE6qW3_-eZ5kegXCgwuu0KTEh8HeY5onyGuRME4y45ZgIQ5BwfEiDUHU2VfgnicrsH-6hI21YLv_qX/s1600/Pogoplug+-+Opening+up.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3C66xGlY7XX2Cb9dQyrtgEtvU_496bEK7XgKBb-IkFrL9yuuazUARAXbH5Fa75goE6qW3_-eZ5kegXCgwuu0KTEh8HeY5onyGuRME4y45ZgIQ5BwfEiDUHU2VfgnicrsH-6hI21YLv_qX/s400/Pogoplug+-+Opening+up.JPG" height="300" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Pull off the black feet, starting from the bottom. Clear plastic slides back.</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl8G9YR2Tmywolt1AUIB02rPkzvOFueKs0QnDhjNUYyZ1XAVxTfoojTwOLM8yOdU4lPx0njUNQmcfvFbU0ESmXcpY6KL3rIczTZfaUY4cUK3yN3d-ekJmYUJZYdOsHi8Qt1TnxU5tOZlsF/s1600/IMG_2961.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl8G9YR2Tmywolt1AUIB02rPkzvOFueKs0QnDhjNUYyZ1XAVxTfoojTwOLM8yOdU4lPx0njUNQmcfvFbU0ESmXcpY6KL3rIczTZfaUY4cUK3yN3d-ekJmYUJZYdOsHi8Qt1TnxU5tOZlsF/s400/IMG_2961.JPG" height="300" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The shell is held together by small plastic clips. This is where a small flat head screwdriver may be helpful. </td></tr>
</tbody></table>
<div>
<br /></div>
<div>
<b>Modify CD-ROM Audio Cable</b></div>
<div>
<b><br /></b></div>
<div>
On the end with the black connector, use the safety pin to push out the the wires as shown below.<br />
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTvmP5kQJzvIw6DsDDJeW26nNvLnWmOPIGkjCMtUYv4I1Ui4AWbEC7lDPezZrH80hDiMwUptD6R_K7VTx9DWFKiGY1nIKiCa2LL-uvCEAQkZE0AeoRulTL7Vo4iQcCKk8Jh6CGuQi3hN1t/s1600/cdrom+audio1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTvmP5kQJzvIw6DsDDJeW26nNvLnWmOPIGkjCMtUYv4I1Ui4AWbEC7lDPezZrH80hDiMwUptD6R_K7VTx9DWFKiGY1nIKiCa2LL-uvCEAQkZE0AeoRulTL7Vo4iQcCKk8Jh6CGuQi3hN1t/s320/cdrom+audio1.JPG" height="240" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq1waMkRyP68CmzNl8GLDcOmssZFlDnnWhOJjN6T5jn8x9Y4329Hqx4Syut7pfXydfOsF-SibrTMKnfUBTM9fF3x0xigKT57qYpkFR_O6IWACUIkAW297HOg6M9PFoudDYcJdPzf9CODs2/s1600/cdrom+audio+2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq1waMkRyP68CmzNl8GLDcOmssZFlDnnWhOJjN6T5jn8x9Y4329Hqx4Syut7pfXydfOsF-SibrTMKnfUBTM9fF3x0xigKT57qYpkFR_O6IWACUIkAW297HOg6M9PFoudDYcJdPzf9CODs2/s320/cdrom+audio+2.JPG" height="240" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
If you want a permanent serial connection, at this point (before reinserting the wires) you can drill a small hole on the back of your Pogoplug for the CD-ROM audio cable.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now, reinsert the wires with the white wire on the edge, red in the middle and then yellow as shown below. Use electrical tape to tape up the black wire (not used). In the picture below, white will be GND.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKUrMMHv054DqEgrHVq4gKp_CvmLB-lJedmRcXzBpwVwVdcZ4YQN1BQVRUR4bpgEMLhE3dYoxbiAJw6-E19j38TG-5ownEwhpshH4shAWP7F0uhAACb1-d-X7h8av5kqNHm1ij3v1YrKIc/s1600/cdrom+audio+3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKUrMMHv054DqEgrHVq4gKp_CvmLB-lJedmRcXzBpwVwVdcZ4YQN1BQVRUR4bpgEMLhE3dYoxbiAJw6-E19j38TG-5ownEwhpshH4shAWP7F0uhAACb1-d-X7h8av5kqNHm1ij3v1YrKIc/s320/cdrom+audio+3.JPG" height="240" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Connect the USB to TTL Converter to Pogoplug</b></div>
<div>
<br />
The CD-ROM Audio Cable that we modified will work for both Pogoplug V2 and Pogoplug V3.<br />
<br /></div>
<div>
Here is how everything should connect up. The white end of the CD-ROM audio cable can be plugged directly into the serial port of the Pogoplug. The black end of the CD-ROM audio cable can be plugged directly into the USB to TTL converter.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUV2CdHdJ_LBxqYp6NE7PzQhxNjh7wdeOCVLzUJF-jm0I703Sm3b4TCAJAOnCYUIxd5TCkXuB0VwqXVI41WxrpR5iSxYgxzJgpZU-zjchr9gi02xhY56tK6eW8I8XSuR49S1kx6sEbk84H/s1600/Pogoplug+V2+Serial+Console+Connection.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUV2CdHdJ_LBxqYp6NE7PzQhxNjh7wdeOCVLzUJF-jm0I703Sm3b4TCAJAOnCYUIxd5TCkXuB0VwqXVI41WxrpR5iSxYgxzJgpZU-zjchr9gi02xhY56tK6eW8I8XSuR49S1kx6sEbk84H/s640/Pogoplug+V2+Serial+Console+Connection.jpg" height="478" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Pogoplug V2 (E02) Serial Console Connection</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_5s4q8eUwAaCRGzrKjXa5QsnJxsClCY29kLwPUXBE9wVkmfP_2uII4GDizx3WuZ2BdrbmqPlthgLXLEK_EJXkxf9PEe2V5cyk-DYwsuozHef4jb8SGOB1i0yFOvgNuoG6uif9KCuCDDj5/s1600/Pogoplug+v3+Serial+Console+Connection.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_5s4q8eUwAaCRGzrKjXa5QsnJxsClCY29kLwPUXBE9wVkmfP_2uII4GDizx3WuZ2BdrbmqPlthgLXLEK_EJXkxf9PEe2V5cyk-DYwsuozHef4jb8SGOB1i0yFOvgNuoG6uif9KCuCDDj5/s640/Pogoplug+v3+Serial+Console+Connection.jpg" height="478" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Pogoplug V3 Serial Console Connection</td></tr>
</tbody></table>
Make sure GND on the Pogoplug is connected to GND on the USB to TTL converter.<br />
TXD on the Pogoplug should connect to RXD on the USB to TTL converter.<br />
RXD on the Pogoplug should connect to TXD on the USB to TTL converter.<br />
VCC and the 3.3v is not needed and should not be connected.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b>Install Drivers and Connect via Putty</b></div>
<div>
<b><br /></b></div>
<div>
Download drivers and install it. I'm using the drivers found <a href="http://www.usglobalsat.com/s-24-support-drivers.aspx" target="_blank">here</a>.</div>
<div>
<div>
<br /></div>
<div>
<a href="https://dl.dropboxusercontent.com/u/42238/pl-2303hx/windows_pl2303_usb_driver.zip" target="_blank">Windows Driver Mirror on my Dropbox.</a></div>
<div>
<a href="https://dl.dropboxusercontent.com/u/42238/pl-2303hx/osx_10_6_usb_drvr.zip" target="_blank">OSX Driver Mirror on my Dropbox.</a><br />
No drivers needed for Linux.</div>
</div>
<div>
<br /></div>
<div>
Plug in the USB to TTL converter and open up Device Manager and verify that Windows detected the USB to TTL converter correctly. Note the COM port number (COM4 in the example below).</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmBQ7ujmE152hxns3skRlbDx2NM__0MW-fiuBeDo_UvyT-bcF8i8d0hEYrz7foc9umQmsF1bX5K3MqrRrlEmoDKNh5HTD5Hki_sroaw9bko_aMw-TUj2xSa4DkoDqEDnjKVwxk4HbRBtHX/s1600/DeviceManager.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmBQ7ujmE152hxns3skRlbDx2NM__0MW-fiuBeDo_UvyT-bcF8i8d0hEYrz7foc9umQmsF1bX5K3MqrRrlEmoDKNh5HTD5Hki_sroaw9bko_aMw-TUj2xSa4DkoDqEDnjKVwxk4HbRBtHX/s400/DeviceManager.JPG" height="355" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
Download putty from <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">here </a>and start it up.<br />
<br />
Change the Connection type to Serial.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgerOChoZJo-z-woCX4zG7c5QWbsG2xrAnfPl09PdXJYxpx4AHVcoO03ROvrnUIcr42Bt1dC7Jk89UAeQoaXjCfiLhQoChBW17UYolMYZqFPHjrqVDBXe_QUYIU_UUAlG4T7KXR1aqyWCbV/s1600/putty1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgerOChoZJo-z-woCX4zG7c5QWbsG2xrAnfPl09PdXJYxpx4AHVcoO03ROvrnUIcr42Bt1dC7Jk89UAeQoaXjCfiLhQoChBW17UYolMYZqFPHjrqVDBXe_QUYIU_UUAlG4T7KXR1aqyWCbV/s400/putty1.JPG" height="387" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Under Category, click on Serial and change the serial line configuration settings to the following:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Speed: 115200</div>
<div class="separator" style="clear: both; text-align: left;">
Data bits: 8</div>
<div class="separator" style="clear: both; text-align: left;">
Stop bits: 1</div>
<div class="separator" style="clear: both; text-align: left;">
Parity: None</div>
<div class="separator" style="clear: both; text-align: left;">
Flow control: None</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Change the COM port to the correct one found in Device Manager. Click Open.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaGnrlgYcWsiAKGMumNrVPdNtXUo1EL_qsJL27EsWAHug4poVPGhO0fNDWin5PST_OtfhWEKG6_7Ezs5xnAT9ZUQqb3uOSZ987wBgdwtqNQ0hixabDqsUPxdr79xngzhW5J0PX-BH_BisP/s1600/putty2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaGnrlgYcWsiAKGMumNrVPdNtXUo1EL_qsJL27EsWAHug4poVPGhO0fNDWin5PST_OtfhWEKG6_7Ezs5xnAT9ZUQqb3uOSZ987wBgdwtqNQ0hixabDqsUPxdr79xngzhW5J0PX-BH_BisP/s400/putty2.JPG" height="387" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
Now power up your Pogoplug. You should see something like the following in your Putty Serial Console.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDdR1fZqpM6y77rBT3RJxBADcpgTLiJm72Yc2Njj4MNqfGRt9DKWAsPVdWZ0yku6ZxOQK736-yKcJJyBZUeaZnemUboc6X9l-Mx74K-sSXt-6FqiVovq8ENrwVN7AKtgP3IETtxLVDc4i6/s1600/putty3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDdR1fZqpM6y77rBT3RJxBADcpgTLiJm72Yc2Njj4MNqfGRt9DKWAsPVdWZ0yku6ZxOQK736-yKcJJyBZUeaZnemUboc6X9l-Mx74K-sSXt-6FqiVovq8ENrwVN7AKtgP3IETtxLVDc4i6/s400/putty3.JPG" height="250" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
That's it.</div>
<div>
<br />
<b>Addendum (7/1/2014)</b><br />
<br />
For some reason one of my Pogoplugs had a corrupted (or incorrect) uboot environment variable setting so I had a use a serial connection to recover it. The issue was, all my computers at home are now running Windows 8 and as mentioned above, the PL-2303HX USB TTL converter isn't compatible with Windows 8. What I ended up doing was using another Pogoplug which was already running Arch Linux ARM to connect to the problematic Pogoplug. These instructions will also work for other Linux systems.<br />
<br />
On the working Pogoplug running ALARM:<br />
<br />
1) Plug in USB to TTL adapter.<br />
2) Install Screen<br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#For Arch Linux Arm</span><br />
<span style="font-family: Courier New, Courier, monospace;">pacman -Sy screen</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#For Debian</span><br />
<span style="font-family: Courier New, Courier, monospace;">apt-get install screen</span><br />
<br />
3) Start screen serial console session. The follow command will start the screen serial console with the appropriate settings for the Pogoplug (baud 115200, Data bits: 8, Stop bits: 1,Parity: None, Flow control: None).</div>
<div>
<br /></div>
<span style="font-family: Courier New, Courier, monospace;">screen /dev/ttyUSB0 115200 cs8 -cstopb -parenb</span><br />
<div>
<br /></div>
<div>
4) Some quick Screen commands:</div>
<div>
<br /></div>
<div>
Control + a and then ":quit" to exit</div>
<div>
Control + a and then 'd' to detach<br />
<br />
<b>Picocom instead of Screen</b><br />
<b><br /></b>
<span style="font-family: inherit;">Recently I discovered picocom and now it's my preferred serial console app.</span><b><br /></b>
<span style="font-family: Courier New, Courier, monospace;">#For Arch Linux Arm</span><br />
<span style="font-family: Courier New, Courier, monospace;">pacman -Sy picocom</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">#For Debian</span><br />
<span style="font-family: Courier New, Courier, monospace;">apt-get install picocom</span><br />
<b><br /></b>
<span style="font-family: Courier New, Courier, monospace;">picocom -b 115200 /dev/ttyUSB0</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Control+a+x to exit</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
</div>
<div>
A couple of good post on resetting the uboot env on your Pogoplug:</div>
<div>
<br /></div>
<h4 style="font-family: Arial; font-size: 16px; font-weight: normal; margin: 0px;">
<a class="" href="http://forum.doozan.com/read.php?3,16129" style="color: #355f35;" title="">Help, Pogogplug E02 , No LED,serial cable connected ,what next?</a></h4>
<div>
<h4 style="font-family: Arial; font-size: 16px; font-weight: normal; margin: 0px;">
<a class="" href="http://forum.doozan.com/read.php?3,16148" style="color: #355f35;" title="">[How To] Set U-Boot envs for USB booting with Kirkwood plugs</a></h4>
</div>
<div>
</div>
Qui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.com318tag:blogger.com,1999:blog-1622307871085727432.post-85567050252514426532013-07-14T17:46:00.002-07:002013-10-08T17:13:05.703-07:00DIY AirPlay Speaker System using a Asus WL-520gu Router<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEharpdFX-u3sTdrp90kGKyrJiInyVvFjsHuuIE6pZU9tDwOogkvwTr7sB48_wNGxeRCSXCMJLw3dL2OH60Jo4WpeBnBsCQ3vdYcHGSN3spErBxCkodkV0MFSwKDeIc0E2SyXjrP6x79vpow/s1600/QUI_5336-001.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEharpdFX-u3sTdrp90kGKyrJiInyVvFjsHuuIE6pZU9tDwOogkvwTr7sB48_wNGxeRCSXCMJLw3dL2OH60Jo4WpeBnBsCQ3vdYcHGSN3spErBxCkodkV0MFSwKDeIc0E2SyXjrP6x79vpow/s640/QUI_5336-001.JPG" width="640" /></a></div>
<br />
<br />
In this tutorial, I'm going to show you how to re-purpose a Asus WL-520gu router into an Apple AirPlay Speaker System. I have a custom built OpenWRT image already fully configured with AirPlay so all you have to do is flash and go.<br />
<div>
<br /></div>
<div>
Major kudos to the Wifi Radio project on <a href="http://mightyohm.com/blog/2008/10/building-a-wifi-radio-part-1-introduction/" target="_blank">MightyOhm.com</a> which introduced me to OpenWRT and a major inspiration for this project.</div>
<div>
<br /></div>
<div>
<b>Requirements</b></div>
<div>
<br /></div>
<div>
- Asus WL-520gu Router (Stock Firmware, Tomato, DD-WRT or OpenWRT)</div>
<div>
- Compatible USB Sound Card (USD DAC - Digital Audio Converter). See below.</div>
<div>
- Speakers/Stereo System (or Headphones).</div>
<div>
<br />
<b>Flashing the OpenWRT AirPlay Firmware</b><br />
<br /></div>
<div>
Download my OpenWRT image pre-configured with AirPlay (aka ShairPort). Note that this firmware is specifically designed for the Asus WL-520gu router. If you use this firmware on any other router, you will brick it.</div>
<div>
<a href="http://goo.gl/MNkAm" target="_blank">openwrt-brcm47xx-squashfs.trx</a></div>
<div>
<br /></div>
<div>
If you are already running Tomato, DD-WRT or OpenWRT (with Luci) on your router, you can flash directly from the web interface.</div>
<div>
<br /></div>
<div>
If you are running OpenWRT without a web interface, here are the commands to flash via command line:</div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cd tmp</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">wget <a href="http://goo.gl/MNkAm">http://goo.gl/MNkAm</a></span><br />
<span style="font-family: Courier New, Courier, monospace;">mv MNkAm openwrt-brcm47xx-squashfs.trx</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">mtd -r write openwrt-brcm47xx-squashfs.trx linux</span></div>
<div>
<br /></div>
<div>
Otherwise if you are running the Asus stock firmware or need to recover from a bad flash, follow these instructions - <a href="http://blinkthinks.wordpress.com/2009/03/17/asus-wl-520ug-loving-tomato-firmware/" target="_blank">Asus WL-520UG: Loving Tomato Firmware</a>. Obviously, flash with the OpenWRT AirPlay image above.</div>
<div>
<br />
<b>Enjoy some Music</b><br />
<br />
Plug in your USB Sound Card to the router and connect it to your speakers. Then power cycle the router.<br />
<br />
On your iOS device, connect to the open/unencrypted 'AirPlay520gu' wireless network.<br />
<br />
Important Note: Wireless is enabled by default within the image. However, the router requires one extra reboot after being flashed before wireless will start properly (Don't ask me why, I don't know). So basically, if you don't see the 'AirPlay520gu' wireless network, give the router a reboot/power cycle.<br />
<br />
You should now be able to AirPlay music from your iOS device to the 'AirPlay520gu' AirPlay Speakers.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsNRekGKEFOzMzwXtX2Ot5xrmH0lVFSBOw9KdaUwcRKBdALgwYpaJNltWyD6-tJN9Q2N6tD3DIe4TDwVHSivLdO3q9g-bjO1cljooeInKjL7yRmfpIIKxPAzOCnv_tWcK5UXPQh8A-iLwz/s1600/AirPlay520gu.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsNRekGKEFOzMzwXtX2Ot5xrmH0lVFSBOw9KdaUwcRKBdALgwYpaJNltWyD6-tJN9Q2N6tD3DIe4TDwVHSivLdO3q9g-bjO1cljooeInKjL7yRmfpIIKxPAzOCnv_tWcK5UXPQh8A-iLwz/s400/AirPlay520gu.jpg" width="225" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">iOS 7 Beta - AirPlay to WL-520gu router from iTunes Radio</td></tr>
</tbody></table>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<b>Different Modes and Use Cases</b><br />
<br />
<u>Standalone Mode</u> (Default, no configuration needed) - Broadcast unencrypted/open SSID of "AirPlay520gu". DHCP Server enabled with no default route or DNS server to allow iPhone to maintain connection to LTE/4G network for internet radio streaming.<br />
<br />
<u>Wireless Client Mode</u> - Connects to existing wireless network similar to how your iphone/ipad connects to your network. This is how most commercial AirPlay Speaker System work. HowTo: Switch to 'STA' mode<br />
<br />
<u>AP (Access Point) Mode</u> - Connects to existing network via a wired Ethernet cable (or <a href="http://www.amazon.com/gp/bestsellers/electronics/1194444/?tag=blogqnologyco-20" target="_blank">Ethernet over Powerline</a>). Broadcast additional SSID to extend your wireless network coverage - add AirPlay and get better wireless coverage too! HowTo: Disable DHCP, change IP Address, Set SSID/Encryption type</div>
<div>
<br /></div>
<div>
Check the <a href="https://forum.openwrt.org/">OpenWRT forums</a> or <a href="http://wiki.openwrt.org/doc/uci/wireless" target="_blank">Wiki</a> for help on re-configuring your new AirPlay router!<br />
<br /></div>
<div>
<b>Compatible/Recommended USB Sound Cards (Plug and Play)</b><br />
<ul>
<li><a href="http://www.amazon.com/dp/B001MSS6CS/?tag=blogqnologyco-20" style="font-family: inherit;" target="_blank">Syba SD-CM-UAUD USB Stereo Audio Adapter</a></li>
<li><a href="http://www.amazon.com/dp/B00C0P8XQQ/?tag=blogqnologyco-20" style="font-family: inherit;" target="_blank">ELE EL-D01 MINI HIFI USB PCM2704 DAC</a><span style="font-family: inherit;"> (This is what I'm using personally)</span></li>
<li><a href="http://www.amazon.com/dp/B000KW2YEI/?tag=blogqnologyco-20" style="font-family: inherit;" target="_blank">Behringer UCA202 Audio Interface</a></li>
<li><a href="http://www.amazon.com/dp/B0070UFMOW/?tag=blogqnologyco-20" target="_blank">Fiio E17 USB DAC Headphone Amplifier</a></li>
</ul>
Some additional USB DACs that I haven't tested personally, but should also work:<br />
<ul>
<li><a href="http://www.amazon.com/dp/B0036VO4X4/?tag=blogqnologyco-20" target="_blank">Turtle Beach Audio Advantage Micro II USB Analog & Digital Audio Adapter</a></li>
<li><a href="http://www.amazon.com/dp/B00882U782/?tag=blogqnologyco-20" target="_blank">AUDIOQUEST - DRAGONFLY USB DAC</a></li>
<li><a href="http://www.amazon.com/dp/B005D7SKWK/?tag=blogqnologyco-20" target="_blank">Topping TP30 Class T Digital Mini Amplifier with USB-DAC</a></li>
<li><a href="http://www.amazon.com/dp/B003Y5FRNS/?tag=blogqnologyco-20" target="_blank">Nuforce ICON-UDAC2-BLACK Headphone Amplifier and USB DAC</a></li>
</ul>
Note: The cheap "3D Sound" USB audio adapter may work, but there is at least two versions - one that works (C-Media chipset) and one that doesn't (6911 Chipset, JMTek, LLC 48Khz Only). My recommendation is to avoid them unless you're 100% positive you'll get the one with the C-Media chipset or to keep things simple, pick up the <a href="http://www.amazon.com/dp/B001MSS6CS/?tag=blogqnologyco-20" target="_blank">Syba SD-CM-UAUD USB Stereo Audio Adapter</a> if you're on a tight budget or prefer the form factor.<br />
<br />
<div>
<b>DIY AirPlay Sound System for under $100</b></div>
<div>
<br />
A great sounding AirPlay speaker system can easily be put together on a very limited budget and blow away anything sold at the Apple Store costing twice or three times as much. As an example, a <a href="http://www.amazon.com/dp/B0049P6OTI/?tag=blogqnologyco-20" target="_blank">LP-2020A+ Lepai Tripath Amplifier</a> paired with the <a href="http://www.amazon.com/dp/B002RMPHMU/?tag=blogqnologyco-20" target="_blank">Dayton Audio B652</a> bookshelf speakers will give you awesome sound on a tight budget.<br />
<br />
<a href="http://www.amazon.com/dp/B001MSS6CS/?tag=blogqnologyco-20" target="_blank">Syba USB Audio Adapter</a> - $7<br />
<a href="http://www.amazon.com/dp/B0049P6OTI/?tag=blogqnologyco-20" target="_blank">Lepai 2020A+ Amp</a> - $23<br />
<a href="http://www.amazon.com/dp/B002RMPHMU/?tag=blogqnologyco-20" target="_blank">Dayton Audio B652 Bookshelf Speakers</a> - $52<br />
<br />
Total cost $82 + router<br />
<br />
<b>What if I don't have a Asus WL-520GU Router?</b><br />
<b><br /></b>
<span style="font-family: inherit;">Definitely do not buy one (unless you can get it super cheap, ~$10). This router has really dated hardware and is no longer manufactured.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">Instead consider picking up a TomatoUSB compatible router or Pogoplug and following my other DIY AirPlay tutorials:</span></div>
<div>
<span style="font-family: inherit;"><br /><a href="http://blog.qnology.com/2012/12/tutorial-apple-airplay-on-tomatousb.html">[Tutorial] Apple AirPlay on TomatoUSB Router</a></span></div>
<div>
<a href="http://blog.qnology.com/2013/03/tutorial-pogoplug-e02-with-arch-linux.html" style="font-family: inherit;">[Tutorial] - Pogoplug E02/V4 with Arch Linux ARM</a><br />
<span style="font-family: inherit;"><br /></span>Another option would be my <a href="http://airenabler.qnology.com/" style="font-family: inherit;" target="_blank"><b>Apple AirPlay AirEnabler Adapter Kit</b></a>, which is a totally plug and play solution that allows you to add Apple AirPlay to any existing home stereo, car stereo, pc speaker system, <a href="http://macgyverisms.wonderhowto.com/how-to/turn-any-ammo-box-into-awesome-set-portable-speakers-0139698/" style="orphans: 2; text-align: -webkit-auto; widows: 2;" target="_blank">ammo box portable speaker system</a><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">, </span><a href="http://www.addictronics.com/stereo_cooler.php" style="orphans: 2; text-align: -webkit-auto; widows: 2;" target="_blank">stereo cooler</a><span style="orphans: 2; text-align: -webkit-auto; widows: 2;"> or my favorite the </span><a href="https://www.facebook.com/theboominator" style="orphans: 2; text-align: -webkit-auto; widows: 2;" target="_blank">Boominator</a><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">, "the ultimate party machine".</span></div>
</div>
Qui Honghttp://www.blogger.com/profile/01067911447249645259noreply@blogger.com62tag:blogger.com,1999:blog-1622307871085727432.post-14763559400475489302013-03-29T22:31:00.000-07:002013-04-18T10:44:00.745-07:00[Tutorial] CentOS 6 OpenVPN Client - Connecting to Existing Site to Site VPN (TomatoUSB)<div>
<span style="font-family: inherit;">In this tutorial, I'm going to show you how to add a CentOS 6 server as a OpenVPN client to your existing Site to Site VPN.</span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<div>
<span style="font-family: inherit;">This is an extension of my<b><a href="http://blog.qnology.com/2013/02/tutorial-30-minutes-or-less-site-to.html" target="_blank"> </a></b></span><span style="font-family: inherit;"><b><a href="http://blog.qnology.com/2013/02/tutorial-30-minutes-or-less-site-to.html" target="_blank">[Tutorial - 30 Minutes or Less] Site to Site VPN with TomatoUSB and OpenVPN</a> </b></span>and assumes you already have your Site to Site VPN operational. However, you should be able to follow this tutorial and connect to any existing OpenVPN Server.</div>
<div>
<br /></div>
<div>
At the end of this tutorial, your CentOS server will be able to securely access your LAN resources (i.e, computers, printers) on both sites and vice versa (you will also be able to seamlessly access your CentOS server).</div>
<div>
<br /></div>
<div>
<span style="font-family: inherit;"><b>Overview of the Steps:</b></span></div>
<div>
<span style="font-family: inherit;"><b><br /></b></span></div>
<div>
<span style="font-family: inherit;"><b>1) Generate Certs and Keys</b></span></div>
<div>
<span style="font-family: inherit;"><b>2) Copy/Transfer over Certs and Keys to Client VPS</b></span></div>
<div>
<span style="font-family: inherit;"><b>3) Install OpenVPN (client)</b></span></div>
<div>
<span style="font-family: inherit;"><b>4) Configure OpenVPN Client</b></span></div>
<div>
<span style="font-family: inherit;"><b>5) Connect</b></span><span style="font-family: inherit;"><br /></span><br />
<span style="font-family: inherit;"><br /></span></div>
<div>
<span style="font-family: inherit;"><b>Generate cert/keys for VPS (CentOS 6 32-bit OpenVPN Client)</b></span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<div>
<span style="font-family: inherit;">SSH into your TomatoUSB OpenVPN Server.</span><br />
<span style="font-family: inherit;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Setup and initialize environment<br /> cd /opt/openvpn-easy-rsa<br />source ./vars</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#myvps_client is the Common Name<br />./build-key myvps_client</span><br />
<b><br /></b>
<b>Copy/Transfer over Certs and Keys to Client VPS</b><span style="font-family: inherit;"><br /></span><span style="font-family: inherit;"><br />Since my CentOS server is running SSH, I'm going to use SSH and SCP (secure copy) to transfer over the certificates and key. You can also transfer over the keys via SFTP or a USB drive.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#create the /etc/openvpn/keys folder on my centos server<br />ssh root@myvps.qnology.com mkdir -p /etc/openvpn/keys </span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#copy over the certificates and keys</span><br />
<span style="font-family: Courier New, Courier, monospace;">#all one line</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">cd /opt/openvpn-easy-rsa</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">scp keys/ca.crt keys/myvps_client.crt keys/myvps_client.key root@myvps.qnology.com:/etc/openvpn/keys</span></div>
<div>
<br /></div>
<div>
<b>Install OpenVPN on CentOS 6</b></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><b><br /></b>#Bring everything up to date<br />yum -y update</span><br />
<span style="font-family: Courier New, Courier, monospace;">#Add EPEL (Extra Packages for Enterprise Linux) Repo
<br /># RHEL/CentOS 6 32-Bit ##<br />cd /tmp </span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
</span><span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;">yum --enablerepo=epel install openvpn.i686</span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<div>
<b>Configure OpenVPN Client</b></div>
<div>
<b style="font-family: inherit;"><br /></b><span style="font-family: Courier New, Courier, monospace;">#copy sample client.conf to /etc/openvpn<br />cp /usr/share/doc/openvpn-2.2.2/sample-config-files/client.conf /etc/openvpn
</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#edit openvpn client.conf</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">nano /etc/openvpn/client.conf</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Update the following lines<br />#remote OpenVPNServer.ADynamicDNSAddress.com 1194<br />#ca /etc/openvpn/keys/ca.crt<br />#cert /etc/openvpn/keys/myvps_client.crt<br />#key /etc/openvpn/keys/myvps_client.key<br /><br />#start VPN manually to test<br />openvpn --config /etc/openvpn/client.conf</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#test starting VPN as a service</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">service openvpn start</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#autostart at OpenvPN client on reboot</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">chkconfig openvpn on</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
Qui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.com89tag:blogger.com,1999:blog-1622307871085727432.post-41245103645676457032013-03-29T17:40:00.002-07:002015-08-30T19:29:31.382-07:00[Tutorial] - Pogoplug E02/V4 with Arch Linux ARM - NAS (SAMBA), AirPlay, AirPrint, Google CloudPrint, SqueezeBox (Logitech Media Server), SqueezeLite, Plex Media Server<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDoBhmEvXrgnumMOo8Lxf_hpcALH-KsppycIc3a1-jK4raR8XS7QFQ88soLhnTXNMf_yGXbJS7cU02xOuVcTLWd5_lH0tj6idCZgfNclbVVMvSKC1j8IlqlfGRESeNLZEDhTJKAU_lUkIt/s1600/Pogoplugs.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDoBhmEvXrgnumMOo8Lxf_hpcALH-KsppycIc3a1-jK4raR8XS7QFQ88soLhnTXNMf_yGXbJS7cU02xOuVcTLWd5_lH0tj6idCZgfNclbVVMvSKC1j8IlqlfGRESeNLZEDhTJKAU_lUkIt/s640/Pogoplugs.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Pogoplugs sporting 1TB USB HDs, USB DACs and USB Wifi</td></tr>
</tbody></table>
<br />
In this tutorial I'm going to show you how to setup the following on a Pogoplug running Arch Linux ARM (aka ALARM for short).<br />
<br />
SAMBA (NAS)<br />
- enable swapfile<br />
Apple AirPlay<br />
SqueezeLite Player (Logitech Media Server/SqueezeBox Client)<br />
SqueezeBox (Logitech Media Server)<br />
Plex Media Server<br />
Apple AirPrint<br />
Google CloudPrint<br />
Re-install my.pogoplug.com service<br />
Enable uPNP/DNLA (my.pogoplug.com)<br />
Wireless Configuration<br />
Motion Webcam<br />
BitTorrent Sync<br />
<span style="font-family: inherit;">Transmission, Sabnzbd, SickBeard and CouchPotato</span><br />
<span style="font-family: inherit;">Sonarr (aka NZBDrone)</span><br />
OpenVPN (client)<br />
Webmin<br />
Mongoose (Simple Web Server)<br />
OwnCloud (nginx php-fpm sqlite)<br />
Backup and Restore ALARM<br />
<br />
<b>Requirements:</b><br />
<ul>
<li>A compatible Pogoplug Device</li>
<ul>
<li><a href="http://www.amazon.com/dp/B0044CL1N0/?tag=blogqnologyco-20" style="font-family: inherit;" target="_blank">PogoPlug E02G (v2 Gray)</a></li>
<li><a href="http://www.amazon.com/dp/B0033WSDR4/?tag=blogqnologyco-20" style="font-family: inherit;" target="_blank">PogoPlug E02 (v2 Pink)</a> or Black</li>
<li><a href="http://www.amazon.com/dp/B006I5MKZY/?tag=blogqnologyco-20" target="_blank">PogoPlug Series 4 (POGO-V4-A3-01)</a></li>
<li><a href="http://www.amazon.com/dp/B005GM1Q1O/?tag=blogqnologyco-20" style="font-family: inherit;" target="_blank">PogoPlug Mobile (POGO-V4-A1-01)</a> - <a href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=9&pub=5575059262&toolid=10001&campid=5337506712&customid=&icep_uq=pogoplug+mobile&icep_sellerId=&icep_ex_kw=&icep_sortBy=12&icep_catId=&icep_minPrice=5&icep_maxPrice=10&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=lg" target="_blank">Less than $7.50 on Ebay right now (7/11/2014</a>)</li>
</ul>
<li>USB DAC/Sound/Audio Card (AirPlay and SqueezeLite)</li>
<ul>
<li><a href="http://www.amazon.com/dp/B00C0P8XQQ/?tag=blogqnologyco-20" style="font-family: inherit;">ELE EL-D01 MINI HIFI USB PCM2704 DAC</a></li>
<li><a href="http://www.amazon.com/dp/B000KW2YEI/?tag=blogqnologyco-20" style="font-family: inherit;">Behringer UCA202 Audio Interface</a></li>
<li><a href="http://www.amazon.com/dp/B0070UFMOW/?tag=blogqnologyco-20" target="_blank">Fiio E17 USB DAC Headphone Amplifier</a></li>
</ul>
<div>
<ul>
<li><a href="http://www.amazon.com/dp/B0036VO4X4/?tag=blogqnologyco-20" target="_blank">Turtle Beach Audio Advantage Micro II USB Analog & Digital Audio Adapter</a></li>
<li><a href="http://www.amazon.com/dp/B00882U782/?tag=blogqnologyco-20" target="_blank">AUDIOQUEST - DRAGONFLY USB DAC</a></li>
</ul>
</div>
<li>A USB Flash Drive (>2GB) and/or USB Hard Drive</li>
<ul>
<li style="margin: 0px 0px 0.25em; padding: 0px;"><a href="http://www.amazon.com/dp/B00LLER2CS/?tag=blogqnologyco-20" target="_blank">SanDisk Ultra Fit USB 3.0 Low-Profile Flash Drive</a></li>
<li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="color: black;"><a href="http://www.amazon.com/dp/B005FYNSUA/?tag=blogqnologyco-20" target="_blank">SanDisk Cruzer Fit 8GB Flash Drive</a></span></li>
<li style="margin: 0px 0px 0.25em; padding: 0px;"><a href="http://www.amazon.com/dp/B00H4XH5FY/?tag=blogqnologyco-20" target="_blank">Seagate Backup Plus 2TB Portable External Hard Drive USB 3.0 </a></li>
<li><a href="http://www.amazon.com/dp/B00829THO6/?tag=blogqnologyco-20" target="_blank">Seagate Backup Plus 1 TB USB 3.0 Portable Hard Drive (USM Slot)</a></li>
<li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="color: black;"><a href="http://www.amazon.com/dp/B00E055H5O/?tag=blogqnologyco-20" target="_blank">WD My Passport Ultra 2TB Portable External Hard Drive USB 3.0</a></span></li>
</ul>
</ul>
<span style="font-family: inherit;"><b><br /></b></span>
<br />
<div>
Want to take a small gamble? Pick up the <a href="http://www.amazon.com/dp/B005FNDJHS/?tag=blogqnologyco-20" target="_blank">Pogoplug P21 or P22 (Black) </a>or <a href="http://www.amazon.com/dp/B004TDY924/?tag=blogqnologyco-20" target="_blank">Pogoplug B01 (Pink)</a>. Even though the box is labeled as a P21/P22/B01, chances are the Pogoplug itself will be a E02 model. I've bought at least 6 P21/B01 from various vendors - Adorama, JR.com, and Ebay - and so far I have only received E02. Note that recently a small percentage of users (~20-30%) have reported receiving a new P22 model which isn't supported under Arch Linux ARM.<br />
<br />
<a href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=9&pub=5575059262&toolid=10001&campid=5337506712&customid=&icep_uq=Pogoplug+E02&icep_sellerId=&icep_ex_kw=&icep_sortBy=12&icep_catId=&icep_minPrice=&icep_maxPrice=&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=lg" target="_blank">Ebay is another good source for the Pogoplug E02.</a><br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYHXOOk4bC9_bvhRu71CxeFd__ydXXcePFvKlD8HsUGSvMSWNRC2GHMqvEx5QWuN-tDHzb9gBIiHgmF2w_LP5OnusL2JiVx8PnXrh2InV7FOvRZIue6TjugAtHinfjrbSZ4KIHo33Vjv3M/s1600/P21ontheoutsideE02ontheinside.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYHXOOk4bC9_bvhRu71CxeFd__ydXXcePFvKlD8HsUGSvMSWNRC2GHMqvEx5QWuN-tDHzb9gBIiHgmF2w_LP5OnusL2JiVx8PnXrh2InV7FOvRZIue6TjugAtHinfjrbSZ4KIHo33Vjv3M/s400/P21ontheoutsideE02ontheinside.PNG" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Check the bottom of the Pogoplug to confirm Model number. Ignore the Model number listed on the box.</td></tr>
</tbody></table>
<br />
The E02 model is the ideal choice with 256MB RAM and a 1.2Ghz CPU versus other models (Series 4) which only has 128MB RAM and 800Mhz CPU. Don't get fooled by the USB 3.0 Ports in the Series 4 model; the CPU is a bottleneck and there is no performance difference with the USB 3.0 ports. Saying that, I like the Pogoplug Series 4 form factor with its SATA USM slot. For the Pogoplug Series 4, I would recommend the USM slot compatible <a href="http://www.amazon.com/dp/B00829THO6/?tag=blogqnologyco-20" target="_blank">Seagate Backup Plus 1 TB USB 3.0 Portable Hard Drive</a>.<br />
<br />
<div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZRh-DhUjBYrDTIM_IILVIMKp75lRT-X5grdXiHy0U0ZPF_iMVoLWC0xoG_1HHPPLWNpdnQxqVD5ZxP-ki2VGgjndB7U1_LGQY83wTRhXqsyn30e4-75RQdV045Lk3K1LXPoEfSrQLKzYu/s1600/series4.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZRh-DhUjBYrDTIM_IILVIMKp75lRT-X5grdXiHy0U0ZPF_iMVoLWC0xoG_1HHPPLWNpdnQxqVD5ZxP-ki2VGgjndB7U1_LGQY83wTRhXqsyn30e4-75RQdV045Lk3K1LXPoEfSrQLKzYu/s320/series4.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Pogoplug Series 4 with (USM Compatible) Seagate Backup Plus 1TB USB 3.0 Portable HD</td></tr>
</tbody></table>
<br /></div>
This will be a work in progress, so please excuse the typos and grammar. Arch Linux ARM is constantly changing, so not everything is guaranteed to work.<br />
<br />
Note/FAQ Troubleshooting:<br />
- Watch out for run-on commands. I'm having issues with the blogger editor.<br />
- For bootup issues, see Troubleshooting ALARM Boot Up Issues near the end.<br />
<br />
Assumptions:<br />
- Pogoplug is installed behind a Router/Firewall on a secured LAN (home use only)<br />
- The Pogoplug is new and hasn't been registered on my.pogoplug.com. If it was, you may need to enable SSH via my.pogoplug.com. Activation is required for the Pogoplug Mobile/Series 4.<br />
<br />
If you only want to setup a simple NAS and/or have a unsupported Pogoplug version V3 (oxnas), please take a look at my <a href="http://blog.qnology.com/2013/11/how-to-install-optware-and-samba-on.html" target="_blank">Optware Tutorial</a>.<br />
<br />
Last Updated: 08/18/2015<br />
<br />
Note that with OpenSSH 7.0, SSH root login is disabled. Please try alarm/alarm instead. Switch to root by using the "su" command and password of "root".<br />
<br />
<b><span style="font-size: large;">Official Arch Linux ARM Installation Instructions:</span></b><br />
<b><span style="font-size: large;"><br /></span></b>
Official Instructions for installing Arch Linux on the Pogoplug E02 can be found here:<br />
<span style="color: black;"><a href="http://archlinuxarm.org/platforms/armv5/pogoplug-v2-pinkgray#qt-platform_tabs-ui-tabs2" target="_blank">http://archlinuxarm.org/platforms/armv5/pogoplug-v2-pinkgray#qt-platform_tabs-ui-tabs2</a></span><br />
<br />
Note that the uBoot installation instructions from archlinuxarm.org does not support booting into the default Pogoplug OS when nothing is attached. My summarized version below uses a different uBoot and will allow you to boot into the default Pogoplug OS when nothing is attached which is very useful for reinstallation.<br />
<br />
For the Pogoplug Series 4 and Mobile, please use this tutorial for the latest uBoot (SD Card booting support) and then come back here to complete the installation.<br />
<u>http://blog.qnology.com/2014/07/hacking-pogoplug-v4-series-4-and-mobile.html</u><br />
<u><br /></u>
<br />
<b><span style="font-size: large;">Pogoplug E02 Arch Linux ARM Installation Instructions (Summarized Version)</span></b><br />
<br />
Note: If you get a command not found for "wget" or "reboot", try adding "busybox" in front of the command - "busybox wget http://xxx", "busybox shutdown"<br />
<br />
<span style="font-family: inherit;">Plug in the Pogoplug without any USB drive attached<br />SSH into Pogoplug<br />Log in as root/ceadmin. </span><br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">#Stop the Pogoplug software</span><br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">killall hbwd</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Install UBoot</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cd /tmp</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget </span><a href="http://jeff.doozan.com/debian/uboot/install_uboot_mtd0.sh" style="font-family: 'Courier New', Courier, monospace;">http://jeff.doozan.com/debian/uboot/install_uboot_mtd0.sh</a><br />
<span style="font-family: Courier New, Courier, monospace;">chmod +x install_uboot_mtd0.sh</span><br />
<span style="font-family: Courier New, Courier, monospace;">./install_uboot_mtd0.sh</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Would you like to disable the Pogoplug services? [Y/n]</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#n - to keep original Pogoplug software </span><br />
<span style="font-family: Courier New, Courier, monospace;">#when booting without USB drives attached</span><br />
<span style="font-family: Courier New, Courier, monospace;">#y - if you're not planning on ever using the stock</span><br />
<span style="font-family: Courier New, Courier, monospace;">#Pogoplug software again</span></div>
<br />
<span style="font-family: 'Courier New', Courier, monospace;">#Plug in USB Flash Drive or Hard Drive</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Use the back bottom USB port</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
If you plan to setup the Pogoplug as NAS using SAMBA with a hard drive, my recommendation would be to install ALARM directly on the hard drive and skip using a USB flash drive. This will avoid some potential boot up issues. To do this, create two partition, a small 4GB partition for ALARM and the rest for data.<br />
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Partition your USB flash/hard drive</span><br />
<span style="font-family: Courier New, Courier, monospace;">/sbin/fdisk /dev/sda</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;"># Type in the following commands </span><span style="font-family: 'Courier New', Courier, monospace;">to erase</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"># and re-partition USB </span><span style="font-family: 'Courier New', Courier, monospace;">flash/hard drive </span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#(</span><span style="font-family: Courier New, Courier, monospace;"><span style="color: red;">WARNING - FLASH/HARD DRIVE WILL BE COMPLETELY WIPED</span>): </span><br />
<span style="font-family: 'Courier New', Courier, monospace;"># </span><br />
<span style="font-family: Courier New, Courier, monospace;"># p # list current partitions</span><br />
<span style="font-family: Courier New, Courier, monospace;"># o # to delete all partitions</span><br />
<span style="font-family: Courier New, Courier, monospace;"># n # new partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># p # primary partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># 1 (one) # first partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <enter> # default start block</span><br />
<span style="font-family: Courier New, Courier, monospace;"># <enter> # default end block (to use the whole drive)</span><br />
<span style="font-family: Courier New, Courier, monospace;"># If you're using a hard drive, </span><span style="font-family: 'Courier New', Courier, monospace;">create a small</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"># 4GB partition instead of using the whole drive,</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"># leaving the rest for a data partition</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"># +4G # to create a 4GB partition</span><br />
<span style="font-family: Courier New, Courier, monospace;"># w # write new partition to disk</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />#Format USB Flash Drive<br />cd /tmp</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget http://archlinuxarm.org/os/pogoplug/mke2fs</span><br />
<span style="font-family: Courier New, Courier, monospace;">chmod 755 mke2fs</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#format and label partition</span><br />
<span style="font-family: Courier New, Courier, monospace;">./mke2fs -L ROOTFS -j /dev/sda1</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#mount usb flash drive</span><br />
<span style="font-family: Courier New, Courier, monospace;">mkdir -p /tmp/usb</span><br />
<span style="font-family: Courier New, Courier, monospace;">mount /dev/sda1 /tmp/usb</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />#Download Arch Linux ARM (aka ALARM)</span><br />
<span style="font-family: Courier New, Courier, monospace;">#and extract to USB Drive:</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">cd /tmp/usb</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget <a href="http://archlinuxarm.org/os/ArchLinuxARM-kirkwood-latest.tar.gz">http://archlinuxarm.org/os/ArchLinuxARM-kirkwood-latest.tar.gz</a><br />tar -xzvf ArchLinuxARM-kirkwood-*.tar.gz</span>
<span style="font-family: Courier New, Courier, monospace;">#Unmount USB Drive and reboot</span><br />
<span style="font-family: Courier New, Courier, monospace;">rm ArchLinuxARM-</span><span style="font-family: 'Courier New', Courier, monospace;">kirkwood</span><span style="font-family: Courier New, Courier, monospace;">-*.tar.gz</span><br />
<span style="font-family: Courier New, Courier, monospace;">sync </span><span style="font-family: 'Courier New', Courier, monospace;"># Takes a while when using a flash drive</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd ..</span><br />
<span style="font-family: Courier New, Courier, monospace;">umount /tmp/usb</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Update uboot env variables</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#Have uboot mount partition as ext3 </span><br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">#safer in power outages</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#E02 only, V4 defaults to ext3 already</span><br />
<span style="font-family: Courier New, Courier, monospace;">/usr/sbin/fw_setenv usb_rootfstype ext3</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Correct machid - make LED Green versus Orange</span><br />
<span style="font-family: Courier New, Courier, monospace;">#Only for E02</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">/usr/sbin/</span><span style="font-family: Courier New, Courier, monospace;">fw_setenv machid dd6</span></div>
<div>
<br /></div>
<span style="font-family: Courier New, Courier, monospace;">reboot</span><br />
<br />
<span style="font-family: inherit;">Note that after the reboot, the IP Address of your Pogoplug may have changed. However, you should be able to ping it by name - "ping alarm". Otherwise double check your router or use a IP scanning tool like <a href="http://sourceforge.net/projects/ipscan/files/ipscan2-binary/2.21/ipscan221.exe" target="_blank">AngryIP (Legacy) </a>to confirm the IP Address of your Pogoplug.<br /><br />SSH back into your Pogoplug and login with the username and password of root/root. If root/root doesn't work, please try alarm/alarm. If you're using putty and still having issues, make sure to download the latest version. </span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">Success? Congratulations! At this point, Arch Linux is now running on your Pogoplug.</span><br />
<span style="font-family: inherit;"><br /></span>
<b><span style="font-family: inherit; font-size: large;">Initial Arch Linux ARM Configuration and Package Installation</span></b><br />
<br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Switch to root, password root</span><br />
<span style="font-family: Courier New, Courier, monospace;">su</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Upgrade kernel and install some initial packages</span><br />
<span style="font-family: Courier New, Courier, monospace;">#Hit Enter when prompted with "<span style="white-space: pre-wrap;">Enter a selection (default=all):"</span></span><br />
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;">#'Y' when prompted with </span><span style="white-space: pre-wrap;">linux-kirkwood and linux are in conflict.</span></span><br />
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;">#Remove linux? [y/N]</span></span><br />
<span style="font-family: Courier New, Courier, monospace;"><span style="white-space: pre-wrap;">#Go get some coffee</span></span><br />
<span style="font-family: Courier New, Courier, monospace;">pacman -Syu linux-kirkwood linux-kirkwood-headers </span><span style="font-family: 'Courier New', Courier, monospace;">ntp base-devel nano wget rsync</span><br />
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#list timezone</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">timedatectl list-timezones</span><span style="font-family: Courier New, Courier, monospace;"><br /><br />#set timezone<br />timedatectl set-timezone America/Los_Angeles<br /><br />#autostart ntp </span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#pogoplug has no hardware clock</span><span style="font-family: Courier New, Courier, monospace;"><br />systemctl enable ntpd</span><br />
<span style="font-family: Courier New, Courier, monospace;">systemctl start ntpd<br /><br />#Generate New OpenSSH Keys<br />rm /etc/ssh/ssh_host*<br />ssh-keygen -A<br /><br />reboot</span></div>
<div>
<br />
<br />
<b><span style="font-size: large;">SAMBA Server - Setup your Pogoplug as a Network Attached Storage (NAS)</span></b><br />
<br />
The Pogoplug makes an excellent NAS. Expect read/write performance between 23MB-28MB/s on a <u>wired gigabit network</u> using ext3/ext4. If you are using a 10/100Mb network, expect a maximum transfer rate of 9-10MB/s, which is the limit of 10/100Mb network. Wireless will be slower. Using NTFS partition will also affect performance (don't use it).<br />
<br />
If you plan to setup the Pogoplug as NAS using SAMBA with a hard drive, my recommendation would be to install ALARM directly on the hard drive and skip using a USB flash drive. This will avoid some potential boot up issues. To do this, create two partition, a small 4GB partition for ALARM and the rest for data.<br />
<br />
The instructions below assumes you have ALARM installed on the first partition of your USB hard drive. Replace "/dev/sda2" (second partition on first hd) with "/dev/sdb1" (first partition second hard drive) if you have ALARM installed on a USB Flash Drive and adding a new USB Hard Drive for SAMBA.<br />
<br />
Note that these instructions are only applicable to 2TB drives or less. If you have a 3TB drive, you need to use gdisk to setup a hybrid MBR, which is not covered in this tutorial.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgooeMrCGNIQbDt9bHbUI3D6vM2nKvQyylNfebRDnZo7wY3k2R0vlJt523sdpTLA-XH_YpsQixTelNqzuxQc9jVg-z8PN73_68-09o70HiYy0pPjoZsxm1QbabABXoTIq3q6BAqe_htHkO6/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgooeMrCGNIQbDt9bHbUI3D6vM2nKvQyylNfebRDnZo7wY3k2R0vlJt523sdpTLA-XH_YpsQixTelNqzuxQc9jVg-z8PN73_68-09o70HiYy0pPjoZsxm1QbabABXoTIq3q6BAqe_htHkO6/s1600/Capture.PNG" /></a></div>
<br />
<br />
<br />
<div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#Create a 2nd Partition on your USB Drive</span><br />
<span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;">/sbin/fdisk /dev/sda</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"># Type in the following commands </span><span style="font-family: 'Courier New', Courier, monospace;">to create a 2nd</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"># partition on your USB</span><span style="font-family: 'Courier New', Courier, monospace;"> hard drive </span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"># </span><span style="font-family: Courier New, Courier, monospace;"><span style="color: red;">WARNING - HARD DRIVE SHOULD NOT CONTAIN ANY DATA, </span></span><br />
<span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;"># </span><span style="font-family: Courier New, Courier, monospace;"><span style="color: red;">EXCEPT ALARM INSTALLATION ON 1st PARTITION</span>: </span><br />
<span style="font-family: 'Courier New', Courier, monospace;"># </span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"># </span><span style="font-family: 'Courier New', Courier, monospace;">p # list current partitions</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;"># n # new partition</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"># p # primary partition</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"># <enter> # default to second partition</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"># <enter> # default start block</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"># <enter> # default end block #use the whole flash drive</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"># w # write new partition to disk</span></div>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#Format newly created 2nd partition, label as USB</span><br />
<span style="font-family: Courier New, Courier, monospace;">#a reboot may be required for new </span><span style="font-family: 'Courier New', Courier, monospace;">partition </span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#to be recognized</span><br />
<span style="font-family: 'Courier New', Courier, monospace; orphans: 2; widows: 2;">mkfs.ext3 -L USB /dev/sda2</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace; orphans: 2; text-align: -webkit-auto; widows: 2;">#mount disk</span></div>
</div>
<div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">mkdir -p /media/usb</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#mount 2nd partition (/dev/sdb1)</span><br />
<span style="font-family: Courier New, Courier, monospace;">
mount /dev/sda2 /media/usb</span></div>
<br />
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#install samba and upgrade everything</span></div>
<span style="font-family: Courier New, Courier, monospace;">pacman -Syu samba</span><br />
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<br /></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#Create folder we'll be sharing</span><br />
<span style="font-family: Courier New, Courier, monospace;">#will also hide the swap and lost+found folder</span><br />
<span style="font-family: Courier New, Courier, monospace;">mkdir -p /media/usb/share</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">#download example smb.conf for public share</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">#no authentication require, everyone has </span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">#read/write access to / (root$) and usb (/media/usb/share)</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">cd /etc/samba</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">wget </span><a href="http://dl.dropbox.com/u/42238/pogoplug/v2/smb.conf" style="font-family: 'Courier New', Courier, monospace;">http://dl.dropbox.com/u/42238/pogoplug/v2/smb.conf</a><span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#Edit smb.conf (optional)</span><br />
<span style="font-family: Courier New, Courier, monospace;">#change name, add additional shares</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#nano /etc/samba/smb.conf</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#mount after reboot</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#all one line</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">echo "LABEL=USB /media/usb ext3 rw,noatime,nofail 0 0" >> /etc/fstab</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: Courier New, Courier, monospace;">#start samba</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">systemctl start smbd nmbd</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#autostart samba on reboot</span><span style="font-family: Courier New, Courier, monospace;"><br />systemctl enable smbd nmbd<br /><br /> #test from computer: </span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#\\pogoplugIPAddress\root$</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">#\\pogoplugIPAddress\usb</span><span style="font-family: Courier New, Courier, monospace;"><br /><br />#reboot and test</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">reboot</span></div>
</div>
<div>
<br />
<b><span style="font-family: inherit;">Enable Swap File</span></b><br />
<span style="font-family: inherit;"><b><br /></b></span>
<span style="font-family: inherit;">Only create a </span>swap file<span style="font-family: inherit;"> if you're using a hard drive. It is not recommended to setup a </span>swap file<span style="font-family: inherit;"> on a USB flash drive as it can wear out and fail.</span><br />
<b><span style="font-family: inherit;"><br /></span></b></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#This will create a 1024MB swap file</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Named "swapfile.img" in /media/usb (USB HD).<br />dd if=/dev/zero of=/media/usb/swapfile.img bs=1M count=1024</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">mkswap /media/usb/swapfile.img</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#update swap file permissions</span><br />
<span style="font-family: Courier New, Courier, monospace;">chmod 0600 /media/usb/swapfile.img</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">#You can now turn the swap file on using:</span></div>
<span style="font-family: Courier New, Courier, monospace;">swapon /media/usb/swapfile.img</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#check if swap is enabled</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">free</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#turn swap off by using:</span><br />
<span style="font-family: Courier New, Courier, monospace;">#swapoff /media/usb/swapfile.img</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#enable swapfile on reboot</span></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">echo "/media/usb/swapfile.img none swap sw,nofail 0 0" >> /etc/fstab</span></span></div>
<br />
<span style="font-family: Courier New, Courier, monospace;">#reboot and test</span><br />
<span style="font-family: Courier New, Courier, monospace;">reboot</span><br />
<span style="font-family: Courier New, Courier, monospace;">free</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<b><span style="font-size: large;">Apple AirPlay (aka Shairport) - Stream music from your iOS Device or iTunes</span></b><br />
<br />
<b>Compatible/Recommended USB Sound Cards (Plug and Play)</b><br />
<ul>
<li><a href="http://www.amazon.com/dp/B00C0P8XQQ/?tag=blogqnologyco-20" style="font-family: inherit;">ELE EL-D01 MINI HIFI USB PCM2704 DAC</a></li>
<li><a href="http://www.amazon.com/dp/B000KW2YEI/?tag=blogqnologyco-20" style="font-family: inherit;">Behringer UCA202 Audio Interface</a></li>
<li><a href="http://www.amazon.com/dp/B0070UFMOW/?tag=blogqnologyco-20" target="_blank">Fiio E17 USB DAC Headphone Amplifier</a></li>
<li><a href="http://www.amazon.com/dp/B0036VO4X4/?tag=blogqnologyco-20" target="_blank">Turtle Beach Audio Advantage Micro II USB Analog & Digital Audio Adapter</a></li>
<li><a href="http://www.amazon.com/dp/B00882U782/?tag=blogqnologyco-20" target="_blank">AUDIOQUEST - DRAGONFLY USB DAC</a></li>
</ul>
<div>
</div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Install some required packages</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">pacman -Sy libao alsa-utils avahi libpulse</span><span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#audio fix<br />echo "use_mmap=no" >> /etc/libao.conf</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<span style="font-family: 'Courier New', Courier, monospace;">#Configure alsa - asound.conf file</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">cd /etc</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">wget </span><a href="https://dl.dropbox.com/u/42238/pogoplug/v2/asound.conf" style="font-family: 'Courier New', Courier, monospace;">https://dl.dropbox.com/u/42238/pogoplug/v2/asound.conf</a><span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
<br /></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">#download pre-compiled version of shairport</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">#compiled 6/26/2014</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">cd /usr/local/bin</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">wget </span><a href="http://dl.dropbox.com/u/42238/pogoplug/v2/shairport" style="font-family: 'Courier New', Courier, monospace;">http://dl.dropbox.com/u/42238/pogoplug/v2/shairport</a><span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br />#make shairport executable</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">chmod a+x shairport</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">
#or compile shairport on your own</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd /tmp</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">wget --no-check-certificate https://github.com/abrasive/shairport/tarball/master</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">tar xzf master</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">cd *shairport*</span><span style="font-family: Courier New, Courier, monospace;"><br />make</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">make install</span><span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#restart dbus</span><br />
<span style="font-family: Courier New, Courier, monospace;">systemctl restart dbus</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#autostart avahi-daemon<br /> systemctl start avahi-daemon<br /> systemctl enable avahi-daemon<br /><br />#start shairport and test<br />shairport -a Living_Room -v</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Test, Control C to stop</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#autostart shairport on reboot</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#edit shairport.service file to update AirPlay name<br />cd /etc/systemd/system</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">wget </span><a href="http://dl.dropbox.com/u/42238/pogoplug/v2/shairport.service"><span style="font-family: Courier New, Courier, monospace;">http://dl.dropbox.com/u/42238/pogoplug/</span>v2/<span style="font-family: 'Courier New', Courier, monospace;">shairport.service</span></a></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br />#start shairport and test</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">systemctl start shairport</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">systemctl status shairport</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#autostart shairport on reboot</span><br />
<span style="font-family: Courier New, Courier, monospace;">systemctl enable shairport</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#reboot and test</span><br />
<span style="font-family: Courier New, Courier, monospace;">reboot</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Schedule ShairPort to restart daily</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#switch editor to nano<br />export EDITOR="/usr/bin/nano"<br /><br />#edit/create crontab<br />crontab -e<br /><br />#paste in the below and exit<br />#restart shairport @ 5AM everyday<br />00 05 * * * /usr/bin/systemctl restart shairport</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#list crontab</span><span style="font-family: Courier New, Courier, monospace;"><br />crontab -l</span><br />
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
</div>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<b><span style="font-family: inherit;">Adjusting the volume</span></b><br />
<b><span style="font-family: inherit;"><br /></span></b>
<span style="font-family: Courier New, Courier, monospace;">#Find name of mixer control</span><br />
<span style="font-family: Courier New, Courier, monospace;">#Typically PCM or Speaker</span><br />
<span style="font-family: Courier New, Courier, monospace;">amixer</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;"></span>
<span style="font-family: Courier New, Courier, monospace;">#Simple mixer control '<span style="background-color: yellow;">PCM</span>',0</span><br />
<span style="font-family: Courier New, Courier, monospace;"># Capabilities: pvolume pswitch pswitch-joined</span><br />
<span style="font-family: Courier New, Courier, monospace;"># Playback channels: Front Left - Front Right</span><br />
<span style="font-family: Courier New, Courier, monospace;"># Limits: Playback 0 - 38</span><br />
<span style="font-family: Courier New, Courier, monospace;"># Mono:</span><br />
<span style="font-family: Courier New, Courier, monospace;"># Front Left: Playback 27 [71%] [-8.26dB] [on]</span><br />
<span style="font-family: Courier New, Courier, monospace;"># Front Right: Playback 27 [71%] [-8.26dB] [on]</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /> #set volume to 90%<br />amixer set <span style="background-color: yellow;">PCM</span> 90%</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#save setting</span><br />
<span style="font-family: Courier New, Courier, monospace;">alsactl store</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Troubleshooting commands</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">lsusb</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">aplay -L<br />cat /proc/asound/card0/pcm0p/sub0/hw_params</span><br />
<div>
<br /></div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<b><span style="font-size: large;">SqueezeLite Player (SqueezeBox/Logitech Media Server Client)</span></b><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">pacman -Sy faad2 libmad mpg123 libao alsa-utils avahi</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#if not already done</span><br />
<span style="font-family: Courier New, Courier, monospace;">#audio fix<br />echo "use_mmap=no" >> /etc/libao.conf</span><br />
<br /></div>
<span style="font-family: 'Courier New', Courier, monospace;">#Configure alsa - asound.conf file</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">cd /etc</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">wget </span><a href="https://dl.dropbox.com/u/42238/pogoplug/v2/asound.conf" style="font-family: 'Courier New', Courier, monospace;">https://dl.dropbox.com/u/42238/pogoplug/v2/asound.conf</a><span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
<div>
<br /></div>
<span style="font-family: Courier New, Courier, monospace;">mkdir -p /usr/local/bin<br />cd /usr/local/bin<br /><br />#download the latest squeezelite version</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">wget </span><span style="font-family: Courier New, Courier, monospace;">http://squeezelite-downloads.googlecode.com/git/squeezelite-armv5te</span><br />
<span style="font-family: Courier New, Courier, monospace;">mv squeezelite-armv5te squeezelite</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#make executable<br />chmod a+x squeezelite<br /><br />#download service file<br />cd /etc/systemd/system<br />wget <a href="http://dl.dropbox.com/u/42238/pogoplug/v2/squeezelite.service">http://dl.dropbox.com/u/42238/pogoplug/v2/squeezelite.service</a><br /><br />#edit name (optional)</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#nano /etc/systemd/system/squeezelite.service</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#start squeezelite and </span><span style="font-family: 'Courier New', Courier, monospace;">avahi-daemon</span><span style="font-family: Courier New, Courier, monospace;"><br />systemctl start squeezelite </span><span style="font-family: 'Courier New', Courier, monospace;">avahi-daemon</span><span style="font-family: Courier New, Courier, monospace;"><br /><br />#autostart squeezelite and </span><span style="font-family: 'Courier New', Courier, monospace;">avahi-daemon</span><span style="font-family: 'Courier New', Courier, monospace;"> on reboot</span><br />
<span style="font-family: Courier New, Courier, monospace;">systemctl enable squeezelite </span><span style="font-family: 'Courier New', Courier, monospace;">avahi-daemon</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<br />
<b><span style="font-family: inherit; font-size: large;">SqueezeBox (Logitech Media Server) Installation</span></b><br />
<br />
<span style="font-family: Courier New, Courier, monospace;"><br /><br />#Install pre-compiled version (7/30/2015)</span><br />
<span style="font-family: Courier New, Courier, monospace;">pacman -U <a href="http://dl.dropbox.com/u/42238/pogoplug/v2/logitechmediaserver-7.9.0.arch2-1-arm.pkg.tar.xz">http://dl.dropbox.com/u/42238/pogoplug/v2/logitechmediaserver-7.9.0.arch2-1-arm.pkg.tar.xz</a></span><br />
<span style="font-family: Courier New, Courier, monospace;">#start logitechmediaserver</span><br />
<span style="font-family: Courier New, Courier, monospace;">systemctl start logitechmediaserver</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#autostart logitechmediaserver on reboot</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">systemctl enable logitechmediaserver</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />#make music and playlist folder</span><br />
<span style="font-family: Courier New, Courier, monospace;">mkdir -p /media/usb/share/music</span><br />
<span style="font-family: Courier New, Courier, monospace;">mkdir -p /media/usb/share/playlist</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#update permissions</span><br />
<span style="font-family: Courier New, Courier, monospace;">chmod 777 /media/usb/share/music</span><br />
<span style="font-family: Courier New, Courier, monospace;">chmod 777 /media/usb/share/playlist</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Configure @ http://pogoplug:9000 or http://ipaddress:9000</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<br />
LMS Build Instructions<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Requires Swap of 512MB or more</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Takes 3 hours</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#LMS AUR link:<br />#<a href="https://aur.archlinux.org/packages/logitechmediaserver/">https://aur.archlinux.org/packages/logitechmediaserver/</a></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#Create non-root account for building</span><br />
<span style="font-family: Courier New, Courier, monospace;">mkdir -p </span><span style="font-family: 'Courier New', Courier, monospace;">/media/usb/share/build</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;">chmod 777 </span><span style="font-family: 'Courier New', Courier, monospace;">/media/usb/share/build</span><br />
<span style="font-family: Courier New, Courier, monospace;">pacman -Sy sudo adduser</span><br />
<span style="font-family: Courier New, Courier, monospace;">adduser builder<br />echo "builder ALL=(ALL) ALL">> /etc/sudoers<br />su builder</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cd </span><span style="font-family: 'Courier New', Courier, monospace;">/media/usb/share/build</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">wget --no-check-certificate <a href="https://aur.archlinux.org/packages/lo/logitechmediaserver/logitechmediaserver.tar.gz">https://aur.archlinux.org/packages/lo/logitechmediaserver/logitechmediaserver.tar.gz</a></span><br />
<span style="font-family: 'Courier New', Courier, monospace;">tar -xvzf logitechmediaserver.tar.gz</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd logitechmediaserver</span><br />
<span style="font-family: Courier New, Courier, monospace;">makepkg -Acs</span></div>
<div>
<br />
<span style="font-family: Courier New, Courier, monospace;">#LMS has a perl version dependency</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#pacman -Syu --ignore perl</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-size: large;"><b>Plex Media Server</b></span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">Plex is probably the best solution for accessing your music over the internet using a computer, iPhone or Android device.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Note that Plex on the Pogoplug (ARM in general) does not support transcoding. This means your media need to be natively supported by your Plex Client (e.g., mp4/m4v on iOS devices).</span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">Major kudos to moonman on ALARM forum for providing the PKGBUILD.</span><br />
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<span style="font-family: Courier New, Courier, monospace;"><br /><br />#Install pre-complied version (7/25/2015)<br />pacman -U <a href="http://dl.dropbox.com/u/42238/pogoplug/v2/plex-media-server-0.9.12.4.1192-1-arm.pkg.tar.xz">http://dl.dropbox.com/u/42238/pogoplug/v2/plex-media-server-0.9.12.4.1192-1-arm.pkg.tar.xz</a><br /><br />#start plexmediaserver<br />systemctl start plexmediaserver<br /><br />#autostart plexmediaserver on reboot<br />systemctl enable plexmediaserver</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Plex Media Server Build Instructions</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Requires SWAP</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">pacman -Sy svn</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">mkdir /media/usb/share/build<br />chmod 777 /media/usb/share/build</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Create non-root account for building</span><br />
<span style="font-family: Courier New, Courier, monospace;">mkdir -p </span><span style="font-family: 'Courier New', Courier, monospace;">/media/usb/share/build</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;">chmod 777 </span><span style="font-family: 'Courier New', Courier, monospace;">/media/usb/share/build</span><br />
<span style="font-family: Courier New, Courier, monospace;">pacman -Sy sudo adduser</span><br />
<span style="font-family: Courier New, Courier, monospace;">adduser builder<br />echo "builder ALL=(ALL) ALL">> /etc/sudoers<br />su builder<br /><br />cd </span><span style="font-family: 'Courier New', Courier, monospace;">/media/usb/share/build</span><span style="font-family: Courier New, Courier, monospace;"><br />svn checkout <a href="https://github.com/archlinuxarm/PKGBUILDs/trunk/aur/plex-media-server">https://github.com/archlinuxarm/PKGBUILDs/trunk/aur/plex-media-server</a><br /><br />cd plex-media-server<br />makepkg -A<br /><br /><br />#Configure @ http://PogoplugIPAddress:32400/manage</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">If you're having issues adding your media, try changing the permissions on the folder - </span><span style="font-family: Courier New, Courier, monospace;">chmod 777 /media/usb/share/music</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<br /></div>
<b><span style="font-family: inherit; font-size: large;">AirPrint Server - Print to your non-AirPrint enabled printers</span></b><br />
<br />
<span style="font-family: inherit;">(2/19/2015) - Confirmed working. Cups is now at version 2.0.1. systemctl name changed from cups to org.cups.cupsd.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Install CUPS and print drivers</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">pacman -Sy cups gutenprint ghostscript python2-pycups python2 avahi </span><span style="font-family: Courier New, Courier, monospace;"><br /><br />#link python to python2<br />ln -s /usr/bin/python2 /usr/bin/python</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#For HP Printer Drivers<br />pacman -S hplip<br /><br />#For Samsung Printer Drivers<br />pacman -S splix<br /><br />#Backup original cupsd.conf</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">cd /etc/cups</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">mv cupsd.conf cupsd.conf.org</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#download my cupsd.conf</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">wget <a href="http://dl.dropbox.com/u/42238/pogoplug/cupsd.conf">http://dl.dropbox.com/u/42238/pogoplug/cupsd.conf</a></span><span style="font-family: Courier New, Courier, monospace;"><br /><br />#Start CUPS</span><br />
<span style="font-family: Courier New, Courier, monospace;">systemctl start org.cups.cupsd</span><span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
</div>
<span style="font-family: inherit;"><b>Configure CUPS Printer(s)</b></span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: inherit;">Now open up your web browser and go to http://alarm:631/admin.</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: inherit;"><br />This part is YMMV. Not all printers will work.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">Click the "Add Printer" Button.</span><span style="font-family: inherit;"><br /><br />In my case, I am using a <a href="http://www.amazon.com/dp/B00450DVDY/?tag=blogqnologyco-20" target="_blank">Brother HL-2270DW</a> (highly recommended, works great and cheap toner) which has built in wireless and supports various printing options - socket, ipp, http, etc. I'm going to use socket (AppSocket/HP JetDirect) which is the same option you would select if you had your USB printer directly connected to your PogoPlug. </span><br />
<span style="font-family: inherit;"><br /></span><span style="font-family: inherit;">USB attached printers should be auto detected (untested).<br /><br />For the Brother wireless printer, the Connection address I'm using is "socket://<PrinterIPAddress>:9100" ( for the record "ipp://<PrinterIPAddress>/pcl_p1" would also work).</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">If you're using a DD-WRT or TomatoUSB Router as your print server, </span>"socket://<RouterIPAddress>:9100", would be the correct Connection address..<br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">Name your printer. Check the "Share This Printer" checkbox. </span><span style="font-family: inherit;">Select the Make/Model of your Printer. Basically you are selecting the drivers to use. For my Brother HL-2270DW, I went with "Generic"->"Generic PCL 6/PCL XL Printer".</span><br />
<span style="font-family: inherit;"><br />Click Add Printer.<br /><br />Set your Default Options.<br /><br />Print a test page. Maintenance->Print Test Page.<br /><br />Printing a test page needs to work. If not, you can not continue. Not all printers will work. Try different drivers (or a different printer) if you're having a problem with printing a test page.</span><br />
<div>
<br /></div>
<span style="font-family: inherit;">Back in the SSH Console</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /><br />#download avahi airprint script</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">mkdir -p /opt/airprint</span><span style="font-family: Courier New, Courier, monospace;"><br />cd /opt/airprint<br /><br /> #this is all one line<br />wget -O airprint-generate.py --no-check-certificate https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py<br /><br />#make script executable<br />chmod 755 airprint-generate.py<br /><br />#add mime types needed for iOS6<br />echo "image/urf urf string(0,UNIRAST<00>)" > /usr/share/cups/mime/airprint.types<br />echo "image/urf application/pdf 100 pdftoraster" > /usr/share/cups/mime/airprint.convs<br /><br />#autostart avahi-daemon<br /> systemctl start avahi-daemon<br /> systemctl enable avahi-daemon<br /><br />#restart cups to pick up new mime types<br />systemctl restart </span><span style="font-family: 'Courier New', Courier, monospace;">org.cups.cupsd</span><span style="font-family: Courier New, Courier, monospace;"><br /><br />#Generate AirPrint service file<br />cd /etc/avahi/services<br />/opt/airprint/airprint-generate.py<br /><br />#Check for AirPrint-<PrinterName>.service file<br />ls<br /><br /> #Test AirPrint from iOS Device<br /><br />#autostart cupsd after reboot</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">systemctl enable org.cups.cupsd</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<br />
<div>
As a reference please check out this posting - <span style="font-family: inherit;"><a href="http://blog.qnology.com/2013/03/tutorial-apple-airprint-on-tomatousb.html" target="_blank">[Tutorial] Apple AirPrint on TomatoUSB Router</a></span><br />
<br />
<br />
<b><span style="font-size: large;">Google CloudPrint - Print over the internet via Chrome Web </span></b><span style="font-size: large;"><b>Browser. Share your printer with friends/family.</b></span><br />
<br />
Requires AirPrint Server (Cups) configuration above.<br />
Updated and verified (7/26/2015)<span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">pacman -Sy git</span><span style="font-family: Courier New, Courier, monospace;"><br /><br />#download cloudprint<br />mkdir /opt<br /> cd /opt<br /> git clone git://github.com/armooo/cloudprint</span></div>
</div>
<br />
<span style="font-family: Courier New, Courier, monospace;">#build and install cloudprint</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">cd /opt/cloudprint</span><br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">python2 setup.py build</span><span style="font-family: Courier New, Courier, monospace;"><br />python2 setup.py install</span><span style="font-family: Courier New, Courier, monospace;"><br /><br /> </span><br />
<span style="font-family: Courier New, Courier, monospace;">#Run once to create printer. </span><br />
<span style="font-family: Courier New, Courier, monospace;">#Follow instructions to claim printer.<br /> cloudprint<br /><br />#Test print from your Chrome we</span><span style="font-family: 'Courier New', Courier, monospace;">b browser</span><br />
<span style="font-family: Courier New, Courier, monospace;">#Control+C to close cloudprint</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#python2-daemon needed to demonize cloudprint</span><br />
<span style="font-family: Courier New, Courier, monospace;">#Install pre-compiled version</span><br />
<span style="font-family: Courier New, Courier, monospace;">pacman -U http://dl.dropbox.com/u/42238/pogoplug/v2/python2-daemon-2.0.5-1-any.pkg.tar.xz</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#setup cloudprint to run on startup via systemd service<br />cd /etc/systemd/system<br />wget <a href="http://dl.dropbox.com/u/42238/pogoplug/v2/cloudprint.service">http://dl.dropbox.com/u/42238/pogoplug/v2/cloudprint.service</a></span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Enable cloudprint service on reboot and start</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">systemctl enable cloudprint.service</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">systemctl start cloudprint.service</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#Instructions for building python2-daemon from AUR</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#https://aur.archlinux.org/packages/python2-daemon/</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">#mkdir -p </span><span style="font-family: 'Courier New', Courier, monospace;">/media/usb/share/build</span><br />
<span style="font-family: Courier New, Courier, monospace;">#cd /media/usb/share/build</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#switch to non-root account to build</span><br />
<span style="font-family: Courier New, Courier, monospace;">#wget https://aur.archlinux.org/packages/py/python2-daemon/python2-daemon.tar.gz</span><br />
<span style="font-family: Courier New, Courier, monospace;">#tar -xvf </span><span style="font-family: 'Courier New', Courier, monospace;">python2-daemon.tar.gz</span><br />
<span style="font-family: Courier New, Courier, monospace;">#cd </span><span style="font-family: 'Courier New', Courier, monospace;">python2-daemon</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
<span style="font-family: Courier New, Courier, monospace;">#makepkg -Acs</span><br />
<div>
<br /></div>
<span style="font-family: 'Courier New', Courier, monospace;">#Clear google credentials/auth files</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#not sure if this is still valid.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#rm /root/.cloudprintauth<br />#rm /root/.cloudprintsaslauth</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">Cloudprint is very fragile. If you're having start-up or printing issues try the following steps.<br /><br />- Clear your Google CloudPrint Print Queue - <a href="https://www.google.com/cloudprint/#jobs">https://www.google.com/cloudprint/#jobs</a><br />- Delete your stored credential and reboot and start over.<br /><br />One more thing regarding CloudPrint, my recommendation is to set up a new Google Account dedicated just for CloudPrint. Use this account for the above cloudprint login, and then share your printer(s) with your main account. I'm a little paranoid of having my email authentication stored on my router (even though its hashed or encrypted).</span><br />
<div>
<span style="font-family: inherit;"><br /></span>
<b><span style="font-size: large;">Re-install my.pogoplug.com service (original software) </span></b><br />
<br />
Great piece of software. My favorite is the iOS/Android app automatic photo/video backup feature. This is a simple and effective way to backup your phone's camera stream.<br />
<div>
<br />
[Updated 5/14/2015] - Cloud Engine software was updated to 3.4.5.10</div>
<div>
<br /></div>
Please go here for latest instructions/update:<br />
<a href="http://archlinuxarm.org/forum/viewtopic.php?f=18&t=3343">http://archlinuxarm.org/forum/viewtopic.php?f=18&t=3343</a> (Thanks moonman!)<br />
<span style="font-family: Courier New, Courier, monospace;"></span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#If upgrading from previous release</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#uninstall old version</span><br />
<span style="font-family: Courier New, Courier, monospace;">pacman -R pogoplug</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#you may need to delete this file otherwise</span><br />
<span style="font-family: Courier New, Courier, monospace;">#the new package will complain</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#rm /usr/local/cloudengines/bin/hbplug.conf</span></div>
<div>
<br />
<span style="font-family: Courier New, Courier, monospace;">#install pogoplug software<br />pacman -U https://dl.dropboxusercontent.com/u/15043728/ArchLinuxArm/my.pogoplug.com/pogoplug-3.4.5.10-1-arm.pkg.tar.xz</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#download my sample pogoplug.conf file</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#if upgrade, you can skip this</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">cd /etc</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">wget </span><a href="http://dl.dropbox.com/u/42238/pogoplug/v2/pogoplug.conf" style="font-family: 'Courier New', Courier, monospace;">http://dl.dropbox.com/u/42238/pogoplug/v2/pogoplug.conf</a><span style="font-family: Courier New, Courier, monospace;"><br /><br />#edit configuration file</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#edit vfsdir0</span><span style="font-family: Courier New, Courier, monospace;"><br />#add svcid (ID) from the bottom of your PogoPlug (no dashes)</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">nano /etc/pogoplug.conf</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">##example below: vfsdir<number>=<name>,<path></span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">#vfsdir0=PogoPlug_USB,/media/usb/share</span><span style="font-family: Courier New, Courier, monospace;"><br />#installdir=/usr/local/cloudengines<br />##datadir=.<br />#datadir=.<br />#nohotplug=1<br />##use the ID from the bottom of your Pogoplug </span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#26 char (no dashes)</span><span style="font-family: Courier New, Courier, monospace;"><br />#svcid=35DFBFL73RD2CX5FJMAAAA1111</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#tcpport=89</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#note /etc/pogoplug.conf will be copied to</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">#/usr/local/cloudengines/hbplug.conf on service startup </span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">#hbplug.conf is the file that matters.</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#if things are not working as expected, verify</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#the content of the hbplug.conf file</span><span style="font-family: Courier New, Courier, monospace;"><br /><br /> #start pogoplug service</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">systemctl start pogoplug</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#autostart pogoplug service on reboot</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">systemctl enable pogoplug</span><span style="font-family: Courier New, Courier, monospace;"><br /><br />#reboot and register @ <a href="http://my.pogoplug.com/">http://my.pogoplug.com</a></span><br />
<span style="font-family: 'Courier New', Courier, monospace;">reboot</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<b><span style="font-size: large;">Enable uPNP/DNLA (my.pogoplug.com)</span></b><br />
<br />
The Cloud Engine my.pogoplug.com software has a (limited) built-in uPNP/DNLA server. Also note that Plex Media Server and Logitech Media Server both have built in DNLA Servers.<br />
<br />
On my.pogoplug.com -> Settings -> Media<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_D0qy-T3Y-9fiRGNNxc3N-kTFHWd5EODoTiGoPbvmKFIZvNBoav96LyZiY-RDuL9io_YgKFz3XB7ZuZgKQXSApNBcmVkGJ_VTiCEQD7lsscwkBZx9dQWPevYihCMdQmjdNGCFSG5AuFqL/s1600/uPNP_DNLA.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_D0qy-T3Y-9fiRGNNxc3N-kTFHWd5EODoTiGoPbvmKFIZvNBoav96LyZiY-RDuL9io_YgKFz3XB7ZuZgKQXSApNBcmVkGJ_VTiCEQD7lsscwkBZx9dQWPevYihCMdQmjdNGCFSG5AuFqL/s1600/uPNP_DNLA.PNG" /></a></div>
<br />
<br />
<br />
<br />
<span style="font-family: inherit; font-size: large;"><b><br /></b></span>
<span style="font-family: inherit; font-size: large;"><b><br /></b></span>
<span style="font-family: inherit; font-size: large;"><b><br /></b></span>
<span style="font-family: inherit; font-size: large;"><b><br /></b></span><b style="font-family: inherit; font-size: x-large;"><br /></b>
<b style="font-family: inherit; font-size: x-large;"><br /></b><br />
<b style="font-family: inherit; font-size: x-large;">Wireless Configuration</b><br />
Last Updated: 8/14/2013 (needs updating 6/26/2014)<br />
<br /></div>
<div>
The following USB wireless adapters are Plug and Play:</div>
<div>
<a href="http://www.amazon.com/dp/B0017GS382/?tag=blogqnologyco-20" target="_blank">AirLink AWLL3028 802.11g Wireless USB Adapter (RTL8187B)</a></div>
<a href="http://www.amazon.com/dp/B000QYGNKQ/?tag=blogqnologyco-20" target="_blank">Alfa AWUS036H (RTL8187)</a><br />
<a href="http://www.amazon.com/dp/B006JWMOOI/?tag=blogqnologyco-20" style="background-color: white; font-family: inherit;" target="_blank">Etekcity High Power 802.11 B/N/G 300M USB Wireless 1000mw Wifi Network Adapter with Dual Antenna</a><span style="background-color: white; font-family: inherit;"> (RT3072) - <a href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=2&pub=5575059262&toolid=10001&campid=5337506712&customid=&icep_item=151171182327&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=lg" target="_blank">You can save yourself a few dollars picking up a generic one from China on Ebay.</a></span><br />
<div>
<br /></div>
These USB wireless adapters are not Plug and Play:<br />
Airlink101 AWLL5099<br />
Mini Wireless 150Mbs USB Ralink RT5370<br />
<div>
<span style="font-family: inherit; font-size: large;"><b><br /></b></span>
<br />
<span style="font-family: inherit;">NETCFG has been replaced by NETCTL</span><br />
<a href="https://wiki.archlinux.org/index.php/Netctl">https://wiki.archlinux.org/index.php/Netctl</a><br />
<br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#install netctl and related packages</span><br />
<span style="font-family: Courier New, Courier, monospace;">pacman -Sy wireless_tools netctl ifplugd wpa_actiond dialog</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Connect to wireless network and create wireless profile</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd /etc/netctl</span><br />
<span style="font-family: Courier New, Courier, monospace;">wifi-menu</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#check if wireless profile got created</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#you should see wlan0-SSIDName</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">ls /etc/netctl</span></div>
</div>
<br />
<span style="font-family: Courier New, Courier, monospace;">#Auto Connect to Wireless Network</span><br />
<span style="font-family: Courier New, Courier, monospace;">systemctl enable netctl-auto@wlan0.service</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Auto Connect to Wired Network</span><br />
<span style="font-family: Courier New, Courier, monospace;">systemctl enable netctl-ifplugd@eth0.service</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#reboot and test</span><br />
<span style="font-family: Courier New, Courier, monospace;">ifconfig</span><br />
<span style="font-family: Courier New, Courier, monospace;">iwconfig</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: inherit; font-size: large;"><b>
Motion WebCam</b></span><br />
<br />
Attach a USB Webcam to your Pogoplug and turn it into a surveillance system.<br />
More info - <a href="http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionGuide">http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionGuide</a><br />
<br />
Confirmed working with:<br />
<a href="http://www.amazon.com/dp/B004FHO5Y6/?tag=blogqnologyco-20" target="_blank">Logitech HD Webcam C270</a><br />
<div>
<div>
<a href="http://www.amazon.com/dp/B003LVZO8S/?tag=blogqnologyco-20" target="_blank">Logitech HD Webcam C310</a></div>
</div>
<div>
<br /></div>
<span style="font-family: Courier New, Courier, monospace;"><br />#install motion and other required packages<br />pacman -S motion x264 fswebcam<br /><br />#change to motion folder and edit motion.conf file<br />cd /etc/motion<br /><br />#turn off localhost access only<br />sed -i 's:webcam_localhost on:webcam_localhost off:' ./motion.conf<br /><br />#adjust resolution to 640x480<br />sed -i 's:width 320:width 640:' ./motion.conf<br />sed -i 's:height 240:height 480:' ./motion.conf<br /><br />#disable http remote control<br />sed -i 's:control_port 8080:control_port 0:' ./motion.conf<br /><br /> #change webcam http port to 8088<br />sed -i 's:webcam_port 8081:webcam_port 8088:' ./motion.conf<br /><br />#change folder where picture/video are saved<br />sed -i 's:/usr/local/apache2/htdocs/cam1:/media/usb/share/motion_capture:' ./motion.conf<br /><br />#create required folders<br />mkdir -p /var/run/motion<br />mkdir -p /media/usb/share/motion_capture</span></div>
<span style="font-family: 'Courier New', Courier, monospace;">#Start motion and access webcam @ http://pogoplug:8081</span><br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">#Bug in Chrome, no longer allow you to view stream.</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">#Use Firefox or VLC</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#A little hack to get motion to detect webcam correctly</span></div>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace;">fswebcam -r 320x240 -d /dev/video0 -v /dev/null<br /><br />#start motion (non-daemon mode)<br />motion -n<br /><br />#download service file, includes fswebcam hack<br />cd /etc/systemd/system<br />wget <a href="http://dl.dropbox.com/u/42238/pogoplug/v2/motion.service">http://dl.dropbox.com/u/42238/pogoplug/v2/motion.service</a><br /><br />#auto start motion on reboot<br />systemctl enable motion</span></div>
<div>
<b><span style="font-family: inherit; font-size: large;"><br /></span></b><span style="font-size: large;"><b>BitTorrent Sync</b></span><br />
<div style="font-family: 'Courier New', Courier, monospace;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: inherit;"><a href="http://labs.bittorrent.com/experiments/sync.html">BitTorrent Sync</a> is a free utility that uses the bittorrent protocol to keep folders in sync across devices. It can be used with OS X, Windows, Android and Linux.</span><br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">#create folder</span></div>
<span style="font-family: Courier New, Courier, monospace;">mkdir -p /usr/local/bin</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd /usr/local/bin</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#download and untar</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget <a href="http://download-new.utorrent.com/endpoint/btsync/os/linux-arm/track/stable">http://download-new.utorrent.com/endpoint/btsync/os/linux-arm/track/stable</a></span><br />
<span style="font-family: Courier New, Courier, monospace;">tar -xzvf stable</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />#delete unneeded files<br />rm LICENSE.TXT stable</span></div>
<div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#create default btsync.config</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"></span><br />
<span style="font-family: Courier New, Courier, monospace;">btsync --dump-sample-config>/etc/btsync.conf</span><br />
<div>
<br /></div>
<span style="font-family: 'Courier New', Courier, monospace;">#download service file</span></div>
<span style="font-family: Courier New, Courier, monospace;">cd /etc/systemd/system<br />wget <a href="http://dl.dropbox.com/u/42238/pogoplug/v2/btsync.service">http://dl.dropbox.com/u/42238/pogoplug/v2/btsync.service</a><br /><br />#start btsync<br />systemctl start btsync<br /><br />#autostart btsync on reboot<br />systemctl enable btsync</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />#http://pogoplug:8888/gui</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span><b><span style="font-family: inherit; font-size: large;">T</span></b><b><span style="font-family: inherit; font-size: large;">ransmission, Sabnzbd, SickBeard and CouchPotato</span></b><br />
<br />
Requires a swap partition or swapfile - 1GB recommended.<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">pacman -Sy sabnzbd sickbeard-git couchpotato-git transmission-cli python2-pyopenssl</span><br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">#start and stop all apps to create config files</span><span style="font-family: Courier New, Courier, monospace;"><br />systemctl start transmission sabnzbd couchpotato sickbeard</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#check status<br />systemctl status transmission sabnzbd couchpotato sickbeard<br /><br />#shut them down<br />systemctl stop transmission sabnzbd couchpotato sickbeard<br /><br />#transmission - allow login from any computer<br />cd /var/lib/transmission/.config/transmission-daemon/</span><br />
<span style="font-family: Courier New, Courier, monospace;">sed -i 's^"rpc-whitelist-enabled": true^"rpc-whitelist-enabled": false^' ./settings.json<br /><br /> #sabnzbd - allow login from any computer<br />cd /opt/sabnzbd<br />sed -i 's^host = localhost^host = 0.0.0.0^' ./sabnzbd.ini<br /><br />#start all<br />systemctl start transmission sabnzbd couchpotato sickbeard</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#auto start after reboot</span><br />
<span style="font-family: Courier New, Courier, monospace;">systemctl enable transmission sabnzbd couchpotato sickbeard</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#make sure you change the permission of your folders appropriately</span><br />
<span style="font-family: Courier New, Courier, monospace;">#chmod 777 /media/usb/share/downloads</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<span style="font-family: 'Courier New', Courier, monospace;"># sabnzbd - http://alarm:8080</span><br />
<span style="font-family: Courier New, Courier, monospace;"># couchpotato - http://</span><span style="font-family: 'Courier New', Courier, monospace;">alarm</span><span style="font-family: Courier New, Courier, monospace;">:5050/</span><br />
<span style="font-family: Courier New, Courier, monospace;"># sickbeard - http://</span><span style="font-family: 'Courier New', Courier, monospace;">alarm</span><span style="font-family: Courier New, Courier, monospace;">:8081/<br /># transmission - http://</span><span style="font-family: 'Courier New', Courier, monospace;">alarm</span><span style="font-family: Courier New, Courier, monospace;">:9091</span><br />
<b><span style="font-family: inherit; font-size: large;"><br /></span></b>
<span style="font-size: large;"><b>Sonarr/</b></span><b style="font-size: x-large;">NzbD</b><b style="font-size: x-large;">rone</b><br />
<span style="font-family: Courier New, Courier, monospace; font-size: large;"><b><br /></b></span>
<br />
<div>
<div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#SONARR/NZBDRONE</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">pacman -Sy mono mediainfo sqlite3</span></div>
<span style="font-family: Courier New, Courier, monospace;"><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">cd /opt</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">mkdir sonarr</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">cd sonarr</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">wget http://update.sonarr.tv/v2/master/mono/NzbDrone.master.tar.gz</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">tar xvfz NzbDrone.master.tar.gz</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">cd NzbDrone</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">mono --debug NzbDrone.exe</span></span></div>
</div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">cd /etc/systemd/system</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">wget </span><a href="http://dl.dropbox.com/u/42238/pogoplug/v2/cloudprint.service" style="font-family: 'Courier New', Courier, monospace;">http://dl.dropbox.com/u/42238/pogoplug/v2/sonarr.service</a></div>
<div>
<b><span style="font-family: inherit; font-size: large;"><br /></span></b></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Enable sonarr service on reboot and start</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">systemctl enable </span><span style="font-family: 'Courier New', Courier, monospace;">sonarr</span><span style="font-family: Courier New, Courier, monospace;">.service</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">systemctl start </span><span style="font-family: 'Courier New', Courier, monospace;">sonarr</span><span style="font-family: 'Courier New', Courier, monospace;">.service</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#Give it plenty of time to startup</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#http://IPAddress:8989</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
</div>
<b><span style="font-family: inherit; font-size: large;">TimeMachine Backup</span></b><br />
<span style="font-family: inherit;"><a href="http://www.twobitcoder.com/?p=303" target="_blank">Configure Netatalk in Arch Linux for Time Machine Goodness</a></span></div>
<div>
<br />
<br /></div>
<div>
<span style="font-size: large;"><b>OpenVPN (Client)</b></span></div>
<span style="font-family: inherit;"><br />As a reference please check out my other two tutorials on OpenVPN:</span><span style="font-family: inherit;"><a href="http://blog.qnology.com/2013/02/tutorial-30-minutes-or-less-site-to.html" target="_blank">[Tutorial - 30 Minutes or Less] Site to Site VPN with TomatoUSB and OpenVPN</a></span><span style="font-family: inherit;"><br /></span><span style="font-family: inherit;"><a href="http://blog.qnology.com/2013/03/tutorial-centos-6-openvpn-client.html" target="_blank">[Tutorial] CentOS 6 OpenVPN Client - Connecting to Existing Site to Site VPN (TomatoUSB)</a></span><span style="font-family: inherit;"><br /></span><br />
<br />
pacman -Sy openvpn<br />
<br />
#generate keys on CA and copy them over<br />
mkdir -p /etc/openvpn/keys<br />
<br />
#copy sample client.conf to /etc/openvpn<br />
cp /usr/share/openvpn/examples/client.conf /etc/openvpn<br />
<br />
#edit openvpn client.conf<br />
nano /etc/openvpn/client.conf<br />
<br />
#Update the following lines<br />
#remote vpnserverIPAddress 1194<br />
#ca /etc/openvpn/keys/ca.crt<br />
#cert /etc/openvpn/keys/pogoplug.crt<br />
#key /etc/openvpn/keys/pogoplug.key<br />
<br />
#start VPN manually to test<br />
openvpn --config /etc/openvpn/client.conf<br />
<br />
#autostart OpenVPN client on reboot<br />
systemctl enable openvpn@client.service<br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: inherit; font-size: large;"><b>Webmin</b></span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />pacman -Sy webmin perl-net-ssleay nano</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#allow any IP to connect</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">sed -i 's^127.0.0.1^0.0.0.0^' </span><span style="font-family: 'Courier New', Courier, monospace;">/etc/webmin/miniserv.conf</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#start webmin</span><br />
<span style="font-family: Courier New, Courier, monospace;">systemctl start webmin</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#auto start after reboot<br />systemctl enable webmin</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#https://PogoplugIPAddress</span><span style="font-family: Courier New, Courier, monospace;">:10000</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-size: large;"><b>Mongoose (Simple Web Server)</b></span><br />
<a href="https://code.google.com/p/mongoose/">https://code.google.com/p/mongoose/</a><br />
<span style="font-family: Courier New, Courier, monospace;"><br /><br />pacman -U <a href="http://dl.dropbox.com/u/42238/pogoplug/v2/mongoose-3.7-1-arm.pkg.tar.xz">http://dl.dropbox.com/u/42238/pogoplug/v2/mongoose-3.7-1-arm.pkg.tar.xz</a></span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">pacman -Sy php-cgi</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Optional - Edit mongoose.conf</span><br />
<span style="font-family: Courier New, Courier, monospace;"></span><br />
<span style="font-family: Courier New, Courier, monospace;">#nano /etc/mongoose/mongoose.conf</span><br />
<div>
<br /></div>
<span style="font-family: Courier New, Courier, monospace;">systemctl start mongoose</span><br />
<span style="font-family: Courier New, Courier, monospace;">systemctl enable mongoose</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#place files in /srv/http</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Access Web Server @ http://PogoplugIPAddresss:8088</span></div>
<div>
<br /></div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<span style="font-family: inherit; font-size: large;"><b>OwnCloud </b></span><span style="font-size: large;">(nginx php-fpm sqlite)</span><br />
<br />
Note - I'm no longer actively working on owncloud. The default PogoPlug software works well enough for my needs. There is a bug with using a self sign certificate (expect a WebDav error). You'll need to mount a different disk for your owncloud data folder - /srv/http/owncloud/data (I was not able to get owncloud working if I used a different data folder path).<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">pacman -Sy owncloud nginx php-fpm sqlite3 php-sqlite<br /><br />#copy owncloud files</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">cd /srv/http</span><span style="font-family: Courier New, Courier, monospace;"><br /> cp -R /tmp/owncloud .<br /><br />#update owner</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">chown http:http /srv/http/owncloud </span><span style="font-family: Courier New, Courier, monospace;"><br />chown http:http /srv/http/owncloud/config<br />chown http:http /srv/http/owncloud/apps<br /><br /><br />#uncomment out required modules<br />sed -i 's^;extension=gd.so^extension=gd.so^' /etc/php/php.ini<br />sed -i 's^;extension=xmlrpc.so^extension=xmlrpc.so^' /etc/php/php.ini<br />sed -i 's^;extension=zip.so^extension=zip.so^' /etc/php/php.ini<br />sed -i 's^;extension=iconv.so^extension=iconv.so^' /etc/php/php.ini<br />sed -i 's^;extension=sqlite3.so^extension=sqlite3.so^' /etc/php/php.ini<br />sed -i 's^;extension=pdo_sqlite.so^extension=pdo_sqlite.so^' /etc/php/php.ini</span><span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#Maximum execution time of each script, in seconds</span><span style="font-family: Courier New, Courier, monospace;"><br />sed -i 's^max_execution_time = 30^max_execution_time = 300^' /etc/php/php.ini</span><span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#Maximum amount of time each script may spend parsing request data.</span><span style="font-family: Courier New, Courier, monospace;"><br />sed -i 's^max_input_time = 60^max_input_time = 600^' /etc/php/php.ini</span><span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#Maximum allowed size for uploaded files.</span><span style="font-family: Courier New, Courier, monospace;"><br />sed -i 's^upload_max_filesize = 2M^upload_max_filesize = 100M^' /etc/php/php.ini</span><span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#Maximum size of POST data that PHP will accept.</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">sed -i 's^post_max_size = 8M^post_max_size = 400M^' /etc/php/php.ini</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#Maximum amount of memory a script may consume</span><span style="font-family: Courier New, Courier, monospace;"><br />sed -i 's^memory_limit = 128M^memory_limit = 512M^' /etc/php/php.ini</span><span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#</span><a href="http://doc.owncloud.org/server/5.0/admin_manual/installation/installation_others.html#nginx-configuration" style="font-family: 'Courier New', Courier, monospace;">http://doc.owncloud.org/server/5.0/admin_manual/installation/installation_others.html#nginx-configuration</a><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#backup config and download working nginx.conf<br />cd /etc/nginx </span><br />
<span style="font-family: Courier New, Courier, monospace;">mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.original<br />wget http://dl.dropbox.com/u/42238/pogoplug/nginx.conf</span><span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#Configure SSL</span><span style="font-family: Courier New, Courier, monospace;"><br /> #<a href="http://wiki.nginx.org/HttpSslModule">http://wiki.nginx.org/HttpSslModule</a></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#create folder to store certs</span><span style="font-family: Courier New, Courier, monospace;"><br /> mkdir -p /etc/nginx/certs<br /> cd /etc/nginx/certs<br /><br /> #Now create the server private key</span><br />
<span style="font-family: Courier New, Courier, monospace;">#you'll be asked for a passphrase<br /> openssl genrsa -des3 -out pogoplug.key 1024<br /><br /> #Create the Certificate Signing Request (CSR):<br /> openssl req -new -key pogoplug.key -out pogoplug.csr<br /><br /> #Remove the necessity of entering a </span><span style="font-family: 'Courier New', Courier, monospace;">passphrase </span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#for starting up nginx with SSL using the above private key:</span><br />
<span style="font-family: Courier New, Courier, monospace;"> cp pogoplug.key pogoplug.key.org<br /><br /> openssl rsa -in pogoplug.key.org -out pogoplug.key<br /><br /> #sign the certificate using the above private key and CSR<br /> openssl x509 -req -days 3650 -in pogoplug.csr -signkey pogoplug.key -out pogoplug.crt</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#start nginx and php-fpm</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">systemctl start php-fpm</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">systemctl start nginx</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#autostart nginx and php-fpm after reboot</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">systemctl enable php-fpm</span><span style="font-family: Courier New, Courier, monospace;"><br />systemctl enable nginx</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />#Finish configuration via <a href="https://pogoplugipaddress/owncloud/">https://PogoPlugIPAddress/owncloud/</a> or <a href="https://pogoplug/owncloud">https://pogoplug/owncloud</a></span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: inherit; font-size: large;"><b>Backup and Restore</b></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">Having a backup is always a good idea and is highly recommended. Its quick and simple and will save you the hassle of re-installation from scratch if anything ever happens to your flash drive (very common) or if you want to duplicate/clone your setup to another Pogoplug.</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">Offline Backup (Recommended) - These two methods, Disk Image and Tarball, requires unplugging the usb drive you want to backup and plugging it into another linux computer or VM, another pogoplug running ALARM (<b>A</b>rch <b>L</b>inux <b>ARM</b>), or same Pogoplug running alarm using a different USB flash drive.</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><a href="http://archlinuxarm.org/forum/viewtopic.php?f=18&t=5004" target="_blank">Credit/Reference</a></span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">1) Disk Image</span><br />
<div>
<br /></div>
<span style="font-family: Courier New, Courier, monospace;">#assumes /dev/sdb is the flash drive you want to backup</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">dd if=/dev/sdb of=/savetopath/pogoplug.e02.rootfs.backup.img bs=4M</span><span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
<span style="font-family: Courier New, Courier, monospace;">#restore, swap if (in) and of (out)</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">dd if=</span><span style="font-family: 'Courier New', Courier, monospace;">/savetopath/pogoplug.e02.rootfs.backup.img</span><span style="font-family: 'Courier New', Courier, monospace;"> of=</span><span style="font-family: 'Courier New', Courier, monospace;">/dev/sdb</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">2) Tarball (recommended and what I use)</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />#assumes the flash drive you want to backup is /dev/sdb1</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">mkdir /tmp/usb</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">mount /dev/sdb1 /tmp/usb</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#backup to root</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd /tmp/usb<br />tar -cvzf /pogoplug.e02.rootfs.backup.tar.gz ./<br /><br />#restore</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cd /tmp/usb</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">tar -xzvf </span><span style="font-family: 'Courier New', Courier, monospace;">/pogoplug.e02.rootfs.backup.tar.gz</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: inherit;">Online Backup using rsync</span><br />
<a href="http://mouhassan.wordpress.com/2012/06/30/backing-up-arch-linux-arm-alarm-on-pogoplug/"><span style="font-family: inherit;">http://mouhassan.wordpress.com/2012/06/30/backing-up-arch-linux-arm-alarm-on-pogoplug/</span></a><br />
<span style="font-family: inherit;"><br /></span>
<b><span style="font-size: large;"><br /></span></b>
<b><span style="font-size: large;">NTFS Formatted Drives</span></b><br />
<br />
I'm not a fan of using NTFS drives with the Pogoplug for various reasons - performance, complexity, non-native linux, etc. If you have the option, my recommendation is to keep things simple and dedicate a ext3 formatted drive to your Pogoplug.</div>
<div>
<br /></div>
<div>
However, I understand in certain cases you have no choice - like when your data is already on a NTFS drive and you have nowhere to back it up. So saying that, try the following:</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">pacman -Sy ntfs-3g udevil</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">systemctl enable devmon@root.service</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">systemctl start devmon@root.service</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">df -h</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#you should see your drive mounted under</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#/media/xxx</span></div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">#You might need to edit</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">nano /etc/udevil/udevil.conf</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<br />
<div>
Please see <a href="http://obihoernchen.net/wordpress/770/plug_computer_arch_linux/" target="_blank">Obihoernchen's blog</a> for some NTFS performance tip. Also note, people have reported boot up issues with NTFS drives attached.<br />
<br />
Again, this is something I don't use so I can not support it. And again, keep things simple and use a dedicated ext3 drive if possible.</div>
<br />
<br />
<b><span style="font-size: large;">Reverting Back to Stock</span></b><br />
<b><span style="font-size: large;"><br /></span></b>
<span style="font-family: inherit;">E02 model only. V4 doesn't have the option to boot to stock OS with USB flash drive unplugged.</span><br />
<span style="font-family: inherit;">Credit to </span><a href="http://mouhassan.wordpress.com/category/pogoplug" style="font-family: inherit;">Moustafa</a><span style="font-family: inherit;">.</span></div>
<div>
<br />
This isn't truly reverting your Pogoplug back to stock. What it will do is allow you to disconnect your USB flash drive from your Pogoplug and have it boot up to the default Pogoplug OS and connect to the my.pogoplug.com service.</div>
<div>
<br /></div>
<div>
During the uBoot installation, the script asks whether to disable pogoplug service, and the default answer is y<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">Would you like to disable the pogoplug services? [Y/n]</span><br />
<br />
You can turn back on the my.pogoplug.com service by the following steps:<br />
<ol>
<li>Boot into original firmware (disconnect all USB drives)</li>
<li>Connect using SSH</li>
<li>Edit <span style="font-family: Courier New, Courier, monospace;">/etc/init.d/rcS</span> script, and remove the comment(<span style="font-family: Courier New, Courier, monospace;">#</span>) in front of the line reading <span style="font-family: Courier New, Courier, monospace;">/etc/init.d/hbmgr.sh start</span></li>
</ol>
After rebooting into original firmware again, the my.pogoplug.com services will be available as before.<br />
<br />
<b><span style="font-size: large;">Troubleshooting ALARM Boot Up Issues</span></b><br />
<b><span style="font-size: large;"><br /></span></b>
The most common (and frustrating) issue with the Pogoplug and Arch Linux ARM is getting your Pogoplug to boot up consistently. This is not going to be an exhaustive troubleshooting guide, but I did want to point out some things I've learned and experienced that may help you.<br />
<br />
- Double check your router for the correct IP Address of your Pogoplug. Otherwise use a network scanning tool like <a href="http://sourceforge.net/projects/ipscan/files/ipscan2-binary/2.21/ipscan221.exe" target="_blank">AngryIP (Legacy)</a> to confirm the IP Address of your Pogoplug. On my iPhone, I use a free app call <a href="https://itunes.apple.com/us/app/inet-network-scanner/id340793353" target="_blank">iNet</a>.<br />
<br />
- Not all USB drives (flash or hd) will behave the same. Use a high quality name brand USB drive if possible. If you experience boot up issues, try a different USB flash drive or hard drive. I've noted the USB drives that I've had success with above.<br />
<br />
- USB flash drive or hard drive is corrupted due to improper shutdown. Plug the flash drive into a linux computer or another Pogoplug running ALARM and perform a <span style="font-family: Courier New, Courier, monospace;">fsck</span>.<br />
<br />
#/dev/sdb1 = drive and partition that needs fixing<br />
fsck /dev/sdb1<br />
<br />
- A cold/hard boot (disconnect/reconnect power cord) can behave differently than a warm boot (executing the 'reboot' command via the console). Yes, very strange. I've experienced where if I do a cold boot, the default Pogoplug OS will boot up and not ALARM. However, if I execute a <span style="font-family: Courier New, Courier, monospace;">reboot </span>command from within the default Pogoplug OS, ALARM will boot up properly. I've also experienced the opposite, where ALARM will boot up properly from a cold boot, but if I execute a 'reboot' command via the console, ALARM will not boot properly. This all depends on your USB flash/hard drive. Try the following, it may help and typically it shouldn't hurt. I'm using the below bootcmd for two of my Pogoplugs with Western Digital My Passport drives.<br />
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#</span><span style="font-family: 'Courier New', Courier, monospace;">E02 - Only. </span><span style="font-family: Courier New, Courier, monospace;">Fix boot issue with some USB drives</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#credit - </span><a href="http://archlinuxarm.org/forum/viewtopic.php?f=18&t=1717&p=9527#p9527">http://archlinuxarm.org/forum/viewtopic.php?f=18&t=1717&p=9527#p9527</a><br />
<span style="font-family: 'Courier New', Courier, monospace;">#print default bootcmd value</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">fw_printenv bootcmd</span><br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">#default bootcmd</span><br />
<span style="font-family: Courier New, Courier, monospace;">#[root@pogoplug ~]# fw_printenv bootcmd</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"></span><br />
<span style="font-family: Courier New, Courier, monospace;">#bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; #run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; #reset</span><br />
<div>
<br /></div>
<span style="font-family: Courier New, Courier, monospace;">#update bootcmd value to start, stop and start usb again</span><br />
<span style="font-family: Courier New, Courier, monospace;">#all one line</span><br />
<span style="font-family: Courier New, Courier, monospace;">fw_setenv bootcmd "usb start; usb stop; usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset"</span><span style="font-family: Georgia, Times New Roman, serif;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">#confirm update</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">fw_printenv bootcmd</span></div>
<br />
- If you plan to attach a hard drive for SAMBA, try installing ALARM on a small partition on the hard drive (4GB) and skip using a USB flash drive. This will allow you to avoid any boot up issues related to multiple USB drives attached. [Update - 9/25/2013] I've updated the SAMBA installation section.<br />
<br />
- If you have multiple USB drives attached, try Moustafa blog - <a href="http://mouhassan.wordpress.com/2012/06/27/booting-pogoplug-from-the-right-usb-disk/">Booting Pogoplug From The Correct USB Disk</a>. Note that Moustafa's blog isn't applicable if you're having boot up issues with only one USB drive attached.<br />
<br />
- <a href="http://archlinuxarm.org/forum/viewtopic.php?f=53&t=5977#p33717">Setup Netconsole to see what truly is happening</a>. Netconsole allows you to remotely view the Pogoplug boot up process. Here is a tutorial on setting up <a href="http://mhassan.me/2013/08/30/configuring-netconsole-on-pogoplug-v2/" target="_blank">Netconsole</a>.<br />
<br />
- Do a re-installation. Unplug your USB drive and start over. During the uboot installation, reset the uboot env back to default.<br />
<br />
- Try using a static IP Address. After installing ALARM to your USB drive (do not reboot), while still in the Pogoplug OS, edit the /tmp/usb/etc/netctl/eth0 file. You'll need to use vi (google if you're not familiar with using vi).<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#while in the Pogoplug OS, after installing ALARM</span><br />
<span style="font-family: Courier New, Courier, monospace;">vi /tmp/usb/etc/netctl/eth0</span><br />
<br />
The content of the eth0 file should look like the following:<br />
<div>
<span style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">Description='A basic static ethernet connection'</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">Interface=eth0</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">Connection=ethernet</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">IP=static</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">Address=('192.168.1.100/24')</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">Gateway='192.168.1.1'</span><br style="orphans: 2; text-align: -webkit-auto; widows: 2;" /><span style="orphans: 2; text-align: -webkit-auto; widows: 2;">DNS=('192.168.1.1')</span></span></div>
</div>
<div>
<br />
- Corrupted uBoot Environment. You'll need to reset via a Serial console. Please see my tutorial on setting up a <a href="http://blog.qnology.com/2013/10/pogoplug-e02-v2-serial-connection.html" target="_blank">Serial Console Connection for the Pogoplug E02</a>.<br />
<br />
- On the Pogoplug V4 and Mobile, booting up to the default Pogoplug OS without the USB drive attached is not support; you'll get a green blinking led. If your installation is corrupted or not working for whatever reason and want to reinstall ALARM, you'll need to use another linux computer - http://archlinuxarm.org/forum/viewtopic.php?f=18&t=3312&p=19207#p19207<br />
<br />
<span style="font-size: large;"><b>Miscellaneous Commands</b></span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#update hostname to pogoplug<br />hostnamectl set-hostname pogoplug</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#change password</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">passwd</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#poweroff (note that the light will not turn off)</span><br />
<span style="font-family: Courier New, Courier, monospace;">sync #just in case</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">poweroff</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#check what ports are used/listening on</span></div>
<div>
<div>
<span style="orphans: 2; text-align: -webkit-auto; widows: 2;"><span style="font-family: Courier New, Courier, monospace;">netstat -nptl</span></span><br />
<span style="orphans: 2; text-align: -webkit-auto; widows: 2;"><span style="font-family: Courier New, Courier, monospace;"><br /></span></span>
<span style="orphans: 2; text-align: -webkit-auto; widows: 2;"><span style="font-family: Courier New, Courier, monospace;">#check disk space usage, human readable output</span></span><br />
<span style="orphans: 2; text-align: -webkit-auto; widows: 2;"><span style="font-family: Courier New, Courier, monospace;">df -h</span></span></div>
</div>
<div>
<br /></div>
<div>
<div>
<span style="background-color: white; color: #666666; font-family: 'Courier New', Courier, monospace; font-size: 13px; line-height: 18px; orphans: 2; text-align: -webkit-auto; widows: 2;"><br /></span></div>
<span style="font-family: inherit;">-------------------------------------------------------------------</span></div>
<div>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">That's it for now.</span><br />
<span style="font-family: inherit;"><br /></span>
Please leave a comment if this is helpful or if you run into any issues. Thanks</div>
</div>
<div>
<br />
Please consider <a href="http://archlinuxarm.org/donate" target="_blank">donating </a>to the Arch Linux ARM group. They are the ones that made this possible.<br />
<br /></div>
<div>
<span style="font-family: inherit;">Some other great blogs/links on the PogoPlug E02:</span><br />
<br />
<a href="http://archlinuxarm.org/forum/index.php" target="_blank">Arch Linux ARM Forum</a><br />
<a href="http://obihoernchen.net/wordpress/770/plug_computer_arch_linux/">Installing Arch Linux and setting up everything on Plug Computers like PogoplugV2</a><br />
<a href="http://mouhassan.wordpress.com/category/pogoplug">Moustafa Hassan's PogoPlug Blogs</a> (make sure you check his "older post")<br />
<a href="http://fortysomethinggeek.blogspot.com/2013/03/pogoplug-archlinux-speed-testing-and.html">PogoPlug ArchLinux Speed Testing and Notes</a><br />
<a href="http://fortysomethinggeek.blogspot.com/2013/03/pogoplug-series-4-archlinux-review.html">PogoPlug Series 4 (ArchLinux) review</a><br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimAyJkjocJLDBICBxVdN8N2GjZSxFSvetuXCqsQc4o6Xid4lXf5s33s946773_saOvM5HX2F1XEkFcwybhfHQWbPhIfHbgdU6GU8S_e8FayvRT7Mkx-sd2ph6WpRxxVATB79n2CrFjYVoc/s1600/QUI_4747.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="425" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimAyJkjocJLDBICBxVdN8N2GjZSxFSvetuXCqsQc4o6Xid4lXf5s33s946773_saOvM5HX2F1XEkFcwybhfHQWbPhIfHbgdU6GU8S_e8FayvRT7Mkx-sd2ph6WpRxxVATB79n2CrFjYVoc/s640/QUI_4747.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Pogoplug Family Photo</td></tr>
</tbody></table>
<br /></div>
<div>
<div style="font-family: Tahoma; orphans: 2; text-align: -webkit-auto; widows: 2;">
</div>
</div>
</div>
Qui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.com462tag:blogger.com,1999:blog-1622307871085727432.post-45724769902896330462013-03-05T15:54:00.000-08:002015-02-24T20:18:13.587-08:00[Tutorial] Apple AirPrint on TomatoUSB Router<br />
In this tutorial, I'm going to show you how to setup Apple AirPrint Server on a router running TomatoUSB firmware. This will allow you to print from your iOS device (iPhone, iPod, iPad) to your non-AirPrint-enabled printer through your router. If you're familiar with AirPrint Activator or FingerPrint, this solution is similar, except you don't have to keep your power hungry MAC/PC running 24/7.<br />
<br />
Before I start, I want to give special thanks to @davygravy on the <a href="http://tomatousb.org/forum/t-573238/airprint-google-cloud-print-cups-working-and-here-is-how" target="_blank">TomatoUSB.org forum</a>. He was the one that ultimately made this all possible by compiling, re-compiling and fixing all the required packages.<br />
<br />
Another thing, if you're familiar with my <a href="http://blog.qnology.com/2012/12/tutorial-apple-airplay-on-tomatousb.html" target="_blank">Tutorial on Apple AirPlay on TomatoUSB Router</a>, these two tutorials (currently) are not compatible with each other. Meaning, you either go with AirPrint or AirPlay on your TomatoUSB Router, NOT BOTH. This is because the AirPrint tutorial uses Entware and this tutorial uses Optware, which isn't compatible with each other. Hopefully we're get this issue resolved in the near future.<br />
<br />
Note: this tutorial is a work in progress (but working). I'll be updating and flushing out the details as time permits. Please excuse the typos and bad grammar.<br />
<br />
<span style="font-family: inherit;">YMMV (<span style="background-color: white; line-height: 19px;">Your Mileage May Vary) depending on your Printer model.</span></span><br />
<br />
<h2>
<span style="font-family: inherit; font-size: large;">What you'll need:</span></h2>
<h3>
<ol>
<li><span style="font-weight: normal;">Router with TomatoUSB installed<span style="color: red;">*</span></span></li>
<li><span style="font-weight: normal;">USB Flash Drive >1GB (will be completely wiped)</span></li>
<li><span style="font-weight: normal;">USB or Wireless/Network Printer</span></li>
</ol>
<div>
<span style="font-weight: normal;"><span style="color: red;">* </span><span style="font-family: inherit; font-size: small;">If you're looking for a recommendation on a router for this project, please check this post - </span></span><span style="font-weight: normal;"><span style="font-family: inherit; font-size: small;"><a href="http://blog.qnology.com/2012/12/tutorial-apple-airplay-on-tomatousb.html" target="_blank">[Tutorial] Apple AirPlay on TomatoUSB Router</a>. You can pick up a router as low as $24.</span></span><br />
<span style="font-weight: normal;"><span style="font-family: inherit; font-size: small;"><br /></span></span></div>
</h3>
<h2>
<b><span style="font-family: inherit; font-size: large;">Outline of Steps:</span></b></h2>
<h3>
<ol>
<li><span style="font-weight: normal;"><span style="font-family: inherit;">Partition and Format USB Flash Drive<span style="color: red;">*</span></span></span></li>
<li><span style="font-family: inherit; font-weight: normal;">Install Optware</span></li>
<li><span style="font-family: inherit; font-weight: normal;">Download and Install Required Packages</span></li>
<li><span style="font-family: inherit; font-weight: normal;">Start CUPS and Configure Printer(s)</span></li>
<li><span style="font-family: inherit; font-weight: normal;">Generate AirPrint Service File</span></li>
<li><span style="font-family: inherit; font-weight: normal;">Startup DBus, Avahi and CUPS</span></li>
<li><span style="font-family: inherit; font-weight: normal;">Test Print</span></li>
<li><span style="font-family: inherit; font-weight: normal;">Configure the router so that everything works after a reboot</span></li>
<li><span style="font-family: inherit; font-weight: normal;">CloudPrint (Bonus Content)</span></li>
</ol>
</h3>
<span style="color: red;">*</span>Note that your USB Flash Drive will be completely wiped clean.<br />
<br />
<br />
<b>1) Partition and Format USB Drive:</b><br />
<br />
Plug in your USB drive and connect to your router via SSH (Putty) and execute the following commands:<br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">#Partition your usb flash drive </span><br />
<span style="font-family: Courier New, Courier, monospace;"> umount /dev/sda1</span><br />
<span style="font-family: Courier New, Courier, monospace;"> fdisk /dev/sda</span><br />
<br />
<span style="font-family: inherit;">Type in the following commands to create a primary partition on your USB Flash drive<br /># p # list current partitions<br /># o # to delete all partitions<br /># n # new partition<br /># p # primary partition<br /># 1 (one) # first partition<br /># <enter> # default start block<br /># <enter> # default end block #use the whole flash drive<br /># w # write new partition to disk</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />#format newly created partition<br /> #label disk as 'optware' case sensitive<br />umount /dev/sda1<br /> mke2fs -j -L optware /dev/sda1<br /><br />#mount partition as /opt</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">mount /dev/sda1 /opt</span><span style="font-family: Courier New, Courier, monospace;"><br /><br />#Make sure /opt is properly mounted on a reboot.<br />echo "LABEL=optware /opt ext2 defaults 1 1" >> /etc/fstab<br />nvram setfile2nvram /etc/fstab <br />nvram commit</span><br />
<div>
<div>
<br />
<span style="font-family: inherit;"><b>2) Install Optware</b></span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;"> #Install Optware from scratch. </span><br />
<span style="font-family: Courier New, Courier, monospace;">#Assumes drive is formated and mounted as /opt already</span><br />
<span style="font-family: Courier New, Courier, monospace;"> cd /tmp</span><br />
<span style="font-family: Courier New, Courier, monospace;"> wget http://tomatousb.org/local--files/tut:optware-installation/optware-install.sh -O - | tr -d '\r' > /tmp/optware-install.sh</span><br />
<span style="font-family: Courier New, Courier, monospace;"> chmod +x /tmp/optware-install.sh</span><br />
<span style="font-family: Courier New, Courier, monospace;"> sh /tmp/optware-install.sh</span><br />
<br />
<b><span style="font-family: inherit;">3) Download and Install Required Packages</span></b></div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br />#create a folder to store packages<br />mkdir -p /opt/ipkgs<br />cd /opt/ipkgs<br /><br />#install wget-ssl (for https)<br />ipkg install wget-ssl<br /><br /><br />#download packages. <br />#cut/paste this whole section<br /><br />/opt/bin/wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/dbus_1.2.16-2_mipsel.ipk<br />/opt/bin/wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/cups_1.5.4-1_mipsel.ipk</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">/opt/bin/wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/poppler_0.12.4-1_mipsel.ipk</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">/opt/bin/wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/py26-cups_1.9.62-1_mipsel.ipk</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">/opt/bin/wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/ghostscript_8.71-3_mipsel.ipk</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">/opt/bin/wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/hplip_3.11.7-1_mipsel.ipk</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">/opt/bin/wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/gutenprint_5.2.9-1_mipsel.ipk</span><br />
<span style="font-family: Courier New, Courier, monospace;">/opt/bin/wget http://dl.dropbox.com/u/42238/TomatoUSB/Optware/cups-driver-gutenprint_5.2.9-1_mipsel.ipk</span><br />
<span style="font-family: Courier New, Courier, monospace;">#install packages. this may take awhile. </span><br />
<span style="font-family: Courier New, Courier, monospace;">#cut/paste this whole section<br />ipkg install /opt/ipkgs/dbus_1.2.16-2_mipsel.ipk<br />ipkg install /opt/ipkgs/cups_1.5.4-1_mipsel.ipk<br />ipkg install /opt/ipkgs/poppler_0.12.4-1_mipsel.ipk</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">ipkg install /opt/ipkgs/py26-cups_1.9.62-1_mipsel.ipk</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">ipkg install /opt/ipkgs/ghostscript_8.71-3_mipsel.ipk</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">ipkg install /opt/ipkgs/gutenprint_5.2.9-1_mipsel.ipk</span><br />
<span style="font-family: Courier New, Courier, monospace;">ipkg install /opt/ipkgs/</span><span style="font-family: 'Courier New', Courier, monospace;">cups-driver-gutenprint_5.2.9-1_mipsel.ipk</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;"><br />#install hplip if you have a HP printer<br />#ipkg install /opt/ipkgs/hplip_3.11.7-1_mipsel.ipk</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#install splix for Samsung printers</span><br />
<span style="font-family: Courier New, Courier, monospace;">#ipkg install splix</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Color profiles for Samsung (untested)</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#cd /opt/share/cups/model/samsung</span><span style="font-family: Courier New, Courier, monospace;"><br />#wget http://splix.ap2c.org/samsung_cms.tar.bz2<br />#tar xvjf samsung_cms.tar.bz2<br />#rm samsung_cms.tar.bz2</span>
<br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<div>
<b>4) Start CUPS and Configure Printer(s)</b></div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#start cups</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cupsd</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: inherit;">Now open up your web browser and go to http://<RouterIPAddress>:631/admin (<a href="http://192.168.1.1:631/admin">http://192.168.1.1:631/admin</a>).</span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<div>
Click on "Manage Printers"->"hp990c"</div>
<div>
Administration->Delete Printer (this printer was accidentally included)</div>
<div>
If you're prompted for authentication, enter in root and your password.</div>
<div>
<br /></div>
<div>
Go back to Administration->Add Printer</div>
<div>
<br /></div>
<div>
In my case, I am using a Brother HL-2270DW which has built in wireless and supports various printing options - socket, ipp, http, etc. I'm going to use socket (AppSocket/HP JetDirect) which is the same option you would select if you had your USB printer directly connected to your router. <span style="font-family: inherit;">Make sure you enable "</span><span style="background-color: #fafafa;"><span style="font-family: inherit;">USB Printer Support" in the Tomato GUI if you're using a </span>USB<span style="font-family: inherit;"> attached printer.</span></span></div>
<div>
<br /></div>
<div>
<span style="font-family: inherit;">For my wireless printer, the Connection address I'm using is "socket://<PrinterIPAddress>:9100" ( for the record "<span style="background-color: white;">ipp://<PrinterIPAddress>/pcl_p1" would also work).</span></span></div>
<div>
<br /></div>
<div>
For a USB attached printer, the Connection address would be: "socket://<RouterIPAddress>:9100" (i.e., socket://192.168.1.1:9100)</div>
<div>
<br /></div>
<div>
Name your printer. Check the "Share This Printer" checkbox (not totally sure if this is required, but for now check it to be safe).</div>
<div>
<br /></div>
<div>
Select the Make/Model of your Printer. Basically you are selecting the drivers to use. For my Brother HL-2270DW, I went with "<span style="font-family: inherit;">Generic"->"<span style="background-color: white;">Generic PCL 6/PCL XL Printer</span>".</span></div>
<div>
<br /></div>
<div>
Click Add Printer.</div>
<div>
<br /></div>
<div>
Set your Default Options.<br />
<br />
Print a test page. Maintenance->Print Test Page.<br />
<br />
Printing a test page needs to work. If not, you can not continue. Not all printers will work. Try different drivers (or a different printer).</div>
<div>
<br /></div>
<div>
<b>5) Generate AirPrint Service File</b></div>
<div>
<b><br /></b></div>
<div>
Back in your SSH console session, execute the following:</div>
<div>
<br /></div>
<span style="font-family: Courier New, Courier, monospace;">#Stop CUPS<br />killall cupsd<br /><br />#create some needed mime types for AirPrint and iOS6<br />echo "image/urf urf string(0,UNIRAST<00>)" > /opt/share/cups/mime/airprint.types</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /> echo "image/urf application/pdf 100 pdftoraster" > /opt/share/cups/mime/airprint.convs<br /><br />#Start CUPS<br />cupsd<br /><br />#make airprint folder</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">mkdir -p /opt/airprint</span><br />
<span style="font-family: Courier New, Courier, monospace;"> cd /opt/airprint</span><br />
<br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">#Download airprint-generate.py</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#this is all one line</span></div>
<span style="font-family: 'Courier New', Courier, monospace;">/opt/bin/wget --no-check-certificate https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />#set the script to be executable<br />chmod 755 ./airprint-generate.py<br /><br />#Generate airprint service file<br />cd /opt/etc/avahi/services<br />python2.6 /opt/airprint/airprint-generate.py<br /><br />#There should be a<br />#AirPrint-<PrinterName>.service file listed<br />ls<br /><br />#Stop CUPS<br />killall cupsd</span><br />
<div>
<br />
<b>6) Startup DBus, Avahi (aka Bonjour) and CUPS</b><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Required for Avahi and dbus<br />#Ignore the warning<br />adduser avahi<br />addgroup netdev<br /><br />#delete orphan pid files in case they exist<br />rm /opt/var/run/dbus/pid</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">rm /opt/var/run/avahi-daemon/pid</span><span style="font-family: Courier New, Courier, monospace;"><br /><br /> #start dbus before avahi<br />/opt/etc/init.d/S20dbus start<br /><br />#start avahi (aka bonjour)<br />avahi-daemon -D<br /><br /> #Start CUPS<br />cupsd<br /><br />#verify that your printer is being advertise<br />avahi-browse --terminate --resolve _ipp._tcp</span><b><br /></b><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<b>7) Test Print</b><br />
<b><br /></b>
From your iPhone/iPad/iPod, do a test print.<br />
<b><br /></b>
<b><span style="font-family: inherit;">8) </span><span style="font-family: inherit;">Configure the router so that everything works after a reboot</span></b><br />
<br /></div>
<div>
<span style="font-family: inherit;">Go to USB and NAS -> USB Support (<a href="http://192.168.1.1/nas-usb.asp">http://192.168.1.1/nas-usb.asp</a>).</span><br />
<span style="font-family: inherit;">In the "Run after mounting" section add the following:</span><span style="font-family: inherit;"><br /></span><br />
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Required for avahi and dbus<br />adduser avahi<br />addgroup netdev<br /><br /> #delete orphan pid files in case they exist<br />rm /opt/var/run/dbus/pid</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">rm /opt/var/run/avahi-daemon/pid</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br />#start dbus before avahi<br />/opt/etc/init.d/S20dbus start<br /><br />#start avahi (aka bonjour)</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">avahi-daemon -D</span><span style="font-family: Courier New, Courier, monospace;"><br /><br /> #Start CUPS<br />cupsd</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">In the "Run before unmounting" section add the following:</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#run before unmounting</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">killall cupsd</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">avahi-daemon -k</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: 'Courier New', Courier, monospace;">/opt/etc/init.d/S20dbus stop</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<b>You're done. Enjoy!</b><br />
<br />
<b>9) Google CloudPrint (Bonus Content - Work In Progress)</b><br />
<span style="font-family: Courier New, Courier, monospace;"><br />ipkg install git<br />cd /opt</span><br />
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">
git clone git://github.com/armooo/cloudprint</span><span style="font-family: 'Courier New', Courier, monospace;"><br /></span><br />
<span style="font-family: 'Courier New', Courier, monospace;">cd /opt/cloudprint</span><br />
<span style="font-family: Courier New, Courier, monospace;">python2.6 setup.py build</span><br />
<span style="font-family: Courier New, Courier, monospace;">python2.6 setup.py install</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#Run once to create credential files</span><br />
<span style="font-family: Courier New, Courier, monospace;">#give it about a minute to start up<br />/opt/local/bin/cloudprint</span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#enter your google account email and password</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#Google username:</span><span style="font-family: Courier New, Courier, monospace;"></span><br />
<span style="font-family: Courier New, Courier, monospace;">#Password:</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
</div>
<div style="orphans: 2; text-align: -webkit-auto; widows: 2;">
<span style="font-family: Courier New, Courier, monospace;">#test print from your Chrome browser</span><br />
<span style="font-family: Courier New, Courier, monospace;">#Control+C to close cloudprint</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#copy your cloudprint authentication files to /opt</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp </span><span style="font-family: 'Courier New', Courier, monospace;">/tmp/home/root/.cloudprintauth /opt/cloudprint</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">cp /tmp/home/root/.cloudprintsaslauth /opt/cloudprint</span><br />
<div style="text-align: -webkit-auto;">
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: inherit;">To have cloudprint start automatically on reboot. Go to USB and NAS -> USB Support (<a href="http://192.168.1.1/nas-usb.asp">http://192.168.1.1/nas-usb.asp</a>). In the "Run after mounting" section add the following:</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#copy back cloudprint authentication files to /tmp</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/cloudprint/.cloudprintauth /tmp/home/root/ </span><br />
<div style="text-align: -webkit-auto;">
<span style="font-family: Courier New, Courier, monospace;">cp /opt/cloudprint/.cloudprintsaslauth /tmp/home/root/</span><br />
<span style="background-color: white;"><span style="font-family: Courier New, Courier, monospace;">/opt/local/bin/cloudprint &</span></span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
In the "Run before unmounting" section add the following:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">killall cloudprint</span><br />
<br /></div>
</div>
<span style="font-family: inherit;">Cloudprint is very fragile. If you're having start-up or</span><span style="font-family: inherit;"> printing issues try the following steps.</span><br />
<span style="font-family: inherit;"><br /></span>
- Clear your Google CloudPrint Print Queue - <a href="https://www.google.com/cloudprint/#jobs">https://www.google.com/cloudprint/#jobs</a><br />
- Delete your stored credential and reboot and start over.</div>
</div>
<div>
<br />
<span style="background-color: white;">One more thing regarding CloudPrint, my recommendation is to set up a new Google Account dedicated just for CloudPrint. Use this account for the above cloudprint login, and then share your printer(s) with your main account. I'm a little paranoid of having my email authentication stored on my router (even though its hashed or whatever).</span><br />
<span style="background-color: white;"><br /></span>
<span style="background-color: white;">If you get AirPrint working with your printer, please leave a comment with your printer model and drivers used. This will help other users. Thanks</span><br />
<span style="background-color: white;"><br /></span>
<span style="background-color: white;">Please leave a comment with any questions or feedback. Thanks</span><br />
<span style="background-color: white;"><br /></span>
<span style="background-color: white;"></span><br />
<span style="background-color: white;">[Update 4/9/2013] Please check out my PogoPlug Tutorial below. A PogoPlug running Arch Linux ARM is the perfect companion to your TomatoUSB Router. I highly recommend that you run AirPlay/AirPrint on the PogoPlug versus your TomatoUSB router.</span><br />
<span style="background-color: white;"><br /></span>
<span style="background-color: white; color: blue;"><b><a href="http://blog.qnology.com/2013/03/tutorial-pogoplug-e02-with-arch-linux.html" target="_blank">[Tutorial] - PogoPlug E02 with Arch Linux ARM - NAS (Samba4), AirPlay, AirPrint, Google CloudPrint</a></b></span><br />
<div>
<span style="background-color: white;"><br /></span></div>
</div>
</div>
</div>
</div>
</div>
Qui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.com230tag:blogger.com,1999:blog-1622307871085727432.post-3799013544197720422013-02-19T11:38:00.000-08:002015-01-06T09:52:46.234-08:00[Tutorial - 30 Minutes or Less] Site to Site VPN with TomatoUSB and OpenVPN<span style="font-family: inherit;">The intent of the tutorial is to provide you with the <u><b>quickest and least painful</b></u> step-by-step process for setting up a secure, yet simple, Site to Site VPN between two locations using TomatoUSB and OpenVPN, allowing resources to be accessed and shared from both locations (<span style="background-color: white; color: #222222; line-height: 18px;">resources behind the routers will be accessible to each other)</span>.</span><br />
<br />
A Site to Site VPN can be setup between your home and business, two office locations, or between family members. Some common use cases would be to share files, printers, provide technical support (RDP/VNC), view webcams (without opening webcam to the internet) and my favorite, as a mean for secure offsite backups.<br />
<br />
By going through this tutorial you'll also learn:<br />
- How to setup a Certificate Authority on your router and generate Certificates and Keys<br />
- Setup (free) Dynamic DNS<br />
- Setup cross site name resolution (static DNS host entries)<br />
- A little bit on expanding the setup to include Client to Site VPN<br />
- How to enable SFTP on your router for secure access to certificates and keys<br />
<br />
Last updated and verified on 3/3/2014<br />
<br />
Here's a video walk-through of the whole process (24 minutes!). Note that this video is a little dated and should only be used as a reference. This blog has the correct instructions:<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/QsaYzgOIn6w?rel=0" width="560"></iframe>
<b><span style="font-size: large;"><br /></span></b>
<b><span style="font-size: large;"><br /></span></b><br />
<b><span style="font-size: large;"><br /></span></b>
<b><span style="font-size: large;">What you'll need:</span></b><br />
<ol>
<li>Two routers with Tomato already installed.<span style="color: red;">*</span></li>
<ol>
<li>The OpenVPN Server router should be running TomatoUSB (with a USB port)</li>
<li>The OpenVPN Client router can run regular Tomato (no USB port required)</li>
</ol>
<li>USB Flash Drive >=1GB (<b>will be completely wiped</b>)</li>
<li>Publicly accessible IP address for OpenVPN Server router.</li>
</ol>
<span style="color: red;">* </span>If you're looking for a recommendation on which router to use for this project, please check out the Belkin routers I mention in this post, <a href="http://blog.qnology.com/2012/12/tutorial-apple-airplay-on-tomatousb.html" target="_blank">[Tutorial] Apple AirPlay on TomatoUSB Router</a>.<br />
<br />
<b><span style="font-size: large;">Outline of Steps</span></b><br />
<br />
1) Setup OpenVPN Server on Site A Router<br />
<ol>
</ol>
a) Setup Entware (package manager)<br />
b) Generate RSA Certificates and Keys<br />
<div>
c) Configure OpenVPN Server</div>
<div>
</div>
<div>
d) Setup Free Dynamic DNS Service</div>
<div>
e) Start OpenVPN Server</div>
<div>
<ol><ol>
</ol>
</ol>
2) Setup OpenVPN Client on Site B Router<br />
<br />
<div>
a) Configure OpenVPN Client<br />
<ol><ol>
</ol>
</ol>
3) Setup Cross Site Name Resolution [Added 10/19/2013]<br />
4) That's it! Enjoy.<br />
<br />
<b><span style="font-size: large;">Network Info</span></b><br />
<br />
<b>Site A</b><br />
OpenVPN Server<br />
Internal network/subnetmask - 192.168.<b>1</b>.0/255.255.255.0<br />
External Public IP Address<br />
<br />
<b><span style="color: #cc0000;">Site B</span></b><br />
<span style="color: #cc0000;"> OpenVPN Client</span><br />
<span style="color: #cc0000;"> Internal network/subnetmask - 192.168.<b>2</b>.0/255.255.255.0</span><br />
<span style="color: #cc0000;"> External Public IP Address</span><br />
<div>
<br /></div>
-------------------------------------------------------------------------------<br />
<b><span style="font-size: x-large;">LETS GET STARTED!</span></b><br />
<b><span style="font-size: large;"><br /></span></b>
<b><span style="font-size: large;">Setup OpenVPN Server on Site A Router</span></b><br />
<br />
Plug in USB flash drive. Make sure the router has internet access.<br />
Connect via SSH into router. For Windows, I recommend <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">Putty</a>.<br />
Log in with username of <i>root </i>and password of <i>admin</i>.<br />
<br />
Execute the following commands:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Partition your usb flash drive <br />umount /dev/sda1<br />fdisk /dev/sda</span><br />
<br />
<div style="background-color: white; text-align: -webkit-auto;">
<span style="font-family: inherit;">Type in the following commands to create a primary partition on your USB Flash drive</span><br />
<span style="font-family: inherit;"># p # list current partitions</span><br />
<span style="font-family: inherit;"># o # to delete all partitions</span><br />
<span style="font-family: inherit;"># n # new partition</span><br />
<span style="font-family: inherit;"># p # primary partition</span><br />
<span style="font-family: inherit;"># 1 (one) # first partition</span><br />
<span style="font-family: inherit;"># <enter> # default start block</span><br />
<span style="font-family: inherit;"># <enter> # default end block #use the whole flash drive</span><br />
<span style="font-family: inherit;"># w # write new partition to disk</span></div>
<span style="font-family: Courier New, Courier, monospace;"><br />#format newly created partition<br />#label disk as 'optware' case sensitive</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">umount /dev/sda1</span><span style="font-family: Courier New, Courier, monospace;"><br />mke2fs -j -L optware /dev/sda1</span><br />
<br />
<b>Install Entware (</b>a package manager that allows you to install additional software on your router)<br />
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#mount the new disk partition<br />mount /dev/sda1 /opt<br />cd /opt<br />wget http://wl500g-repo.googlecode.com/svn/ipkg/entware_install.sh<br />sh ./entware_install.sh</span><br />
<br />
<div style="background-color: white; line-height: 18px;">
<span style="font-family: Courier New, Courier, monospace;">#Make sure /opt is properly mounted on a reboot.</span></div>
<div style="background-color: white; line-height: 18px;">
<span style="font-family: Courier New, Courier, monospace;">echo "LABEL=optware /opt ext3 defaults 1 1" >> /etc/fstab</span></div>
<span style="font-family: Courier New, Courier, monospace;"><span style="background-color: white; line-height: 18px;">nvram setfile2nvram /etc/fstab </span></span><br />
<div style="background-color: white; line-height: 18px;">
<span style="font-family: Courier New, Courier, monospace;">nvram commit</span></div>
<br />
<br />
<b>Install openvpn-easy-rsa</b><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">opkg install openvpn-easy-rsa nano</span><br />
<b><br /></b>
<b>Setup working folder for openvpn-easy-rsa</b><br />
It's recommended that you cut/paste everything up to Setup CA section into your console window to prevent any error/typos<span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#copy files to working directory</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd /opt/etc/easy-rsa</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/sign-req .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/build-req .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/inherit-inter .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/revoke-full .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/clean-all .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/build-ca .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/pkitool .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/build-dh .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/build-key-pass .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/build-key-pkcs12 .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/list-crl .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/whichopensslcnf .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/build-key-server .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/build-key .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/etc/easy-rsa/openssl-1.0.0.cnf .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/build-inter .</span><br />
<span style="font-family: Courier New, Courier, monospace;">cp /opt/sbin/build-req-pass .</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#reduce key_size to 1024 in vars file</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd /opt/etc/easy-rsa</span><br />
<span style="font-family: Courier New, Courier, monospace;">sed -i 's:KEY_SIZE=2048:KEY_SIZE=1024:' ./vars</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#update PATH to pick up correct openssl (save a reboot)</span><br />
<span style="font-family: Courier New, Courier, monospace;">#correct = /opt/bin/openssl</span><br />
<span style="font-family: Courier New, Courier, monospace;">PATH=/opt/bin:$PATH</span></div>
<div>
<b><br /></b>
<b>Setup Certificate Authority (CA)</b><br />
<b><br /></b>
<span style="font-family: Courier New, Courier, monospace;">#Setup and initialize environment</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd /opt/etc/easy-rsa</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">source ./vars</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">./clean-all</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br />#Select Default for All, Keep Hitting <Enter> (8 times)<br />./build-ca</span><br />
<br />
<b>Generate Diffie Hellman parameters (DH file)</b><br />
<br />
<span style="font-family: Courier New, Courier, monospace;"> ./build-dh</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<b> Generate Certificate and Key for the OpenVPN Server router at Site A with Common Name [CN] of "OpenVPNServer".</b><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#Generate Cert/Key for Site2SiteClient</span><br />
<span style="font-family: Courier New, Courier, monospace;">#<Enter> 10 times to take default value</span><br />
<span style="font-family: Courier New, Courier, monospace;">#Followed by two 'y' <Enter> when asked to sign and commit</span><br />
<span style="font-family: Courier New, Courier, monospace;">./build-key-server OpenVPNServer</span><br />
<b><br /></b>
<b>Generate Certificate and Key for the OpenVPN Client router Site B with Common Name [CN] of "Site2SiteClient". </b><b>The "Common Name" isn't really "common". Make sure its unique for all your clients.</b><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Generate Cert/Key for Site2SiteClient</span><br />
<span style="font-family: Courier New, Courier, monospace;">#<Enter> 10 times to take default value</span><br />
<span style="font-family: Courier New, Courier, monospace;">#Followed by two 'y' <Enter> when asked to sign and commit</span><br />
<span style="font-family: Courier New, Courier, monospace;">./build-key Site2SiteClient</span><br />
<b><br />Output Certificate and Key to console - cut/paste into text file for later use.</b><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">cat </span><span style="font-family: 'Courier New', Courier, monospace;">/opt/etc/easy-rsa/keys</span><span style="font-family: 'Courier New', Courier, monospace;">/ca.crt</span><br />
<span style="font-family: Courier New, Courier, monospace;"> cat </span><span style="font-family: 'Courier New', Courier, monospace;">/opt/etc/easy-rsa/keys</span><span style="font-family: Courier New, Courier, monospace;">/</span><span style="font-family: 'Courier New', Courier, monospace;">Site2SiteClient</span><span style="font-family: Courier New, Courier, monospace;">.crt</span><br />
<span style="font-family: Courier New, Courier, monospace;"> cat </span><span style="font-family: 'Courier New', Courier, monospace;">/opt/etc/easy-rsa/keys</span><span style="font-family: Courier New, Courier, monospace;">/</span><span style="font-family: 'Courier New', Courier, monospace;">Site2SiteClient</span><span style="font-family: Courier New, Courier, monospace;">.key</span><br />
<br />
Create a new text file on your computer and name it "ClientRouterKeys.txt" and cut and paste in the output of the three cat commands above. You'll need this file to setup the OpenVPN Client Router later in the tutorial.<br />
<br />
That's it for the SSH Console. The rest of the configuration will be done via a web browser.<br />
<br />
<b>Configure OpenVPN Server</b></div>
<div>
<b><br /></b></div>
<div>
Open your favorite browser and connect to your router and go to VPN Tunneling -> OpenVPN Server (<a href="http://192.168.1.1/vpn-server.asp" target="_blank">http://192.168.1.1/vpn-server.asp</a>).<br />
<br />
On "Server 1 -> Basic" Tab, check "Start with WAN". Leave everything else as default.<br />
<br />
OpenVPN Server Configuration Server 1->Basic Screen should look like the following:<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhCQ_rNNmDNsxjyHArtkcxS8QoLySBurRwciyxBu18MfYA7AsTyx5wHEk7qz2q1iMzPKH8XU4n4ILeJmtZv5hviznhlwQtbS0KqzxFhFTlVwOzhMDx-Ocaem4wdND7kVrl4HCtVnNBu0UZ/s1600/VPN+Server+Basic+Config.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhCQ_rNNmDNsxjyHArtkcxS8QoLySBurRwciyxBu18MfYA7AsTyx5wHEk7qz2q1iMzPKH8XU4n4ILeJmtZv5hviznhlwQtbS0KqzxFhFTlVwOzhMDx-Ocaem4wdND7kVrl4HCtVnNBu0UZ/s320/VPN+Server+Basic+Config.PNG" height="248" width="320" /></a></div>
<br /></div>
<div>
<b><br /></b></div>
<div>
Change to the Advanced Tab</div>
<div>
<br /></div>
<div>
Check "Respond to DNS"</div>
<div>
Check "Manage Client-Specific Options"</div>
<div>
Check "Allow Client<->Client"</div>
<div>
Check "Enable"</div>
<div>
Type in "Site2SiteClient" under "Common Name"</div>
<div>
Type in "192.168.2.0" under Subnet</div>
<div>
Type in "255.255.255.0" under Netmask</div>
<div>
Check Push</div>
<div>
Click 'Add' button. (pushes routes to the client router and add route to server router. No need for router/iptable commands)</div>
<div>
In the "Custom Configuration" box, paste in the following (saves us from pasting in the certs/key in the Keys Tab and valuable nvram space):</div>
<div>
<br />
<span style="text-align: -webkit-auto;"><span style="font-family: Courier New, Courier, monospace;">ca </span></span><span style="font-family: 'Courier New', Courier, monospace;">/opt/etc/easy-rsa</span><span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;">/keys/ca.crt</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><span style="text-align: -webkit-auto;">cert </span></span><span style="font-family: 'Courier New', Courier, monospace;">/opt/etc/easy-rsa</span><span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;">/keys/OpenVPNServer.crt</span><br />
<span style="font-family: Courier New, Courier, monospace;"><span style="text-align: -webkit-auto;">key </span></span><span style="font-family: 'Courier New', Courier, monospace;">/opt/etc/easy-rsa</span><span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;">/keys/OpenVPNServer.key</span></div>
<div>
<span style="text-align: -webkit-auto;"><span style="font-family: Courier New, Courier, monospace;">dh </span></span><span style="font-family: 'Courier New', Courier, monospace;">/opt/etc/easy-rsa</span><span style="font-family: 'Courier New', Courier, monospace; text-align: -webkit-auto;">/keys/dh1024.pem</span></div>
<div>
<br /></div>
<div>
[Save]</div>
<div>
<br /></div>
<div>
OpenVPN Server Configuration Server 1->Advanced Screen should look like the following:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkf-9Ud4CawAq6gl794C6g6_B3OZhFJjmrpE-7VSGtKGQrhWWpqAX53_bmmjh2Dy74T0OqbYmhXuHZch8_PQUfl0uMhh3UTDKiSmIzRqiTAPEDDIhYkChsRy5yKy846t-PB4SFWsrc7xAF/s1600/OpenVPN+Server+Advance+Config.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkf-9Ud4CawAq6gl794C6g6_B3OZhFJjmrpE-7VSGtKGQrhWWpqAX53_bmmjh2Dy74T0OqbYmhXuHZch8_PQUfl0uMhh3UTDKiSmIzRqiTAPEDDIhYkChsRy5yKy846t-PB4SFWsrc7xAF/s640/OpenVPN+Server+Advance+Config.PNG" height="434" width="640" /></a></div>
<br />
<br /></div>
<div>
<br /></div>
<div>
<b>Setup Free Dynamic DNS Service (<a href="http://freedns.afraid.org/" target="_blank">http://freedns.afraid.org/</a>)</b><br />
<br />
If you don't have a public static IP (most don't), you'll need to setup DDNS so your OpenVPN client(s) can find your OpenVPN server.<br />
<br /></div>
<div>
Go to <a href="http://freedns.afraid.org/" target="_blank">http://freedns.afraid.org</a> and setup an account and then setup a subdomain.<br />
<br />
I'm using "OpenVPNServer.mooo.com" (use something else). We'll need this subdomain during the OpenVPN Client setup.<br />
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYotlecyAylNhGrBBbUSVe9v8A2sNlpeC3nZuu5E3nYUC0pO8Z6oQ2WR2CVBUBHPa2xCrl8jAwDDmxt4WgtGMXoNW2Wmif1lUwb36qP-DvQkkENh-SwuLhCldTw5hsVGuojc3N4kKvymyD/s1600/Add+subdomain.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYotlecyAylNhGrBBbUSVe9v8A2sNlpeC3nZuu5E3nYUC0pO8Z6oQ2WR2CVBUBHPa2xCrl8jAwDDmxt4WgtGMXoNW2Wmif1lUwb36qP-DvQkkENh-SwuLhCldTw5hsVGuojc3N4kKvymyD/s400/Add+subdomain.PNG" height="210" width="400" /></a></div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
On the left hand side, select "Dynamic DNS" or go to <a href="http://freedns.afraid.org/dynamic">http://freedns.afraid.org/dynamic</a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Find the subdomain you just created and right click on the "Direct URL" link and select "Copy link address"</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpCmKdG_KkA-7KGsoGrF2BfP3qtRy-iyNUN-hoTUdro9zymsAgdsROhsBezwNwqy4eZLlQIw1ay1D_y6glRpbuT7Lg8wWXMa55m0DqzLEjbBNKgTzcYuMHlSimwJ6mhXboH8kSiXLsKTBb/s1600/CopyDNSURL.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpCmKdG_KkA-7KGsoGrF2BfP3qtRy-iyNUN-hoTUdro9zymsAgdsROhsBezwNwqy4eZLlQIw1ay1D_y6glRpbuT7Lg8wWXMa55m0DqzLEjbBNKgTzcYuMHlSimwJ6mhXboH8kSiXLsKTBb/s640/CopyDNSURL.PNG" height="226" width="640" /></a></div>
<br />
On your router, go to Basic -> DDNS (<a href="http://192.168.1.1/basic-ddns.asp" target="_blank">http://192.168.1.1/basic-ddns.asp</a>)<br />
<br />
For Dynamic DNS 1, select "FreeDNS(afraid.org)" in the "Service" dropdown.<br />
Paste in the URL you copied in the previous step (note that the URL will change to a token)<br />
Check "Force next update"<br />
Change the "Auto refresh every" to 7 or something lower than 30.<br />
[Save]<br />
Last Result should say Update Successfully.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfoePcVQiHFCWR4dkntHs9T7RHaTEyaZigQabHdJY2gnHNmY1mA8bqDAFMLOm1kPKV2GI_5_huUV3k8G6O4y8LAY8KPfXcP0VohbULYtICJ-9dFC1ce1jyyGkRscknbOwXv2HAGotuibuv/s1600/DDNS.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfoePcVQiHFCWR4dkntHs9T7RHaTEyaZigQabHdJY2gnHNmY1mA8bqDAFMLOm1kPKV2GI_5_huUV3k8G6O4y8LAY8KPfXcP0VohbULYtICJ-9dFC1ce1jyyGkRscknbOwXv2HAGotuibuv/s640/DDNS.PNG" height="394" width="640" /></a></div>
<br />
<b><br /></b>
<b>Start OpenVPN Server</b><br />
<br />
Go to VPN Tunneling -> OpenVPN Server (<a href="http://192.168.1.1/vpn-server.asp" target="_blank">http://192.168.1.1/vpn-server.asp</a>).<br />
<br />
On "Server 1 -> Status" Tab, click the "Start Now" button. Give it a few seconds and click on the "Refresh Status" link.<br />
<br />
If you see the following, then the OpenVPN Server has started successfully. Congratulations we're almost there. Note that the button will change to "Stop Now". If the button remains as "Start Now", we have a problem. Go back and review the instructions.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxff01A1KstwE7v_mfXpxZyklnJcqXCj9Ouc1ID9GMOhyphenhyphenlBLUtJ2Czfrxly0Z0sJHpPM0_xkopEBF1nczPVI9TpiDw_v0QH65pHAxq2Mu083YutaVgYYd_5uvdfu2iBabekYTNUy3MACNB/s1600/OpenVPN+Server+Status+-+Before.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxff01A1KstwE7v_mfXpxZyklnJcqXCj9Ouc1ID9GMOhyphenhyphenlBLUtJ2Czfrxly0Z0sJHpPM0_xkopEBF1nczPVI9TpiDw_v0QH65pHAxq2Mu083YutaVgYYd_5uvdfu2iBabekYTNUy3MACNB/s640/OpenVPN+Server+Status+-+Before.PNG" height="231" width="640" /></a></div>
<br />
<br /></div>
<div>
Configuration of Site A Router is complete. Go ahead and reboot the router and verify that OpenVPN Server started properly.<br />
<br />
Let's move on to setting up your Site B Router.<br />
<br />
<b><span style="color: #e06666; font-size: large;">Setup OpenVPN Client on Site B Router</span></b><br />
<b><br /></b>
<b>Configure OpenVPN Client</b><br />
<br />
At Site B, open up your browser and go to VPN Tunneling -> OpenVPN Client (<a href="http://192.168.2.1/vpn-client.asp" target="_blank">http://192.168.2.1/vpn-client.asp</a>). Go to Client 1 -> Basic.<br />
<br />
Type in the Dynamic DNS address (subdomain) you setup for your Site A router in the "Server Address"<span style="font-family: inherit;"> field. In my example, </span><span style="background-color: white; font-family: inherit; line-height: 18px;"> </span><span style="background-color: white; line-height: 18px;"><span style="font-family: inherit;">"</span><i><span style="font-family: Courier New, Courier, monospace;">OpenVPNServer.mooo.com</span></i><span style="font-family: inherit;">"</span></span><br />
Uncheck the "Connect NAT on tunnel"<br />
Check "Start with WAN"<br />
[Save]<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDmLORtWGQpy6hWLx8va4YEkSw3BysK6R-N3S3Xbl67Rr3L4jMdi6zkx8eLhs2By60hTBUmihg3aifJL3ltsIjcIAHzB3i5DkFq_ZzFM4k5RmqFztAPOIGtmoerl2QMQDUmKNOtIj4gVFJ/s1600/VPN+Client+-+Basic2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDmLORtWGQpy6hWLx8va4YEkSw3BysK6R-N3S3Xbl67Rr3L4jMdi6zkx8eLhs2By60hTBUmihg3aifJL3ltsIjcIAHzB3i5DkFq_ZzFM4k5RmqFztAPOIGtmoerl2QMQDUmKNOtIj4gVFJ/s640/VPN+Client+-+Basic2.PNG" height="468" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
Nothing has to be changed on the Client 1 -> Advanced Tab<br />
<br />
Open up the Client 1 -> Keys Tab.<br />
<br />
Open up "ClientRouterKeys.txt" file you created earlier in the tutorial and cut/paste the certificates and key into the appropriate field.<br />
<br />
ca.crt in the Certificate Authority box<br />
Site2SiteClient.crt in the Client Certificate box<br />
Site2SiteClient.key in the Client Key box<br />
<br />
Don't forget to [Save].<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikqm1UgAVukLzNOgx9Jfs53yDlTSLcu84JHJkk3-UuhBJnMZTKQkWXgatOMK1B8cjGHXt-PIel4ZFu52IocGFMVY3jULp0VfGN5rKm_na0xrP1Swi2dXn3BSn-Wp6rWhkVYCASg9CcuRsa/s1600/VPN+Client+Keys1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikqm1UgAVukLzNOgx9Jfs53yDlTSLcu84JHJkk3-UuhBJnMZTKQkWXgatOMK1B8cjGHXt-PIel4ZFu52IocGFMVY3jULp0VfGN5rKm_na0xrP1Swi2dXn3BSn-Wp6rWhkVYCASg9CcuRsa/s640/VPN+Client+Keys1.PNG" height="264" width="640" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZVHZK6SqxKcDXqzyZMaXbL0rd6oLsinWkeKjN0OGdzsP6OClgXQqVq0rGrMNaMSG2xuAfRnl6I2KE9vgQNTYw0WInM7_Yc5MrtB6JwPEdZ2ZyfdtjxkZjl9kxMaoC1JWEuonMV-n0iRxy/s1600/VPN+Client+Keys2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZVHZK6SqxKcDXqzyZMaXbL0rd6oLsinWkeKjN0OGdzsP6OClgXQqVq0rGrMNaMSG2xuAfRnl6I2KE9vgQNTYw0WInM7_Yc5MrtB6JwPEdZ2ZyfdtjxkZjl9kxMaoC1JWEuonMV-n0iRxy/s640/VPN+Client+Keys2.PNG" height="304" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
Your done with the configuration. The moment of truth, on the Client 1 -> Status Tab, Click "Start Now"<br />
<br />
Wait a few seconds and click on the "Refresh Status" link. Hopefully you'll see some bytes in the Value column.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinSXA68thRprrGxNPAs7cnqX0YGT17pdQjGoiVCT2c4Qc33x8eg8piJII9PkQHZJhg-sccZ5sjHmtFXEAkDsOaiM9L2X_MFrp2CzVN-U79oXhcfcLevyu8ojK7yNEa7T55Ai_p0bFkJg1N/s1600/VPN+Client+-+Status.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinSXA68thRprrGxNPAs7cnqX0YGT17pdQjGoiVCT2c4Qc33x8eg8piJII9PkQHZJhg-sccZ5sjHmtFXEAkDsOaiM9L2X_MFrp2CzVN-U79oXhcfcLevyu8ojK7yNEa7T55Ai_p0bFkJg1N/s640/VPN+Client+-+Status.PNG" height="388" width="640" /></a></div>
<br />
<br />
From Site B, you should now be able to access Site A network resources and vice-versa.<br />
<br />
Lets give the VPN a quick test. Still connected to Site B, open up the OpenVPN Server Configuration page on your Site A router @ <a href="http://192.168.1.1/vpn-server.asp">http://192.168.1.1/vpn-server.asp</a>. Hopefully you can see a successfully status page like the one below:</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpt1-62pSOjgKw3mo2dRIXJppY8eWlPssLmL5zXLgLj3Q17GJGw5rLaancU-er7EYGHR-XcOFVGY2zwnrW4D9agzFPZPJMh2rpdgheLC2Grv443GmzXcTSurzPzZzMWBtktSS4xNMRKUOo/s1600/OpenVPN+Server+Status+-+Successfully+connection.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpt1-62pSOjgKw3mo2dRIXJppY8eWlPssLmL5zXLgLj3Q17GJGw5rLaancU-er7EYGHR-XcOFVGY2zwnrW4D9agzFPZPJMh2rpdgheLC2Grv443GmzXcTSurzPzZzMWBtktSS4xNMRKUOo/s640/OpenVPN+Server+Status+-+Successfully+connection.PNG" height="422" width="640" /></a></div>
<br />
<br />
<b>Cross Site Name Resolution</b><br />
<b><br /></b>
At this point your Site to Site VPN is setup, but you'll only able to access network resources via IP Addresses.<br />
<br />
To access network resources via a friendly name, you'll need to do two things:<br />
<br />
1) Setup static DHCP lease reservation for the network device (you don't want the IP address changing)<br />
- Go to Basic->Static DHCP/ARP/IPT<br />
2) On the opposite router, setup a static WINS/DNS entry for the same network device<br />
<br />
Go to Basic->Static DHCP/ARP/IPT. Typically the Static DHCP/ARP/IPT screen is for configuring static DHCP lease reservation, however you can use for static WINS/DNS entries also. The secret is to leave the MAC Address blank or with all zeros, "00:00:00:00:00".<br />
<br />
In the screenshot below, on SiteB, I've setup a static hostname of "SiteARouter" so that I can access it via the friendly name versus the IP Address (192.168.1.1). From SiteB, I'm now able to access SiteARouter via name. Configure static hostname entries for all network resources you want to access on both your VPN sites.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAoXmI9F1fxtSzZU_qPI2S4d3CusQQ2cJJaqUfMHKVQUq5_3m4crMrX4_wKrkq8SYeI5oF58GLJbYLtLg_iioQzMje3QLkeimsZQCbmVJ9-_Rv8-r-efFbvMj5c2riLWCD7lHJ0MJTu6Xx/s1600/Name+Resolution.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAoXmI9F1fxtSzZU_qPI2S4d3CusQQ2cJJaqUfMHKVQUq5_3m4crMrX4_wKrkq8SYeI5oF58GLJbYLtLg_iioQzMje3QLkeimsZQCbmVJ9-_Rv8-r-efFbvMj5c2riLWCD7lHJ0MJTu6Xx/s640/Name+Resolution.PNG" height="411" width="640" /></a></div>
<br />
<br />
<b>That's it!! Enjoy.</b><br />
<b><br /></b>
<b>Client to Site VPN</b><br />
<b><br /></b>
You should easily be able to add additional OpenVPN Clients (for Client to Site VPN) by generating additional RSA Certs/Key on your OpenVPN Server Router.</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Setup and initialize environment</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">PATH=/opt/bin:$PATH</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><br />
<span style="font-family: Courier New, Courier, monospace;">cd /opt/etc/easy-rsa</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">source ./vars</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">./build-key Zoe-Laptop</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">./build-key Landon-Laptop</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#Install SFTP</span><span style="font-family: 'Courier New', Courier, monospace;"> so you can securely access your keys</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#Location of keys = </span><span style="font-family: Courier New, Courier, monospace;">/opt/etc/easy-rsa/keys</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#Connect as root</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">opkg install openssh-sftp-server</span><br />
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#scp is another alternative method to access your keys</span><br />
<div>
<br /></div>
<a href="http://blog.qnology.com/2013/03/tutorial-centos-6-openvpn-client.html" target="_blank">[Tutorial] CentOS 6 OpenVPN Client - Connecting to Existing Site to Site VPN</a><br />
<br />
<b><span style="font-family: inherit;">Troubleshooting and FAQ:</span></b><br />
<br />
- <a href="https://www.youtube.com/watch?v=QsaYzgOIn6w" target="_blank">Watch my walk-through video</a><br />
- Make sure the time is correct on both routers (NTP is setup, watch video)<br />
- Check the logs<br />
- Restore Default Configuration and start fresh (backup your current config, just in case).<br />
Erase all data in NVRAM memory (thorough) @ http://192.168.1.1/admin-config.asp<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUn8eZAXQ191LEL8-IRyBtThWeylSOzxA1b-rbBVSfcUZM1PAcYFdTiMZShKaJHzTbfg3Z8t4zP2HSfWHZXYn1cYJmbs0m9DtzMW9EaGDuEg1SDnnBjHl2CbAGx0_OryO8KzS6de0QyTEF/s1600/Restore+Default+Configuration.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUn8eZAXQ191LEL8-IRyBtThWeylSOzxA1b-rbBVSfcUZM1PAcYFdTiMZShKaJHzTbfg3Z8t4zP2HSfWHZXYn1cYJmbs0m9DtzMW9EaGDuEg1SDnnBjHl2CbAGx0_OryO8KzS6de0QyTEF/s200/Restore+Default+Configuration.PNG" height="193" width="200" /></a></div>
<br />
<br />
<br />
<span style="font-family: inherit;">Special Thanks to Shibby for the excellent firmware, the Entware Team, and Wasaga Computer's for their <a href="http://www.wasagacomputers.com/home/2010/8/10/tutorial-site-to-site-vpn-using-tomato-firmware-and-openvpn.html" target="_blank">excellent blog</a> (which is the original tutorial I used to successfully setup my first Site to Site VPN using TomatoUSB).</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">If you have any issues, have any questions or notice any mistakes, please don't </span>hesitate<span style="font-family: inherit;"> to leave a comment. Your feedback will help me improve the tutorial and keep it up to date. Thank you.</span></div>
</div>
</div>
</div>
Qui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.com409tag:blogger.com,1999:blog-1622307871085727432.post-53475968579822693802012-12-06T10:38:00.000-08:002014-06-16T17:29:37.581-07:00[Tutorial] Apple AirPlay on TomatoUSB RouterHello and welcome to my first blog post.<br />
<br />
In this blog posting, I'm going to show you how to setup Apple AirPlay on a router running TomatoUSB firmware. This will allow you to stream music from your iOS device or iTunes to speakers plugged into your router over your wireless network.<br />
<br />
If you're not familiar with Apple AirPlay or TomatoUSB, here's a good <a href="http://www.crutchfield.com/S-i0ZvOXOhSU0/learn/blogs/av_tips/archive/2011/04/26/apple-airplay-what-you-need-to-know.aspx">introduction on AirPlay</a> and a link to the <a href="http://tomatousb.org/">TomatoUSB website</a>. I would go as far as saying, don't buy a router unless it's supported by TomatoUSB.<br />
<br />
First, lets talk about the router I'm using. It's a Belkin Share Max N300 Router (F7D3301/F7D7301). Here are some key things that makes this a great router in general and ideal for this project:<br />
<br />
1) TomatoUSB Supported<br />
2) 8MB Flash - allows you to run larger TomatoUSB builds (more features)<br />
3) 2 USB 2.0 Ports<br />
4) Gigabit Switch<br />
5) The price I paid for it - $22 shipped<br />
<br />
This router is very similar to the Asus RT-N16 (same chipset) minus the extra RAM, larger Flash and external antennas. The instructions below (not including the flashing instructions) will also work for the Asus RT-N16, Linksys E3000 and most modern router with USB Ports that is <a href="http://tomato.groov.pl/?page_id=69">supported by TomatoUSB</a> ('Yes' in either the K26 or K26RT-N columns and has USB ports).<br />
<div>
<br /></div>
Belkin Share Max N300 Router (F7D3301/F7D7301) Hardware Specs:<br />
<br />
<div>
Broadcom BCM4716 Rev1</div>
<div>
453 MHz CPU</div>
<div>
8 MB Flash</div>
<div>
64 MB RAM</div>
<div>
2x USB 2.0</div>
<div>
5 Ports Gigabit switch</div>
<div>
WPS Button<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0u0vPyHj1nrplr3_TYKVFBr_2b_9L7YW7BXJrlkBjDj5Mh8TxgywWnQCAwXprtrTJMK8wYHOthBhQ9-G5TFQ-PrxBMa90QGOROOUe9NXywdOkdx0v4a24vaqHusnKQq6R0LY_vx8IH_rz/s1600/belkin-share-max-n300-wireless-n-router-with-2-usb-ports-image-320w.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0u0vPyHj1nrplr3_TYKVFBr_2b_9L7YW7BXJrlkBjDj5Mh8TxgywWnQCAwXprtrTJMK8wYHOthBhQ9-G5TFQ-PrxBMa90QGOROOUe9NXywdOkdx0v4a24vaqHusnKQq6R0LY_vx8IH_rz/s200/belkin-share-max-n300-wireless-n-router-with-2-usb-ports-image-320w.jpg" height="200" width="155" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw8kriUeZvGG9dVtIwYshjrNhcLhJQAzkpQFR16bjmE1RxQQc1Nj-X0kvPM_epjKh0xbpg1ILBdF9pm5kVfw2pCLBjgb-Az5-DLR7NFlxmL6eMeT6bGx4kiEmtzaD2tcJF2OA-obrpZc40/s1600/belkin-share-max-n300-wireless-n-router-with-2-usb-ports-backviewimage-320w.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw8kriUeZvGG9dVtIwYshjrNhcLhJQAzkpQFR16bjmE1RxQQc1Nj-X0kvPM_epjKh0xbpg1ILBdF9pm5kVfw2pCLBjgb-Az5-DLR7NFlxmL6eMeT6bGx4kiEmtzaD2tcJF2OA-obrpZc40/s200/belkin-share-max-n300-wireless-n-router-with-2-usb-ports-backviewimage-320w.jpg" height="200" width="140" /></a></div>
<br />
<br />
<br />
<span style="font-family: inherit;">I believe this particular model may have been discontinued. However, the following replacement models will also work, which I would highly recommend (same TomatoUSB flashing instructions) if you don't already have a router for this project:</span><br />
<span style="font-family: inherit;"><br /></span>
<a href="http://www.amazon.com/dp/B004B1Z6EE/?tag=blogqnologyco-20" target="_blank">Belkin Share Max N300 (F7D3301/F7D7301) - 2 USB, Gigabit</a><br />
<span style="font-family: inherit;"></span>
<a href="http://www.amazon.com/dp/B0045HG53K/?tag=blogqnologyco-20" target="_blank"><span style="font-family: inherit;">Belkin Share N300 (F7D730<b style="text-decoration: underline;">2</b><b>) - </b>1 USB, No Gigabit </span></a><br />
<a href="http://www.amazon.com/dp/B0045HJME4/?tag=blogqnologyco-20" target="_blank"><span style="font-family: inherit;">Belkin Pla<span style="background-color: white;">y N600 (F7D<b><u>8</u></b>302) - Dual Band, 1 USB, No Gigabit </span></span></a><br />
<span style="background-color: white; font-family: inherit;">*<a href="http://www.amazon.com/dp/B0045HHTGW/?tag=blogqnologyco-20" target="_blank">Belkin Play N600 HD (F7D<b>8</b>301) - Dual Band, 2 USB, Gigabit</a></span><br />
<span style="color: #141414; font-family: inherit;"><span style="line-height: 17.99715805053711px;">*<a href="http://www.amazon.com/dp/B003CJTNLS/?tag=blogqnologyco-20" target="_blank">Belkin Wireless Play Max Router (F7D4301) - (Same as F7D8301) Dual Band, 2 USB, Gigabit</a></span></span><br />
<a href="http://www.amazon.com/dp/B003CJTNLI/?tag=blogqnologyco-20" target="_blank">Belkin Wireless Play Router (F7D4302) - (Same as F7D8302) Dual Band, 1 USB, No Gigabit</a><br />
<div>
<br /></div>
<div>
*Recommended (Best model), typically $30-40.</div>
<div>
<br /></div>
<span style="font-family: inherit;"><span style="background-color: white;">Go by the model number and not the name. On the models with only 1 USB port, </span></span>you'll need a USB hub because we need two USB ports - one for USB sound adapter or USB speakers and one for USB Flash drive or USB hard drive.</div>
<br />
<strong>Requirements</strong>:<br />
<ol>
<li>TomatoUSB Supported Router (with at least one USB Port)</li>
<li>USB Audio Adapter (USB DAC) - see below for some compatible ones</li>
<li> USB Flash Drive (>1GB) or USB Hard Drive. This tutorial will assume you're using a USB flash drive.</li>
<li>Speakers - computer speakers, your home stereo system, iPod/iPhone dock with aux in.</li>
</ol>
<div>
<b>Compatible/Recommended USB Sound Cards (Plug and Play)</b><br />
<ul>
<li><a href="http://www.amazon.com/dp/B001MSS6CS/?tag=blogqnologyco-20" style="font-family: inherit;">Syba SD-CM-UAUD USB Stereo Audio Adapter</a></li>
<li><a href="http://www.amazon.com/dp/B00C0P8XQQ/?tag=blogqnologyco-20" style="font-family: inherit;">ELE EL-D01 MINI HIFI USB PCM2704 DAC</a><span style="font-family: inherit;"> (This is what I'm using personally)</span></li>
<li><a href="http://www.amazon.com/dp/B000KW2YEI/?tag=blogqnologyco-20" style="font-family: inherit;">Behringer UCA202 Audio Interface</a></li>
<li><a href="http://www.amazon.com/dp/B0070UFMOW/?tag=blogqnologyco-20" target="_blank">Fiio E17 USB DAC Headphone Amplifier</a></li>
</ul>
Some additional USB DACs that I haven't tested personally, but should also work:<br />
<ul>
<li><a href="http://www.amazon.com/dp/B0036VO4X4/?tag=blogqnologyco-20" target="_blank">Turtle Beach Audio Advantage Micro II USB Analog & Digital Audio Adapter</a></li>
<li><a href="http://www.amazon.com/dp/B00882U782/?tag=blogqnologyco-20" target="_blank">AUDIOQUEST - DRAGONFLY USB DAC</a></li>
<li><a href="http://www.amazon.com/dp/B005D7SKWK/?tag=blogqnologyco-20" target="_blank">Topping TP30 Class T Digital Mini Amplifier with USB-DAC</a></li>
<li><a href="http://www.amazon.com/dp/B003Y5FRNS/?tag=blogqnologyco-20" target="_blank">Nuforce ICON-UDAC2-BLACK Headphone Amplifier and USB DAC</a></li>
</ul>
<strong><span style="font-size: large;">Outline of Steps:</span></strong><br />
<ol>
<li><span style="font-family: inherit;">Install TomatoUSB</span></li>
<li><span style="font-family: inherit;">Enable USB Support in Tomato</span></li>
<li><span style="font-family: inherit;">Install Entware</span></li>
<li><span style="font-family: inherit;">Install AirPlay (aka ShairPort) and other required packages</span></li>
<li><span style="font-family: inherit;">Configure the router so that everything works after a reboot</span></li>
<li><span style="font-family: inherit;">Enjoy some music</span></li>
</ol>
<br /></div>
<div>
<b>1) Install TomatoUSB</b><br />
<br />
<b>WARNING</b>: you can brick your router if you flash the wrong firmware.<br />
<br />
The flashing instructions below are specific to the Belkin routers I mentioned above. If you're using a different router, please use the appropriate tutorial/instructions for your particular model.<br />
<br />
To install TomatoUSB, we first flash the router with DD-WRT and then from DD-WRT update to TomatoUSB.<br />
<br />
a) Download DD-WRT Firmware<br />
b) Download TomataUSB Firmware<br />
c) Enable Recovery Mode on Router<br />
d) Access the 'CFE miniWeb Server' Page and Update Router with DD-WRT<br />
e) From DD-WRT Flash to TomatoUSB<br />
<b></b><br />
<br />
<b></b>
<br />
<div>
<b>1a) Download DD-WRT Firmware for your particular model (.bin file):</b></div>
<b>
</b>
<br />
<div>
</div>
<br />
<span style="font-family: inherit;">Belkin Share N300 (F7D7302)</span><br />
<a href="http://www.dd-wrt.com/dd-wrtv2/downloads/others/eko/V24-K26/svn18946/dd-wrt.v24-18946_NEWD-2_K2.6_mini_f7d7302.bin">http://www.dd-wrt.com/dd-wrtv2/downloads/others/eko/V24-K26/svn18946/dd-wrt.v24-18946_NEWD-2_K2.6_mini_f7d7302.bin</a><br />
<div>
<br /></div>
<span style="font-family: inherit;">Belkin Share Max N300 (</span>F7D3301/<span style="font-family: inherit;">F7D7301)</span><br />
<a href="http://dl.dropbox.com/u/42238/BelkinN300/dd-wrt.v24-15396_NEWD-2_K2.6_mini_f7d3301.bin">http://dl.dropbox.com/u/42238/BelkinN300/dd-wrt.v24-15396_NEWD-2_K2.6_mini_f7d3301.bin</a><br />
<div>
<br />
Belkin Play N600 (F7D4302/F7D8302)<br />
<a href="http://www.dd-wrt.com/dd-wrtv2/downloads/others/eko/V24-K26/svn18946/dd-wrt.v24-18946_NEWD-2_K2.6_mini_f7d8302.bin">http://www.dd-wrt.com/dd-wrtv2/downloads/others/eko/V24-K26/svn18946/dd-wrt.v24-18946_NEWD-2_K2.6_mini_f7d8302.bin</a></div>
<br />
<span style="font-family: inherit;"><span style="background-color: white;">Belkin Play N600 HD & </span></span>Belkin Wireless Play Max <span style="background-color: white; font-family: inherit;">(F7D4301/F7D8301)</span><br />
<a href="http://www.dd-wrt.com/dd-wrtv2/downloads/others/eko/V24-K26/svn18946/dd-wrt.v24-18946_NEWD-2_K2.6_mini.bin">http://www.dd-wrt.com/dd-wrtv2/downloads/others/eko/V24-K26/svn18946/dd-wrt.v24-18946_NEWD-2_K2.6_mini.bin</a></div>
<div>
<br /></div>
<div>
<b>1b) Download TomatoUSB Firmware (.trx file)</b></div>
<div>
<br />
For these Belkin Routers, I would recommend the latest Big-VPN version, or BT-VPN if you want BitTorrent Client built into the firmware. I'm going to be using build 108 of the Big-VPN in this tutorial.<br />
<br />
Download it here - <a href="http://tomato.groov.pl/download/K26/build5x-108-EN/tomato-K26USB-1.28.RT-MIPSR2-108-Big-VPN.trx">http://tomato.groov.pl/download/K26/build5x-108-EN/tomato-K26USB-1.28.RT-MIPSR2-108-Big-VPN.trx</a><br />
<br />
<b>1c) Enable Recovery Mode on Router</b><br />
<br />
Shortcut:<br />
1) Unplug the router. Hold down the reset button while plugging in the router. Let go of the reset button.<br />
<br />
If the shortcut doesn't work, try the long way.<br />
<br />
Long way (aka 30-30-30 reset):<br />
1) While the router is powered on press the reset button for 30 secs (do not let up on the reset button)<br />
2) Keeping the reset button pressed, unplug the power (do not let up on the reset button)<br />
3) Plug the power back in and wait for another 30 seconds (do not let up on the reset button)<br />
4) You can now let up on the reset button<br />
<br />
On the <span style="background-color: white;">Belkin Play N600 HD (F7D4301/F7D8301) model, try holding down the WPS button for 10 seconds while powering on the router.</span><br />
<span style="background-color: white;"><br /></span>
Also try the WPS instead of the reset button for the 30/30/30 reset, if you need to clear the NVRAM or having issues trying to get into the CFW Menu.<br />
<br />
<b>1d) Access the 'CFE miniWeb Server' Page and Update Router with DD-WRT firmware</b><br />
<br />
5) Plug your desktop/laptop into port 1, 2, 3 or 4 and set your IP Address to 192.168.2.8 with a gateway of 192.168.2.1<br />
6) Point your IE browser/Chrome (Do not use Firefox) to http://192.168.2.1 and CFE menu will be available.<span class="Apple-tab-span" style="white-space: pre;"> </span>If you're having issues connecting to the CFE menu, try setting your computer to 192.168.1.8 and point your browser at http://192.168.1.1<br />
7) Browse and Upload the dd-wrt .bin firmware file<br />
<br />
This is how the CFE Menu looks like:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvHHWchFtfqFmMUnofGxdWp4JmY6xOxqp_IKJjFjyYnWyImRZUN2U8bFcpPTHGjaTK5KHCUCtvxA35BDfhEUfctVW8syejxScI8R3bJr4z0pBI55VXXEJ0tcilXGJr-BY9Mof8q1EVHg2m/s1600/cfemenu.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvHHWchFtfqFmMUnofGxdWp4JmY6xOxqp_IKJjFjyYnWyImRZUN2U8bFcpPTHGjaTK5KHCUCtvxA35BDfhEUfctVW8syejxScI8R3bJr4z0pBI55VXXEJ0tcilXGJr-BY9Mof8q1EVHg2m/s400/cfemenu.jpg" height="183" width="400" /></a></div>
<br />
<br />
<b></b><br />
<b></b><br />
<b></b><br />
<div>
</div>
<b>
</b>
<br />
<div>
<b>1e) From DD-WRT flash to TomatoUSB</b></div>
<br />
8) Set network settings back to DHCP. It will take about 5 minutes to load DD-WRT. After about 5 minutes open a new tab on your browser and connect to http://192.168.1.1<br />
9) When logging into DD-WRT for the first time, it will prompt you to set a password. Set the password to something very simple like 'password'. (Only used temporary).<br />
10) Navigate to the firmware upload screen, Administration->Upgrade Firmware, and then load the TomatoUSB .trx firmware file (<a href="http://tomato.groov.pl/download/K26/build5x-108-EN/tomato-K26USB-1.28.RT-MIPSR2-108-Big-VPN.trx">tomato-K26USB-1.28.RT-MIPSR2-108-Big-VPN.trx</a>). Make sure to select the "Reset to Default Settings" after flashing.<br />
11) Connect to TomatoUSB @ http://192.168.1.1. Use admin/admin as username/password.<br />
<br />
At this point you should have TomatoUSB running on your router.<br />
<br />
<b>2) Enable USB Support in Tomato</b><br />
<br />
Connect to your TomatoUSB router (http://192.168.1.1). Log in with root/admin as the username/password and go to USB and NAS-> USB Support (http://192.168.1.1/nas-usb.asp).<br />
<br />
Make sure the following are checked, then click [SAVE]:.<br />
Core USB Support<br />
USB 2.0 Support<br />
USB 1.1 Support OHCI<br />
USB Storage Support<br />
Automount (we'll use this later)<br />
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw4ChIWFbdN7P78zDjnOfFDiQvcymupH-PYitAzGIcin1uCuO3yE34QPcl64FiQWS4O4rQ0PLoYeLvuGlNERIj0GeONIugiIY2A1U3ESqnvE7rNIVbIN7OmNmCGdlFQ4vcAgrO0-YGPCU2/s1600/Capture.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw4ChIWFbdN7P78zDjnOfFDiQvcymupH-PYitAzGIcin1uCuO3yE34QPcl64FiQWS4O4rQ0PLoYeLvuGlNERIj0GeONIugiIY2A1U3ESqnvE7rNIVbIN7OmNmCGdlFQ4vcAgrO0-YGPCU2/s320/Capture.JPG" height="184" width="320" /></a></div>
<br />
<br />
<br />
<h3>
<b>3) Install Entware (</b><span style="font-weight: normal;">a package manager that allows you to install additional software on your router)</span></h3>
<br />
Plug in your USB flash drive and USB Audio Adapter or USB Speakers. Note that your USB flash drive will be completely wiped.</div>
<div>
<br />
SSH (<a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">Putty</a>) into your router. Use the default username and password of root/admin.<br />
<br />
From here on, most of the work will be done via the console. Don't be afraid, you can cut/paste most of the commands. Note that the router needs to be connected to the internet because we will be downloading additional software.<br />
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Partition your usb flash drive</span><br />
<span style="font-family: Courier New, Courier, monospace;">umount /dev/sda1 </span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">fdisk /dev/sda</span><br />
<br />
<span style="font-family: inherit;"># Type in the following commands:</span><br />
<br />
<span style="font-family: inherit;"></span>
<br />
<div>
<span style="font-family: inherit;"># p # list current partitions</span></div>
<span style="font-family: inherit;">
</span>
<br />
<div>
<span style="font-family: inherit;"># o # to delete all partitions</span></div>
<span style="font-family: inherit;">
</span>
<br />
<div>
<span style="font-family: inherit;"># n # new partition</span></div>
<span style="font-family: inherit;">
</span>
<br />
<div>
<span style="font-family: inherit;"># p # primary partition</span></div>
<span style="font-family: inherit;">
</span>
<br />
<div>
<span style="font-family: inherit;"># 1 (one) # first partition</span></div>
<span style="font-family: inherit;">
</span>
<br />
<div>
<span style="font-family: inherit;"># <enter> # default start block</span></div>
<span style="font-family: inherit;">
</span>
<br />
<div>
<span style="font-family: inherit;"># <enter> # default end block #use the whole flash drive</span></div>
<span style="font-family: inherit;">
</span>
<br />
<div>
<span style="font-family: inherit;"># w # write new partition to disk</span></div>
<span style="font-family: inherit;">
</span>
<br />
<div>
</div>
<span style="font-family: Courier New, Courier, monospace;">#umount /dev/sda1 incase it was automounted</span><br />
<span style="font-family: Courier New, Courier, monospace;">umount /dev/sda1</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;"></span>
<span style="font-family: Courier New, Courier, monospace;">#format newly created partition</span><br />
<span style="font-family: Courier New, Courier, monospace;">#label disk as 'optware' case sensitive</span><br />
<span style="font-family: Courier New, Courier, monospace;">mke2fs -j -L optware /dev/sda1</span></div>
<div>
<br />
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#mount the new disk partition</span></div>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace;">mount /dev/sda1 /opt</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#Make sure /opt is properly mounted on a reboot.</span></div>
<span style="font-family: 'Courier New', Courier, monospace;">echo "LABEL=optware /opt ext3 defaults 1 1" >> /etc/fstab</span><span style="font-family: Courier New, Courier, monospace;"></span><br />
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">nvram setfile2nvram /etc/fstab </span></div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
</div>
<span style="font-family: 'Courier New', Courier, monospace;">nvram commit</span></div>
<div>
</div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#Install entware</span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">cd /opt</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#all one line</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget -O - http://entware.wl500g.info/binaries/entware/installer/entware_install.sh | sh<br /></span><span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<h3>
<b>4) Install ShairPort (aka AirPlay) and other required packages</b></h3>
<span style="font-family: 'Courier New', Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">#download and install </span><span style="font-family: 'Courier New', Courier, monospace;">shairport</span></div>
<span style="font-family: Courier New, Courier, monospace;">cd /tmp</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget http://dl.dropbox.com/u/42238/entware/shairport_0.05-20121002-1_entware.ipk</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">opkg install </span><span style="font-family: 'Courier New', Courier, monospace;">shairport_0.05-20121002-1_entware.ipk</span><br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">#install dbus, avahi (aka bonjour), </span><br />
<span style="font-family: 'Courier New', Courier, monospace;">opkg install dbus avahi-daemon avahi-utils</span></div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#download extra kernel modules</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cd /tmp</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">wget http://tomato.groov.pl/download/K26/build5x-108-EN/extras-mips2.tar.gz</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">mkdir /opt/extras</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cd /opt/extras</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">tar xvzf /tmp/extras-mips2.tar.gz</span></div>
<div>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#load sound modules</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/soundcore</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-hwdep</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-page-alloc</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-timer</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-pcm</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-seq-device</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-seq</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-rawmidi</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-seq-midi-event</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-seq-midi</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-mixer-oss</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-pcm-oss</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-usb-lib</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-usb-audio</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/input-core</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/hid</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/usbhid</span></div>
<div>
<br />
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#Lets do a quick test to verify that sound is working</span></div>
<span style="font-family: Courier New, Courier, monospace;">#WARNING, may be loud</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">opkg install madplay</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">wget -O - http://ca.ah.fm:9000 | madplay -</span><span style="font-family: Courier New, Courier, monospace;"></span><br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">#Got sound? Good. Lets continue.</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#Control+C to break and stop music</span><span style="font-family: Courier New, Courier, monospace;"></span><br />
<div>
</div>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#required to start avahi-daemon</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">echo "nogroup:x:2:" >> /tmp/etc/group</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">echo "nogroup:x:2:2:avahi daemon:/opt/sbin/avahi-daemon:/bin/false" >> /tmp/etc/passwd</span></div>
<div>
<br />
<span style="font-family: Courier New, Courier, monospace;">#delete orphan pid files in case they exist</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">#rm /opt/var/run/dbus/pid</span><span style="font-family: Courier New, Courier, monospace;"></span><br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">rm /opt/var/run/dbus.pid</span><span style="font-family: Courier New, Courier, monospace;"></span></div>
<span style="font-family: 'Courier New', Courier, monospace;">rm /opt/var/run/avahi-daemon/pid</span><span style="font-family: Courier New, Courier, monospace;"></span><br />
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
</div>
</div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;">#start dbus first before avahi</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">/opt/etc/init.d/S20dbus start</span></div>
<div>
<br />
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#start avahi-daemon</span></div>
<span style="font-family: Courier New, Courier, monospace;">avahi-daemon -D</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"></span><br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">#starts shairport </span></div>
</div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">shairport -a "Living Room" -b 282 -d</span></div>
<div>
<br />
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#Test playing some music </span><span style="font-family: 'Courier New', Courier, monospace;">from your </span></div>
<span style="font-family: 'Courier New', Courier, monospace;">#iOS device or iTunes via AirPlay</span><br />
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#to stop shairport, avahi and dbus</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">killall shairport</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">avahi-daemon -k</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">/opt/etc/init.d/S20dbus stop</span></div>
<div>
<br />
<h3>
<b>5) Configure the router so that everything works after a reboot:</b></h3>
<br />
Go to USB and NAS -> USB Support (http://192.168.1.1/nas-usb.asp).</div>
<div>
<br /></div>
<div>
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH1cMkxgrYKYsKOD-CxgblxffMfIK9pA98SyXyxFv1JIqpyEhHLc1jUAV1OviMCe4fOKmDl1EOpyfbUk5qANaRsmlrN9BNW1xqgzzJ1fALaJNKRyCmXwokPqPABLhwYGoM21e-PAZZ8c7o/s1600/Capture3.JPG" /><br />
<br />
In the "Run after mounting" section add the following:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">#load sound modules</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/soundcore</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-hwdep</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-page-alloc</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-timer</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-pcm</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-seq-device</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-seq</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-rawmidi</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-seq-midi-event</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-seq-midi</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-mixer-oss</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-pcm-oss</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-usb-lib</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/snd-usb-audio</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/input-core</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/hid</span><br />
<span style="font-family: Courier New, Courier, monospace;">insmod /opt/extras/usbhid</span><br />
<span style="font-family: Courier New, Courier, monospace;"></span><br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#required to start avahi-daemon</span></div>
<span style="font-family: Courier New, Courier, monospace;">echo "nogroup:x:2:" >> /tmp/etc/group</span><br />
<span style="font-family: Courier New, Courier, monospace;">echo "nogroup:x:2:2:avahi daemon:/opt/sbin/avahi-daemon:/bin/false" >> /tmp/etc/passwd</span><br />
<span style="font-family: Courier New, Courier, monospace;"></span><br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">#delete orphan pid files in case they exist</span><span style="font-family: Courier New, Courier, monospace;"></span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">#rm /opt/var/run/dbus/pid</span><span style="font-family: Courier New, Courier, monospace;"></span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">rm /opt/var/run/dbus.pid</span><span style="font-family: Courier New, Courier, monospace;"></span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;">rm /opt/var/run/avahi-daemon/pid</span><span style="font-family: Courier New, Courier, monospace;"></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">#start dbus first before avahi</span></div>
<span style="font-family: Courier New, Courier, monospace;">/opt/etc/init.d/S20dbus start</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#start avahi-daemon</span></div>
<span style="font-family: Courier New, Courier, monospace;">avahi-daemon -D</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#start shairport </span></div>
<span style="font-family: Courier New, Courier, monospace;">shairport -a "Living Room" -b 282 -d</span><br />
<br />
In the "Run before unmounting" section add the following:<br />
<br />
<span style="font-family: 'Courier New', Courier, monospace;">#run before umount</span><br />
<span style="font-family: Courier New, Courier, monospace;">killall shairport</span><br />
<span style="font-family: Courier New, Courier, monospace;">avahi-daemon -k</span><br />
<span style="font-family: Courier New, Courier, monospace;">/opt/etc/init.d/S20dbus stop</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<h3>
<b><b>6) Enjoy some music</b> </b></h3>
On your iOS Device or iTunes, play some music and look for the AirPlay icon.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheqEitqa09Fw0EjMK0HljjMq0VbPhnZWukeeW1ReMhZKZKsBCyzd9l3hpnMvVeSEEtzKWYrvjOq5DAhRh56roZ-T51G6FXC9Uhan6NmJRF5qq_S_MAZgRTnq4Dz3AhiMfpO3zFHqYYvdLJ/s1600/iphone-airplay-enable.jpg" imageanchor="1" style="clear: left; display: inline !important; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheqEitqa09Fw0EjMK0HljjMq0VbPhnZWukeeW1ReMhZKZKsBCyzd9l3hpnMvVeSEEtzKWYrvjOq5DAhRh56roZ-T51G6FXC9Uhan6NmJRF5qq_S_MAZgRTnq4Dz3AhiMfpO3zFHqYYvdLJ/s320/iphone-airplay-enable.jpg" height="320" width="245" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWCglqjY8CGYDzYmXgqaSPqOmXjYvQQEkf2R1NDIN6QUD_QGovgIhK8Q4x1-ENMqMmsrLXoeZS7rNyz_YEHl7qZG1pmWRojuJHPnn-kZksaMGtQFFIAzMwkLNJVQw6-9IR9PxFZe3gezMc/s1600/airplay_icon.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWCglqjY8CGYDzYmXgqaSPqOmXjYvQQEkf2R1NDIN6QUD_QGovgIhK8Q4x1-ENMqMmsrLXoeZS7rNyz_YEHl7qZG1pmWRojuJHPnn-kZksaMGtQFFIAzMwkLNJVQw6-9IR9PxFZe3gezMc/s320/airplay_icon.jpg" height="202" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN0f29OetwAnn1lMMi5sQ0BSGd1N_BNGLcOYyucJJ6VngYqbim3BV_pKdEqkEiKEhBd-CHWSVabYgfYRTzZ2e0vhmURb5V0Xldr6SsCBgiePhBSJchmliF9nBoj32nYlcWH0ECVb1SZZ6m/s1600/airplay-select-cjr.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><br /></div>
<br />
You should now see "Living Room" as one of your AirPlay options<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN0f29OetwAnn1lMMi5sQ0BSGd1N_BNGLcOYyucJJ6VngYqbim3BV_pKdEqkEiKEhBd-CHWSVabYgfYRTzZ2e0vhmURb5V0Xldr6SsCBgiePhBSJchmliF9nBoj32nYlcWH0ECVb1SZZ6m/s1600/airplay-select-cjr.jpg"></a><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN0f29OetwAnn1lMMi5sQ0BSGd1N_BNGLcOYyucJJ6VngYqbim3BV_pKdEqkEiKEhBd-CHWSVabYgfYRTzZ2e0vhmURb5V0Xldr6SsCBgiePhBSJchmliF9nBoj32nYlcWH0ECVb1SZZ6m/s1600/airplay-select-cjr.jpg">
</a>
<br />
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN0f29OetwAnn1lMMi5sQ0BSGd1N_BNGLcOYyucJJ6VngYqbim3BV_pKdEqkEiKEhBd-CHWSVabYgfYRTzZ2e0vhmURb5V0Xldr6SsCBgiePhBSJchmliF9nBoj32nYlcWH0ECVb1SZZ6m/s1600/airplay-select-cjr.jpg"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN0f29OetwAnn1lMMi5sQ0BSGd1N_BNGLcOYyucJJ6VngYqbim3BV_pKdEqkEiKEhBd-CHWSVabYgfYRTzZ2e0vhmURb5V0Xldr6SsCBgiePhBSJchmliF9nBoj32nYlcWH0ECVb1SZZ6m/s1600/airplay-select-cjr.jpg" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN0f29OetwAnn1lMMi5sQ0BSGd1N_BNGLcOYyucJJ6VngYqbim3BV_pKdEqkEiKEhBd-CHWSVabYgfYRTzZ2e0vhmURb5V0Xldr6SsCBgiePhBSJchmliF9nBoj32nYlcWH0ECVb1SZZ6m/s1600/airplay-select-cjr.jpg"></a> </div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN0f29OetwAnn1lMMi5sQ0BSGd1N_BNGLcOYyucJJ6VngYqbim3BV_pKdEqkEiKEhBd-CHWSVabYgfYRTzZ2e0vhmURb5V0Xldr6SsCBgiePhBSJchmliF9nBoj32nYlcWH0ECVb1SZZ6m/s1600/airplay-select-cjr.jpg"></a><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN0f29OetwAnn1lMMi5sQ0BSGd1N_BNGLcOYyucJJ6VngYqbim3BV_pKdEqkEiKEhBd-CHWSVabYgfYRTzZ2e0vhmURb5V0Xldr6SsCBgiePhBSJchmliF9nBoj32nYlcWH0ECVb1SZZ6m/s1600/airplay-select-cjr.jpg"></a><br />
<div>
You're done!</div>
<h3>
Addendum - Adjusting the Volume</h3>
<span style="font-family: 'Courier New', Courier, monospace;">#install alsa-utils</span><br />
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">opkg install alsa-utils</span></div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
</div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#link the correct sound device</span></div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">mkdir /dev/snd</span></div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">ln -s /dev/controlC0 /dev/snd/controlC0</span></div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
</div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#required for amixer</span></div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">echo "audio:x:3:" >> /tmp/etc/group</span></div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
</div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">#Check the mixer name. "PCM" in my case</span></div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<div>
<span style="font-family: Courier New, Courier, monospace;">#Could be "Speaker"</span></div>
<span style="font-family: Courier New, Courier, monospace;">
<div>
amixer</div>
<div>
</div>
<div>
#Simple mixer control 'PCM',0</div>
<div>
# Capabilities: pvolume pswitch pswitch-joined penum</div>
<div>
# Playback channels: Front Left - Front Right</div>
<div>
# Limits: Playback 0 - 128</div>
<div>
# Mono:</div>
<div>
# Front Left: Playback 128 [100%] [0.00dB] [on]</div>
<div>
# Front Right: Playback 128 [100%] [0.00dB] [on]</div>
<div>
</div>
<div>
#adjust volume to 70% or whatever is appropriate</div>
<div>
#as low as 7% for earbuds/headphones </div>
<div>
amixer set PCM 70% </div>
<div>
</div>
<div>
#Simple mixer control 'PCM',0</div>
<div>
# Capabilities: pvolume pswitch pswitch-joined penum</div>
<div>
# Playback channels: Front Left - Front Right</div>
<div>
# Limits: Playback 0 - 128</div>
<div>
# Mono:</div>
<div>
# Front Left: Playback 90 [70%] [-38.00dB] [on]</div>
<div>
# Front Right: Playback 90 [70%] [-38.00dB] [on]</div>
<div>
</div>
<div>
#To make the volume stick after a reboot</div>
</span><br />
<div>
</div>
<span style="font-family: 'Courier New', Courier, monospace;">#Add the two commands to the run after mounting section</span><span style="font-family: Courier New, Courier, monospace;"></span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;"></span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">mkdir /dev/snd</span></div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: 'Courier New', Courier, monospace;">ln -s /dev/controlC0 /dev/snd/controlC0</span><span style="font-family: Courier New, Courier, monospace;"></span></div>
<br />
<span style="font-family: Courier New, Courier, monospace;"></span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">echo "audio:x:3:" >> /tmp/etc/group</span></div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
<span style="font-family: Courier New, Courier, monospace;">amixer set PCM 70%</span></div>
<span style="font-family: Courier New, Courier, monospace;">
</span>
<br />
<div>
</div>
<br />
-------------------------</div>
<div>
<br />
My personal awesome sounding DIY AirPlay setup for around $100 consist of the following:<br />
<div>
<br /></div>
- <a href="http://www.amazon.com/dp/B0049P6OTI/?tag=blogqnologyco-20" target="_blank">LP-2020A+ Lepai Tripath Class Amplifier ($20 - Highly Recommended)</a></div>
<div>
- Pioneer SP-BS21-LR Bookshelf (discontinued - <a href="http://www.amazon.com/gp/bestsellers/electronics/3236451011/?tag=blogqnologyco-20" target="_blank">Here are some alternatives</a>)<br />
<br />
Special thanks to the Entware developers/maintainers. Entware is a replacement of <a href="http://en.wikipedia.org/wiki/Optware">optware</a>. Please check them out -<a href="http://code.google.com/p/wl500g-repo/wiki/Goal"> http://code.google.com/p/wl500g-repo/wiki/Goal</a>.</div>
<div>
<br />
Please leave some feedback in the comments and let me know if you run into any issues. Questions welcomed.<br />
<br />
[Update 3/6/2013] Just got AirPrint working on TomatoUSB also. Check out the tutorial below. Sorry, at this time, AirPlay and AirPrint are not compatible with each other. The AirPrint solution uses, Optware which isn't compatible with Entware. Hopefully we'll resolve it soon.<br />
<br />
<span style="color: #0000ee; font-weight: bold; text-decoration: underline;"><a href="http://blog.qnology.com/2013/03/tutorial-apple-airprint-on-tomatousb.html" target="_blank">[Tutorial] Apple AirPrint on TomatoUSB Router</a></span><br />
<br />
[Update 4/9/2013] Please check out my PogoPlug Tutorial below. A PogoPlug running Arch Linux ARM is the perfect companion to your TomatoUSB Router. I highly recommend that you run AirPlay/AirPrint on the PogoPlug versus your TomatoUSB router.<br />
<br />
<b><a href="http://blog.qnology.com/2013/03/tutorial-pogoplug-e02-with-arch-linux.html" target="_blank"><span style="color: blue;">[Tutorial] - PogoPlug E02 with Arch Linux ARM - NAS (Samba4), AirPlay, AirPrint, Google CloudPrint</span></a></b></div>
</div>
Qui Honghttp://www.blogger.com/profile/04077661669160293260noreply@blogger.com111