Wednesday, November 26, 2014

Debian on Pogoplug Tutorial - Webmin Installation

This is a continuation of my Hacking the Pogoplug v4 (Series 4 and Mobile) with Linux (Debian or Arch) Tutorial.




Webmin Installation


#Install required packages
apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python

#downloand and install webmin
cd /tmp
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.720_all.deb
dpkg --install webmin_1.720_all.deb


#Webmin will automatically start on boot up.
#To stop Webmin from starting at bootup
update-rc.d -f webmin remove

#Auto Start Webmin on Boot
update-rc.d webmin defaults



Access Webmin @ https://IPAddress:10000

Reference: http://www.webmin.com/deb.html

Debian on Pogoplug Tutorial - MJPG-Streamer (WebCam) Installation

This is a continuation of my Hacking the Pogoplug v4 (Series 4 and Mobile) with Linux (Debian or Arch) Tutorial.



Tested WebCams:

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.

MJPG-Streamer Installation

#Install required packages
apt-get install unzip subversion libv4l-dev libjpeg8-dev imagemagick build-essential psmisc

#build mjpg-streamer
mkdir /tmpbuild
cd /tmpbuild
wget http://sourceforge.net/code-snapshots/svn/m/mj/mjpg-streamer/code/mjpg-streamer-code-182.zip
unzip mjpg-streamer-code-182.zip
cd mjpg-streamer-code-182/mjpg-streamer
make
make install
cd /
rm -rf /tmpbuild

#Test - start mjpg_streamer on port 8088
#http://ipaddress:8088
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"

#Download service file for auto start on bootup
cd /etc/init.d
wget --no-check-certificate https://dl.dropboxusercontent.com/u/42238/pogoplug/debian/mjpg_streamerd
chmod +x mjpg_streamerd
update-rc.d mjpg_streamerd defaults


Motion (webcam security software) installation and configuration to come in another tutorial

Debian on Pogoplug Tutorial - Wireless Configuration

This is a continuation of my Hacking the Pogoplug v4 (Series 4 and Mobile) with Linux (Debian or Arch) Tutorial.



Tested Wi-Fi Adapters:

Wi-Fi Configuration for Debian on Pogoplug


#Add "non-free" repo
echo "deb http://http.debian.net/debian/ wheezy main contrib non-free">>/etc/apt/sources.list


#Update repo
apt-get update

#Install required Wi-Fi packages and common non-free Wi-Fi adapter firmware
apt-get install wireless-tools wpasupplicant usbutils firmware-ralink firmware-realtek firmware-atheros

#Bring up Wi-Fi adapter. If you get an error, try rebooting.
ifconfig wlan0 up

#Scan available Wi-Fi networks
iwlist wlan0 scanning

#Update interfaces file with Wi-Fi configuration
nano /etc/network/interfaces

#Add the following to the end of the /etc/network/interfaces file
#Update "YourWiFiNetworkName" and "YourWiFiPassword" with appropriate values.


#/etc/network/interfaces
#auto wlan0
#iface wlan0 inet dhcp
#   wpa-ssid "YourWiFiNetworkName"
#   wpa-psk "YourWiFiPassword"



#Restart Networking Service
/etc/init.d/networking restart

#Check if Wi-Fi configuration successful
#Note the IP Address assigned to wlan0
ifconfig

At this point, you should be able to reboot and unplug the Ethernet network cable from the Pogoplug.

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.

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.

Reference: https://wiki.debian.org/rtl819x#Debian_7_.22Wheezy.22