RPI‎ > ‎

2014-Archive

  

Raspbian

Debian Wheezy

See details below
  

Arch Linux

A lightweight Linux distribution

Next page -> Here 





0) - the start ... 
Toys from element14. 


set-up of the hardware, had to recrimp a 40 way ribbon cable to get the GPIO pins outside the box. 






2) Keep your device updated

pi@pibplus ~ $ sudo apt-get update


and then



Option 2
or similiar https://brmlab.cz/user/jenda/raspberry-packages (take care this is extreme ) - you should end with about a 600MB usage

I went with Option 1

Clean-ups some space - remove all the desktop stuff 

pi@pibplus ~ $ sudo apt-get purge xserver.* x11.* xarchiver xauth xkb-data console-setup xinit lightdm lxde.* python-tk python3-tk scratch gtk.* libgtk.* openbox libxt.* lxpanel gnome.* libqt.* libxcb.* libxfont.* lxmenu.* gvfs.* xdg-.* desktop.* tcl.* shared-mime-info penguinspuzzle omxplayer gsfonts



While doing the IO, I was drawing 230-250mA

pi@pibplus ~ $ sudo apt-get --yes autoremove

and then a last 

pi@pibplus ~ $ sudo apt-get upgrade

reboot
pi@pibplus ~ $ sudo init 6




4) Installing RPI-Monitor

I like rpi-monitor, sensible and easy adding of rrd graphs. 


pi@pibplus ~ $ sudo apt-get install apt-transport-https ca-certificates

pi@pibplus ~ $ sudo wget http://goo.gl/rsel0F -O /etc/apt/sources.list.d/rpimonitor.list

pi@pibplus ~ $ sudo apt-get update
pi@pibplus ~ $ sudo apt-get install rpimonitor


access on port 8888



7) Wifi installation .. 

current method for slaves are documented here 

below some note from past configs 

pi@pibplus ~ $ lsmod
Module                  Size  Used by
8192cu                550797  0
snd_bcm2835            19584  0
snd_soc_bcm2708_i2s     6202  0
regmap_mmio             2818  1 snd_soc_bcm2708_i2s
snd_soc_core          127841  1 snd_soc_bcm2708_i2s
snd_compress            8259  1 snd_soc_core
regmap_i2c              1661  1 snd_soc_core
snd_pcm_dmaengine       5505  1 snd_soc_core
regmap_spi              1913  1 snd_soc_core
snd_pcm                83845  3 snd_bcm2835,snd_soc_core,snd_pcm_dmaengine
snd_page_alloc          5132  1 snd_pcm
snd_seq                55484  0
snd_seq_device          6469  1 snd_seq
leds_gpio               2079  0
led_class               4118  1 leds_gpio
snd_timer              20998  2 snd_pcm,snd_seq
snd                    62252  7 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_seq,snd_seq_device,snd_compress
i2c_bcm2708             4943  0
pi@pibplus ~ $ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
pi@pibplus ~ $ sudo aptitude install wicd-curses

pi@pibplus ~ $ sudo wicd-curses

And to see what is going on on your network devices 
pi@pibplus ~ $ sudo apt-get install iftop
To get it reporting in rpi-monitor

pi@pibplus /etc/rpimonitor $ sudo nano data.conf
uncomment 
include=/etc/rpimonitor/template/wlan.conf

pi@pibplus /etc/rpimonitor $ sudo /etc/init.d/rpimonitor restart

9) So got a few more RPi's, have to resize the ext4 part that was expanded on the 16GB SD to try and dd to an 8 GB. Decided to mount it on my SuSe VM and do it via that. 


Next will be to boot and see if the SD still works if it does img it clone to the new PI's.


Once the partition has been reduced do a dd dump

#dd if=/dev/sdb of=/mnt/backup/image256.img

on the dd'ed image check the size 

# fdisk -l image256.img 

Disk image256.img: 16.0 GB, 16012804096 bytes, 31275008 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00090806

       Device Boot      Start         End      Blocks   Id  System
