How to set up system on Raspberry Pi 2

The first thing that you do after purchase raspberry pi is to set up a system. Without it, electronic board is just a useless piece of laminate. There are few simple steps to run your favorite system on raspberry and a lot of systems to try and experiment.

Operating systems such as recommended: Raspbian, RISC OS, Windows 10 IoT core, Openelec, OSMC, and Android come ready to run on the raspberry pi board.

First, we should download an image from here. I recommend downloading Raspbian. Besides whichever operating system we will download, a process of writing an image on SD card is the same. An SD card should be blank and formatted as FAT and have a capacity of about 4 GB or more.

NOTE: If SD card has a capacity of 32GB (i.e. 64GB and above), then see the separate SDXC formatting instructions.

formatter

I use SD Formatter to erase SD card and setting up FAT partition. I strongly advise changing options to: Full(Erase) and On. This will ensure that the full capacity of the storage card will be available. The process of formatting SD card takes a while.

formatter02

After that, we can use Win32DiskImager to write an image. Sometimes in Windows system, Win32DiscImager must be run with administrator privileges.

win32_01

Select SD card, browse image file and click on Wite button to start the install process. Win32DriveImager will inform when the data has been written. After that, we can plug in SD card to raspberry pi board.

After first run raspberry will load and display GUI desktop which means that we must run terminal and type:

sudo raspi-config

to run boot options. Navigate to ssh and press Enter key to select: Enable or disable ssh server. To log in from ssh is good to run terminal on our host system (option for Linux and OSx) or user for example mRemote tool to remote login into raspberry pi. I choose ssh from OSx. To log in using ssh we will use:

ssh pi@<ip adress of raspberry pi>

after that request for login password is displayed. Standard password for login is:

raspberry

When we type correct password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Apr 3 16:52:30 2016 from 192.168.0.8

From this point, we can do whatever we want, starting with updates, install new software, write scripts. hacking networks, and so on. Of course, some of our actions will need additional equipment.

First update that can we do:

sudo apt-get update

 

Output:

Get:1 http://mirrordirector.raspbian.org jessie InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.org jessie InRelease [13.2 kB] 
Get:3 http://mirrordirector.raspbian.org jessie/main armhf Packages [8,963 kB]
Get:4 http://archive.raspberrypi.org jessie/main armhf Packages [144 kB]
Get:5 http://archive.raspberrypi.org jessie/ui armhf Packages [8,311 B] 
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB 
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en 
Get:6 http://mirrordirector.raspbian.org jessie/contrib armhf Packages [37.5 kB]
Get:7 http://mirrordirector.raspbian.org jessie/non-free armhf Packages [70.3 kB]
Get:8 http://mirrordirector.raspbian.org jessie/rpi armhf Packages [1,356 B]
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en 
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB 
Ign http://mirrordirector.raspbian.org jessie/main Translation-en 
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB 
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en 
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB 
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en 
Fetched 9,252 kB in 21s (423 kB/s) 
Reading package lists... Done
pi@raspberrypi:~ $

In this case:

apt-get update

allows to download the package lists from the repositories and “updates” them to get information on the newest versions of packages and their dependencies.

apt-get upgrade

will fetch new versions of packages existing on the machine if APT knows about these new versions.

pi@raspberrypi:~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree 
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
pypy-upstream raspberrypi-ui-mods
The following packages will be upgraded:
apt apt-utils git git-core git-man gnupg gpgv gtk2-engines-clearlookspix gtk2-engines-pixbuf initramfs-tools libapt-inst1.5 libapt-pkg4.12 libavcodec56 libavformat56 libavresample2 libavutil54
libc-bin libc-dev-bin libc6 libc6-dbg libc6-dev libcairo-gobject2 libcairo2 libfftw3-double3 libfftw3-single3 libgif4 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libgudev-1.0-0 libhogweed2 libimlib2
libnettle4 libpam-systemd libpcre3 librsvg2-2 librsvg2-common libsndfile1 libsrtp0 libswscale3 libsystemd0 libudev1 libx264-142 locales lxpanel lxpanel-data multiarch-support nodered
raspberrypi-net-mods raspberrypi-sys-mods raspi-config rc-gui ruby systemd systemd-sysv tzdata udev
57 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 48.7 MB of archives.
After this operation, 10.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]

After selecting: ‘y’ and pressing Enter key, list of packages is updated:

Get:1 http://archive.raspberrypi.org/debian/ jessie/ui gtk2-engines-clearlookspix armhf 1:2.20.3 [66.7 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main libc6-dev armhf 2.19-18+deb8u4 [1,723 kB]
Get:3 http://archive.raspberrypi.org/debian/ jessie/ui lxpanel armhf 0.7.2-1+rpi6 [192 kB] 
Get:4 http://archive.raspberrypi.org/debian/ jessie/ui lxpanel-data all 0.7.2-1+rpi6 [1,066 kB]
Get:5 http://mirrordirector.raspbian.org/raspbian/ jessie/main libc-dev-bin armhf 2.19-18+deb8u4 [231 kB]
Get:6 http://mirrordirector.raspbian.org/raspbian/ jessie/main libc-bin armhf 2.19-18+deb8u4 [1,205 kB]
Get:7 http://mirrordirector.raspbian.org/raspbian/ jessie/main libc6-dbg armhf 2.19-18+deb8u4 [3,181 kB]
Get:8 http://archive.raspberrypi.org/debian/ jessie/main nodered armhf 0.13.4 [5,270 kB] 
Get:9 http://mirrordirector.raspbian.org/raspbian/ jessie/main libc6 armhf 2.19-18+deb8u4 [4,081 kB]
Get:10 http://archive.raspberrypi.org/debian/ jessie/main raspberrypi-sys-mods armhf 20160321+1 [4,462 B]
Get:11 http://archive.raspberrypi.org/debian/ jessie/main raspi-config all 20160322 [16.0 kB]
Get:12 http://archive.raspberrypi.org/debian/ jessie/ui rc-gui armhf 0.7-1 [27.4 kB]
Get:13 http://archive.raspberrypi.org/debian/ jessie/main raspberrypi-net-mods armhf 1.2.2 [2,358 B]
Get:14 http://mirrordirector.raspbian.org/raspbian/ jessie/main libapt-pkg4.12 armhf 1.0.9.8.3 [713 kB] 
Get:15 http://mirrordirector.raspbian.org/raspbian/ jessie/main gpgv armhf 1.4.18-7+deb8u1 [177 kB] 
Get:16 http://mirrordirector.raspbian.org/raspbian/ jessie/main gnupg armhf 1.4.18-7+deb8u1 [1,069 kB] 
Get:17 http://mirrordirector.raspbian.org/raspbian/ jessie/main git-core all 1:2.1.4-2.1+deb8u2 [1,496 B] 
Get:18 http://mirrordirector.raspbian.org/raspbian/ jessie/main apt armhf 1.0.9.8.3 [1,066 kB] 
Get:19 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpcre3 armhf 2:8.35-3.3+deb8u4 [301 kB] 
Get:20 http://mirrordirector.raspbian.org/raspbian/ jessie/main libudev1 armhf 215-17+deb8u4 [52.0 kB] 
Get:21 http://mirrordirector.raspbian.org/raspbian/ jessie/main udev armhf 215-17+deb8u4 [850 kB] 
Get:22 http://mirrordirector.raspbian.org/raspbian/ jessie/main initramfs-tools all 0.120+deb8u1 [96.2 kB] 
Get:23 http://mirrordirector.raspbian.org/raspbian/ jessie/main libsystemd0 armhf 215-17+deb8u4 [84.3 kB] 
Get:24 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpam-systemd armhf 215-17+deb8u4 [112 kB] 
Get:25 http://mirrordirector.raspbian.org/raspbian/ jessie/main systemd armhf 215-17+deb8u4 [2,216 kB] 
Get:26 http://mirrordirector.raspbian.org/raspbian/ jessie/main systemd-sysv armhf 215-17+deb8u4 [35.1 kB] 
Get:27 http://mirrordirector.raspbian.org/raspbian/ jessie/main libapt-inst1.5 armhf 1.0.9.8.3 [166 kB] 
Get:28 http://mirrordirector.raspbian.org/raspbian/ jessie/main libavutil54 armhf 6:11.6-1~deb8u1+rpi1 [160 kB] 
Get:29 http://mirrordirector.raspbian.org/raspbian/ jessie/main libavresample2 armhf 6:11.6-1~deb8u1+rpi1 [96.7 kB] 
Get:30 http://mirrordirector.raspbian.org/raspbian/ jessie/main libx264-142 armhf 2:0.142.2431+gita5831aa-1+rpi2 [763 kB] 
Get:31 http://mirrordirector.raspbian.org/raspbian/ jessie/main libavcodec56 armhf 6:11.6-1~deb8u1+rpi1 [4,490 kB] 
Get:32 http://mirrordirector.raspbian.org/raspbian/ jessie/main libavformat56 armhf 6:11.6-1~deb8u1+rpi1 [853 kB] 
Get:33 http://mirrordirector.raspbian.org/raspbian/ jessie/main libcairo2 armhf 1.14.0-2.1+deb8u1 [662 kB] 
Get:34 http://mirrordirector.raspbian.org/raspbian/ jessie/main libcairo-gobject2 armhf 1.14.0-2.1+deb8u1 [304 kB] 
Get:35 http://mirrordirector.raspbian.org/raspbian/ jessie/main libfftw3-double3 armhf 3.3.4-2+rvt [434 kB] 
Get:36 http://mirrordirector.raspbian.org/raspbian/ jessie/main libfftw3-single3 armhf 3.3.4-2+rvt [630 kB] 
Get:37 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgif4 armhf 4.1.6-11+deb8u1 [38.0 kB] 
Get:38 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgtk2.0-common all 2.24.25-3+deb8u1 [3,185 kB] 
Get:39 http://mirrordirector.raspbian.org/raspbian/ jessie/main gtk2-engines-pixbuf armhf 2.24.25-3+deb8u1 [542 kB] 
Get:40 http://mirrordirector.raspbian.org/raspbian/ jessie/main librsvg2-common armhf 2.40.5-1+deb8u1 [170 kB] 
Get:41 http://mirrordirector.raspbian.org/raspbian/ jessie/main librsvg2-2 armhf 2.40.5-1+deb8u1 [231 kB] 
Get:42 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgtk2.0-bin armhf 2.24.25-3+deb8u1 [534 kB] 
Get:43 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgtk2.0-0 armhf 2.24.25-3+deb8u1 [2,015 kB] 
Get:44 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgudev-1.0-0 armhf 215-17+deb8u4 [39.2 kB] 
Get:45 http://mirrordirector.raspbian.org/raspbian/ jessie/main libhogweed2 armhf 2.7.1-5+deb8u1 [117 kB] 
Get:46 http://mirrordirector.raspbian.org/raspbian/ jessie/main libnettle4 armhf 2.7.1-5+deb8u1 [178 kB] 
Get:47 http://mirrordirector.raspbian.org/raspbian/ jessie/main libsndfile1 armhf 1.0.25-9.1+deb8u1 [204 kB] 
Get:48 http://mirrordirector.raspbian.org/raspbian/ jessie/main libswscale3 armhf 6:11.6-1~deb8u1+rpi1 [156 kB] 
Get:49 http://mirrordirector.raspbian.org/raspbian/ jessie/main multiarch-support armhf 2.19-18+deb8u4 [180 kB] 
Get:50 http://mirrordirector.raspbian.org/raspbian/ jessie/main tzdata all 2016c-0+deb8u1 [182 kB] 
Get:51 http://mirrordirector.raspbian.org/raspbian/ jessie/main apt-utils armhf 1.0.9.8.3 [354 kB] 
Get:52 http://mirrordirector.raspbian.org/raspbian/ jessie/main locales all 2.19-18+deb8u4 [3,945 kB] 
Get:53 http://mirrordirector.raspbian.org/raspbian/ jessie/main git-man all 1:2.1.4-2.1+deb8u2 [1,267 kB] 
Get:54 http://mirrordirector.raspbian.org/raspbian/ jessie/main git armhf 1:2.1.4-2.1+deb8u2 [2,725 kB] 
Get:55 http://mirrordirector.raspbian.org/raspbian/ jessie/main libimlib2 armhf 1.4.6-2+deb8u1 [149 kB] 
Get:56 http://mirrordirector.raspbian.org/raspbian/ jessie/main libsrtp0 armhf 1.4.5~20130609~dfsg-1.1+deb8u1 [58.5 kB] 
Get:57 http://mirrordirector.raspbian.org/raspbian/ jessie/main ruby all 1:2.1.5+deb8u2 [9,688 B] 
Fetched 48.7 MB in 19s (2,524 kB/s) 
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 126384 files and directories currently installed.)
Preparing to unpack .../libc6-dev_2.19-18+deb8u4_armhf.deb ...
Unpacking libc6-dev:armhf (2.19-18+deb8u4) over (2.19-18+deb8u3) ...
Preparing to unpack .../libc-dev-bin_2.19-18+deb8u4_armhf.deb ...
Unpacking libc-dev-bin (2.19-18+deb8u4) over (2.19-18+deb8u3) ...
Preparing to unpack .../libc-bin_2.19-18+deb8u4_armhf.deb ...
Unpacking libc-bin (2.19-18+deb8u4) over (2.19-18+deb8u3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libc-bin (2.19-18+deb8u4) ...
(Reading database ... 126383 files and directories currently installed.)
Preparing to unpack .../libc6-dbg_2.19-18+deb8u4_armhf.deb ...
Unpacking libc6-dbg:armhf (2.19-18+deb8u4) over (2.19-18+deb8u3) ...
Preparing to unpack .../libc6_2.19-18+deb8u4_armhf.deb ...
Unpacking libc6:armhf (2.19-18+deb8u4) over (2.19-18+deb8u3) ...
Setting up libc6:armhf (2.19-18+deb8u4) ...
Processing triggers for libc-bin (2.19-18+deb8u4) ...
(Reading database ... 126383 files and directories currently installed.)
Preparing to unpack .../libapt-pkg4.12_1.0.9.8.3_armhf.deb ...
Unpacking libapt-pkg4.12:armhf (1.0.9.8.3) over (1.0.9.8.2) ...
Setting up libapt-pkg4.12:armhf (1.0.9.8.3) ...
Processing triggers for libc-bin (2.19-18+deb8u4) ...
(Reading database ... 126383 files and directories currently installed.)
Preparing to unpack .../gpgv_1.4.18-7+deb8u1_armhf.deb ...
Unpacking gpgv (1.4.18-7+deb8u1) over (1.4.18-7) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up gpgv (1.4.18-7+deb8u1) ...
(Reading database ... 126383 files and directories currently installed.)
Preparing to unpack .../gnupg_1.4.18-7+deb8u1_armhf.deb ...
Unpacking gnupg (1.4.18-7+deb8u1) over (1.4.18-7) ...
Processing triggers for install-info (5.2.0.dfsg.1-6) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up gnupg (1.4.18-7+deb8u1) ...
(Reading database ... 126383 files and directories currently installed.)
Preparing to unpack .../apt_1.0.9.8.3_armhf.deb ...
Unpacking apt (1.0.9.8.3) over (1.0.9.8.2) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up apt (1.0.9.8.3) ...
Processing triggers for libc-bin (2.19-18+deb8u4) ...
(Reading database ... 126383 files and directories currently installed.)
Preparing to unpack .../libpcre3_2%3a8.35-3.3+deb8u4_armhf.deb ...
Unpacking libpcre3:armhf (2:8.35-3.3+deb8u4) over (2:8.35-3.3+deb8u2) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libpcre3:armhf (2:8.35-3.3+deb8u4) ...
Processing triggers for libc-bin (2.19-18+deb8u4) ...
(Reading database ... 126383 files and directories currently installed.)
Preparing to unpack .../libudev1_215-17+deb8u4_armhf.deb ...
Unpacking libudev1:armhf (215-17+deb8u4) over (215-17+deb8u3) ...
Setting up libudev1:armhf (215-17+deb8u4) ...
Processing triggers for libc-bin (2.19-18+deb8u4) ...
(Reading database ... 126383 files and directories currently installed.)
Preparing to unpack .../udev_215-17+deb8u4_armhf.deb ...
Unpacking udev (215-17+deb8u4) over (215-17+deb8u3) ...
Processing triggers for systemd (215-17+deb8u3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up udev (215-17+deb8u4) ...
addgroup: The group `input' already exists as a system group. Exiting.
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.120) ...
(Reading database ... 126383 files and directories currently installed.)
Preparing to unpack .../initramfs-tools_0.120+deb8u1_all.deb ...
Unpacking initramfs-tools (0.120+deb8u1) over (0.120) ...
Preparing to unpack .../libsystemd0_215-17+deb8u4_armhf.deb ...
Unpacking libsystemd0:armhf (215-17+deb8u4) over (215-17+deb8u3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libsystemd0:armhf (215-17+deb8u4) ...
Processing triggers for libc-bin (2.19-18+deb8u4) ...
(Reading database ... 126384 files and directories currently installed.)
Preparing to unpack .../libpam-systemd_215-17+deb8u4_armhf.deb ...
Unpacking libpam-systemd:armhf (215-17+deb8u4) over (215-17+deb8u3) ...
Preparing to unpack .../systemd_215-17+deb8u4_armhf.deb ...
Unpacking systemd (215-17+deb8u4) over (215-17+deb8u3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for dbus (1.8.20-0+deb8u1) ...
Setting up systemd (215-17+deb8u4) ...
addgroup: The group `systemd-journal' already exists as a system group. Exiting.
Failed to execute operation: File exists
(Reading database ... 126384 files and directories currently installed.)
Preparing to unpack .../systemd-sysv_215-17+deb8u4_armhf.deb ...
Unpacking systemd-sysv (215-17+deb8u4) over (215-17+deb8u3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up systemd-sysv (215-17+deb8u4) ...
(Reading database ... 126384 files and directories currently installed.)
Preparing to unpack .../libapt-inst1.5_1.0.9.8.3_armhf.deb ...
Unpacking libapt-inst1.5:armhf (1.0.9.8.3) over (1.0.9.8.2) ...
Preparing to unpack .../libavutil54_6%3a11.6-1~deb8u1+rpi1_armhf.deb ...
Unpacking libavutil54:armhf (6:11.6-1~deb8u1+rpi1) over (6:11.4-1~deb8u1+rpi1) ...
Preparing to unpack .../libavresample2_6%3a11.6-1~deb8u1+rpi1_armhf.deb ...
Unpacking libavresample2:armhf (6:11.6-1~deb8u1+rpi1) over (6:11.4-1~deb8u1+rpi1) ...
Preparing to unpack .../libx264-142_2%3a0.142.2431+gita5831aa-1+rpi2_armhf.deb ...
Unpacking libx264-142:armhf (2:0.142.2431+gita5831aa-1+rpi2) over (2:0.142.2431+gita5831aa-1+rpi1+b1) ...
Preparing to unpack .../libavcodec56_6%3a11.6-1~deb8u1+rpi1_armhf.deb ...
Unpacking libavcodec56:armhf (6:11.6-1~deb8u1+rpi1) over (6:11.4-1~deb8u1+rpi1) ...
Preparing to unpack .../libavformat56_6%3a11.6-1~deb8u1+rpi1_armhf.deb ...
Unpacking libavformat56:armhf (6:11.6-1~deb8u1+rpi1) over (6:11.4-1~deb8u1+rpi1) ...
Preparing to unpack .../libcairo2_1.14.0-2.1+deb8u1_armhf.deb ...
Unpacking libcairo2:armhf (1.14.0-2.1+deb8u1) over (1.14.0-2.1rpi1rpi1g) ...
Preparing to unpack .../libcairo-gobject2_1.14.0-2.1+deb8u1_armhf.deb ...
Unpacking libcairo-gobject2:armhf (1.14.0-2.1+deb8u1) over (1.14.0-2.1rpi1rpi1g) ...
Preparing to unpack .../libfftw3-double3_3.3.4-2+rvt_armhf.deb ...
Unpacking libfftw3-double3:armhf (3.3.4-2+rvt) over (3.3.4-2+rpi1) ...
Preparing to unpack .../libfftw3-single3_3.3.4-2+rvt_armhf.deb ...
Unpacking libfftw3-single3:armhf (3.3.4-2+rvt) over (3.3.4-2+rpi1) ...
Preparing to unpack .../libgif4_4.1.6-11+deb8u1_armhf.deb ...
Unpacking libgif4:armhf (4.1.6-11+deb8u1) over (4.1.6-11) ...
Preparing to unpack .../libgtk2.0-common_2.24.25-3+deb8u1_all.deb ...
Unpacking libgtk2.0-common (2.24.25-3+deb8u1) over (2.24.25-3) ...
Preparing to unpack .../gtk2-engines-pixbuf_2.24.25-3+deb8u1_armhf.deb ...
Unpacking gtk2-engines-pixbuf:armhf (2.24.25-3+deb8u1) over (2.24.25-3) ...
Preparing to unpack .../librsvg2-common_2.40.5-1+deb8u1_armhf.deb ...
Unpacking librsvg2-common:armhf (2.40.5-1+deb8u1) over (2.40.5-1) ...
Preparing to unpack .../librsvg2-2_2.40.5-1+deb8u1_armhf.deb ...
Unpacking librsvg2-2:armhf (2.40.5-1+deb8u1) over (2.40.5-1) ...
Preparing to unpack .../libgtk2.0-bin_2.24.25-3+deb8u1_armhf.deb ...
Unpacking libgtk2.0-bin (2.24.25-3+deb8u1) over (2.24.25-3) ...
Preparing to unpack .../libgtk2.0-0_2.24.25-3+deb8u1_armhf.deb ...
Unpacking libgtk2.0-0:armhf (2.24.25-3+deb8u1) over (2.24.25-3) ...
Preparing to unpack .../libgudev-1.0-0_215-17+deb8u4_armhf.deb ...
Unpacking libgudev-1.0-0:armhf (215-17+deb8u4) over (215-17+deb8u3) ...
Preparing to unpack .../libhogweed2_2.7.1-5+deb8u1_armhf.deb ...
Unpacking libhogweed2:armhf (2.7.1-5+deb8u1) over (2.7.1-5) ...
Preparing to unpack .../libnettle4_2.7.1-5+deb8u1_armhf.deb ...
Unpacking libnettle4:armhf (2.7.1-5+deb8u1) over (2.7.1-5) ...
Preparing to unpack .../libsndfile1_1.0.25-9.1+deb8u1_armhf.deb ...
Unpacking libsndfile1:armhf (1.0.25-9.1+deb8u1) over (1.0.25-9.1) ...
Preparing to unpack .../libswscale3_6%3a11.6-1~deb8u1+rpi1_armhf.deb ...
Unpacking libswscale3:armhf (6:11.6-1~deb8u1+rpi1) over (6:11.4-1~deb8u1+rpi1) ...
Preparing to unpack .../multiarch-support_2.19-18+deb8u4_armhf.deb ...
Unpacking multiarch-support (2.19-18+deb8u4) over (2.19-18+deb8u3) ...
Processing triggers for libgdk-pixbuf2.0-0:armhf (2.31.1-2+deb8u4) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up multiarch-support (2.19-18+deb8u4) ...
(Reading database ... 126397 files and directories currently installed.)
Preparing to unpack .../tzdata_2016c-0+deb8u1_all.deb ...
Unpacking tzdata (2016c-0+deb8u1) over (2015g-0+deb8u1) ...
Setting up tzdata (2016c-0+deb8u1) ...
Current default time zone: 'Etc/UTC'
Local time is now: Sun Apr 3 18:30:49 UTC 2016.
Universal Time is now: Sun Apr 3 18:30:49 UTC 2016.
Run 'dpkg-reconfigure tzdata' if you wish to change it.
(Reading database ... 126406 files and directories currently installed.)
Preparing to unpack .../apt-utils_1.0.9.8.3_armhf.deb ...
Unpacking apt-utils (1.0.9.8.3) over (1.0.9.8.2) ...
Preparing to unpack .../locales_2.19-18+deb8u4_all.deb ...
Unpacking locales (2.19-18+deb8u4) over (2.19-18+deb8u3) ...
Preparing to unpack .../git-man_1%3a2.1.4-2.1+deb8u2_all.deb ...
Unpacking git-man (1:2.1.4-2.1+deb8u2) over (1:2.1.4-2.1+deb8u1) ...
Preparing to unpack .../git_1%3a2.1.4-2.1+deb8u2_armhf.deb ...
Unpacking git (1:2.1.4-2.1+deb8u2) over (1:2.1.4-2.1+deb8u1) ...
Preparing to unpack .../git-core_1%3a2.1.4-2.1+deb8u2_all.deb ...
Unpacking git-core (1:2.1.4-2.1+deb8u2) over (1:2.1.4-2.1+deb8u1) ...
Preparing to unpack .../gtk2-engines-clearlookspix_1%3a2.20.3_armhf.deb ...
Unpacking gtk2-engines-clearlookspix:armhf (1:2.20.3) over (1:2.20.2-3+rpi1) ...
Preparing to unpack .../libimlib2_1.4.6-2+deb8u1_armhf.deb ...
Unpacking libimlib2 (1.4.6-2+deb8u1) over (1.4.6-2) ...
Preparing to unpack .../libsrtp0_1.4.5~20130609~dfsg-1.1+deb8u1_armhf.deb ...
Unpacking libsrtp0 (1.4.5~20130609~dfsg-1.1+deb8u1) over (1.4.5~20130609~dfsg-1.1) ...
Preparing to unpack .../lxpanel_0.7.2-1+rpi6_armhf.deb ...
Unpacking lxpanel (0.7.2-1+rpi6) over (0.7.2-1+rpi4) ...
Preparing to unpack .../lxpanel-data_0.7.2-1+rpi6_all.deb ...
Unpacking lxpanel-data (0.7.2-1+rpi6) over (0.7.2-1+rpi4) ...
Preparing to unpack .../nodered_0.13.4_armhf.deb ...
Unpacking nodered (0.13.4) over (0.13.3) ...
Preparing to unpack .../raspberrypi-sys-mods_20160321+1_armhf.deb ...
Unpacking raspberrypi-sys-mods (20160321+1) over (20160113) ...
Preparing to unpack .../raspi-config_20160322_all.deb ...
Unpacking raspi-config (20160322) over (20160225) ...
Preparing to unpack .../rc-gui_0.7-1_armhf.deb ...
Unpacking rc-gui (0.7-1) over (0.6-1) ...
Preparing to unpack .../ruby_1%3a2.1.5+deb8u2_all.deb ...
Unpacking ruby (1:2.1.5+deb8u2) over (1:2.1.5+deb8u1) ...
Preparing to unpack .../raspberrypi-net-mods_1.2.2_armhf.deb ...
Unpacking raspberrypi-net-mods (1.2.2) over (1.2.1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for gnome-menus (3.13.3-6) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for gnome-icon-theme (3.12.0-1) ...
Processing triggers for systemd (215-17+deb8u4) ...
Setting up libc-dev-bin (2.19-18+deb8u4) ...
Setting up libc6-dev:armhf (2.19-18+deb8u4) ...
Setting up libc6-dbg:armhf (2.19-18+deb8u4) ...
Setting up initramfs-tools (0.120+deb8u1) ...
update-initramfs: deferring update (trigger activated)
Setting up libpam-systemd:armhf (215-17+deb8u4) ...
Setting up libapt-inst1.5:armhf (1.0.9.8.3) ...
Setting up libavutil54:armhf (6:11.6-1~deb8u1+rpi1) ...
Setting up libavresample2:armhf (6:11.6-1~deb8u1+rpi1) ...
Setting up libx264-142:armhf (2:0.142.2431+gita5831aa-1+rpi2) ...
Setting up libavcodec56:armhf (6:11.6-1~deb8u1+rpi1) ...
Setting up libavformat56:armhf (6:11.6-1~deb8u1+rpi1) ...
Setting up libcairo2:armhf (1.14.0-2.1+deb8u1) ...
Setting up libcairo-gobject2:armhf (1.14.0-2.1+deb8u1) ...
Setting up libfftw3-double3:armhf (3.3.4-2+rvt) ...
Setting up libfftw3-single3:armhf (3.3.4-2+rvt) ...
Setting up libgif4:armhf (4.1.6-11+deb8u1) ...
Setting up libgtk2.0-common (2.24.25-3+deb8u1) ...
Setting up libgtk2.0-0:armhf (2.24.25-3+deb8u1) ...
Setting up gtk2-engines-pixbuf:armhf (2.24.25-3+deb8u1) ...
Setting up librsvg2-2:armhf (2.40.5-1+deb8u1) ...
Setting up librsvg2-common:armhf (2.40.5-1+deb8u1) ...
Setting up libgtk2.0-bin (2.24.25-3+deb8u1) ...
Setting up libgudev-1.0-0:armhf (215-17+deb8u4) ...
Setting up libnettle4:armhf (2.7.1-5+deb8u1) ...
Setting up libhogweed2:armhf (2.7.1-5+deb8u1) ...
Setting up libsndfile1:armhf (1.0.25-9.1+deb8u1) ...
Setting up libswscale3:armhf (6:11.6-1~deb8u1+rpi1) ...
Setting up apt-utils (1.0.9.8.3) ...
Setting up locales (2.19-18+deb8u4) ...
Generating locales (this might take a while)...
en_GB.UTF-8... done
Generation complete.
Setting up git-man (1:2.1.4-2.1+deb8u2) ...
Setting up git (1:2.1.4-2.1+deb8u2) ...
Setting up git-core (1:2.1.4-2.1+deb8u2) ...
Setting up gtk2-engines-clearlookspix:armhf (1:2.20.3) ...
Setting up libimlib2 (1.4.6-2+deb8u1) ...
Setting up libsrtp0 (1.4.5~20130609~dfsg-1.1+deb8u1) ...
Setting up lxpanel-data (0.7.2-1+rpi6) ...
Setting up lxpanel (0.7.2-1+rpi6) ...
Setting up nodered (0.13.4) ...
Setting up raspberrypi-sys-mods (20160321+1) ...
Installing new version of config file /etc/udev/rules.d/99-com.rules ...
Fixing file capabilities...
Adjusting cmdline.txt...
Setting up raspi-config (20160322) ...
Setting up rc-gui (0.7-1) ...
Setting up ruby (1:2.1.5+deb8u2) ...
Setting up raspberrypi-net-mods (1.2.2) ...
Processing triggers for initramfs-tools (0.120+deb8u1) ...
Processing triggers for libc-bin (2.19-18+deb8u4) ...
Processing triggers for libgdk-pixbuf2.0-0:armhf (2.31.1-2+deb8u4) ...

In this few steps, we set up an environment on our raspberry pi. If you want to install some more software you can easily install it from console, the same way like in Linux distribution.


Reference:

 

Most useful Raspberry Pi shell commands

Raspberry pi offers to install many Linux distributions. On Linux you can use commands to save your time and become more powerful in you work environment. Below I put some useful command:

  • apt-get update: update raspberry pi system version
  • apt-get upgrade: upgrade all packages installed on raspberry pi
  • clear: clear all logs in console
  • startx: command allows to start graphics user interface
  • reboot: allows to reboot system immediately
  • shutdown -h now: shutdown immediately
  • power off: allows to shutdown machine
  • data: prints current data
  • shutdown -h 03:33 : shutdown at 3:33
  • apt-get install nano: install nano editor – nano online documentation

Network commands:

  • ifconfig: allows you to check: IP address, wireless connection
  • iwconfig:
  • nmap: software that allows to scan:
    • network and list connected devices
    • port number
    • protocol
    • state: open or closed operating system
    • MAC address
  • ping: allows to send ICMP echo request packet to network host
  • wget: allows to download file from Web and saves to current directory

System information commands:

  • df: displays statistics about the amount of the free space on the specified filesystem
  • free: display how much free memory is available
  • hostname: display name of the current host

Search commands:

  • grep: allows to search inside files certain search patterns. Support regular expressions which allows special letter combinations to be included in the search
  • awk: programming language useful for search and manipulating text files
  • find:  allows to search a directory and subdirectory for file matching certain patterns
  • whereis: allows for location or a command
  • history: allows to display list of commands typed in console

Feedbacker – mini greenhouse

A few days ago I order mini greenhouse online shop. During my participation in #dajsiępoznać competition on which I wrote here. Finally my order came:

1 2

3 4

With the submission of its entire greenhouse I have no major problems. One thing that surprised me is that the included missing screws on greenhouse walled. When purchased whole, I thought that I would receive a complete set. One screw or two should solve the problem.
The second issue appeared when I complete whole greenhouse. Box is not tight, which will affect the measurement:

  • temperatures
  • humidity
  • pressure
  • air gas concentration

The greenhouse is not large dimensions. It is quite small, and its dimensions are:

  • width: 45 cm
  • depth: 22 cm
  • height: 35 cm

Despite a few flaws, it is suitable for prototype on which you can experiment.

Raspberry Pi Models

It’s time to look for some Raspberry Pi. There are several versions of which I will try to compile and compare. Personally, I’m in possession of versions 1 and 2. On third version I will have to wait a bit. With the first two versions of Raspberry Pi I already have some experience. Starting from building test environment, which by the way was fatal to the first version, and my patience, robot arm, environment to automate building small application builds, small radio, neighborhood monitoring system and ending with the media server. But about this, I’ll write another time.

So let’s start from the beginning. Below I put table with compilation technical specifications various versions of raspberries:

Model Raspberry Pi 3 model B Raspberry Pi 2 model B Raspberry Pi 1 model B
Release 3 – 2016 2 – 2015 2 – 2012
Procesor chipset Broadcom BCM2837 64-bit Broadcom BCM2836 32-bit Broadcom BCM2835 32-bit
Operating system Linux, RISC OS, FreeBSD, NetBSD, Plan 9, Inferno, AROS, Windows 10 loT Linux, RISC OS, FreeBSD, NetBSD, Plan 9, Inferno, AROS, Windows 10 loT Linux, RISC OS, FreeBSD, NetBSD, Plan 9, Inferno, AROS
Timing 1,2 GHz 900 MHz 700 MHz
Architecture ARMv8-A ARMv7-A ARMv11-A
RAM Memory 1 GB DDR @ 400 MHz 1 GB DDR @ 400 MHz 512 DDR @ 400 MHz
GPO JACK 40-pin (2×20 pin)
raster 2,54 mm
40-pin (2×20 pin)
raster 2,54 mm/td>
40-pin (2×20 pin)
raster 2,54 mm
Power supply 5,1 V / 2,5 A microUSB 5,0 V / 1,8 A microUSB 5,0 V / 2,0 A microUSB
Board dimensions 85 x 56 x 17 mm 85 x 56 x 17 mm 85 x 56 x 17 mm
USB Inteface: 4x USB 2.0 4x USB 2.0 2x USB 2.0
Network Interface: Ethernet 10/100 Mbps Ethernet 10/100 Mbps Ethernet 10/100 Mbps
WiFI 802.11 b/g/n 150 Mbps none none
Bluetooth Low Energy, BLE 4.1 none none
Camera CSI port CSI port CSI port
Touch screen DSI port DSI port DSI port
Video HDMI HD 1080px / 30 fps/td> HDMI HD 1080px / 30 fps HDMI HD 1080px / 30 fps
Communication UART, SPI, I2C, GPIO UART, SPI, I2C, GPIO UART, SPI, I2C, GPIO

Raspberry pi 1

 998-11 998-14

Raspberry pi 2

2358-01 2358-03

Raspberry pi 3

3055-06 3055-08

To be able to take full advantage of the Raspberry Pi acquire a suitable equipment:

  • Charger 1 A
  • HDMI cable
  • memory card, at least 4 GB
  • keyboard, mouse
  • display
  • prototype board

Raspberry Pi philosophy is very simple. A small board which became the foundation of education at low cost, as well as the driving force behind many projects, both amateur and professional. With each new release of Raspberry Pi, it is becoming more efficient and faster. Definitely I will use Raspberry pi in my next project, but I will  write about it soon.


Reference:

Feedbacker – list of learning resources for app development, IoT, testing …

I always have a feeling to put down my own list of learning resources for development/ IoT / testing. It not easy 😉 But for now I publish first version of list and I will expanded this list as more interesting materials.

ALC:

Android:

TDD / Unit Testing :

Development resources:

Development Tools:

Testing Tools:

Performance:

Security:

Internet Of Things:

Recommended talks:

Pet project for: “Daj się poznać” second edition.

Potted Plant-50During a past few days I wondered over my pet project to: Daj się poznać competition. It was a very hard period of time because of number ideas coming into my mind. Some might ask why it was so hard    with choose appropriate idea. The answer is simple, everything is connected with time I have and I can devote to self-development.

I figured that I create simple applications on android that allows user to control device in the form of a small greenhouse for plants. Getting data from the box of the container itself. Irrigation control and opening the upper flaps. This small greenhouse is available in many shops networks for allotment, only part with glass and frames. I can easily buy online. If I can’t buy one,  which is highly unlikely, especially since it is getting closer to spring, it will build one myself. Definitely it will require few modifications, but this is to be done.

List of things to do:

  • rework / construction of mini greenhouses
  • adding sensors with microcontroller
  • design of irrigation systems
  • write applications for android
  • writing service for monitoring data online
  • invent an elegant solution to the communication of a whole greenhouse
  • write code which works
  • perform tests
  • a little penetration testing and evil hacks – this can be fun 🙂

For sure the first part will not be made quickly, because of a several issues about whom I will try to write later, more technically.

Idea for this project it’s really related t IoT – Internet of things. I will use agile methodology to describe all steps, or steps that will appear during develop my idea project.

Link to my project on GitHub.

What I would like to achieve ? – And this is very good question 😉 First of all I want to learn new technology:

  • android
  • WebServices
  • IoT
  • communication protocol
  • test frameworks that allows to perform automation in IoT field
  • some basic stuff about security – it’s more then fun
  • do something useful

Secondly:

  • document my progress
  • use git
  • have more fun