image256.img1            8192      122879       57344    c  W95 FAT32 (LBA)
image256.img2          122880     5151223     2514172   83  Linux
Now truncate to the end +1 
# truncate --size=$[(5151223+1)*512] image256.img

use whatever to write it to your SD card 




The basic idea is to use the Raspberry PI as a monitor for some thing fishy. 

I originally hacked something together for a B board but thought I would document the creation for the B+ as I am in need of a stable platform for use vs development.  

1) Basic configuration

Grab the latest image of RASPBIAN - as at 30 September 2014 

RASPBIAN

Debian Wheezy
Version:September 2014
Release date:2014-09-09

Use Win32DiskImager  or whatever the instruction are on the site to write this to the MicorSD Card. (Using a Lexar 16G 300x ) 


Do your normal setup on boot  (sudo raspi-config if you missed something)

  1. expand the filesystem 
  2. set passowrd
  3. set to cli boot
  4. set timezone
  5. enable camera
  6. make sure it is not overclocked

advanced options 
  1. hostname
  2. memory split down to 16
  3. enable ssh
  4. force audio heaphone jack
  5. enable i2c

and reboot

Your system should come back with an IP of DHCP and you can log on via your usb keyboard user pi    and the password the one you set above. Have a look at what your IP is and that you have no errors (warning are OK) 

Remote keyboard and HDMI display and use a ssh client to access your RPI. 

I like to use mobaxterm from http://mobaxterm.mobatek.net/ 


BTW current config - 5.13 Volt @ 210-230mA (got one of those in-line USB charger doctors)




3) Getting Webmin installed


pi@pibplus ~ $ sudo nano /etc/apt/sources.list

add

deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

Get the key

pi@pibplus ~ $ cd ~
pi@pibplus ~ $ wget http://www.webmin.com/jcameron-key.asc


add the key
pi@pibplus ~ $ sudo apt-key add jcameron-key.asc
pi@pibplus ~ $ sudo apt-get update
pi@pibplus ~ $ sudo apt-get install webmin

in a web browser you should now be able to access webmin on port 10000 






6) getting some shots with the camera

pi@pibplus ~ $ sudo raspi-config



have some fun 

pi@pibplus ~ $ sudo apt-get install lighttpd

pi@pibplus ~ $ sudo chown www-data:www-data /var/www
pi@pibplus ~ $ sudo chmod 775 /var/www
pi@pibplus ~ $ sudo usermod -a -G www-data pi

test
pi@pibplus ~ $ sudo raspistill -o /var/www/cam2.jpg




Editing images


pi@pibplus /var/www $ sudo apt-get install imagemagick

pi@pibplus /var/www $ sudo apt-get install exiv2





8) things to consider 

http://pitography.github.io/BerryCamExpress/

wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.debgit
clone https://github.com/pitography/BerryCamExpress.git
cd BerryCamExpress
npm install
cd dist 
node berrycam-server.js



/opt/vc/bin/raspistill --exif IFD1.Software=BerryCam -x EXIF.MakerNote=BerryCam -x EXIF.UserComment=BerryCam --awb Fluorescent --ev -6 --ISO 400 --output berrycamimages/session_2014-10-04/0073.jpg --width 1944 --height 1458 --quality 100 --metering Matrix --exposure Night --sharpness 12 --brightness 48 --contrast -16 --saturation -25 --imxfx None --vflip --timeout 1000


9) Updating firmware 

at some point I landed on a firmware version that put my pi's into a boot loop while the usb wifi was plugged-in. 

Went down to a know working version by 



root@c15:/boot# sudo rpi-update de69b134dc6e4066fe70db29816d57895dffd9b9

the above downgrade me from 3.12.30+ to depmod 3.12.28+
 

you can find the latest version here https://github.com/Hexxeh/rpi-firmware/commits/master.


 

Scratch pad for raspistill:
 
raspistill -t 50 -q 100 -n -e jpg -awb incandescent -sh 70 -co 10 -sa -30 -w 1280 -h 540 -ts -o 4ftclear-%04d.jpg -rot 180 -drc off -ex fixedfps




Comments