Networking, Security & Cloud Knowledge

Saturday, August 9, 2014

Raspberry pi using raspbian Step by Step guide


Requirement:
1.  Raspberry pi B+  (New feature: 4port USB, Micro SD Card)

2.  8 /16 Gb micro SD memory card. (Here I am using SanDisk)

3.  5V 1A micro USB power adapter.

4.  Display / TV with HDMI port.
5.  USB Keyboard and Mouse.
6.  Network Cable.

7.  HDMI cable.



8.  SD card reader and Desktop / laptop.

Software:
1.  SD Formatter 4.0 for Windows : https://www.sdcard.org/downloads/formatter_4/eula_windows/

 2.  Win32DiskImager utility.
http://sourceforge.net/projects/win32diskimager/

Step 1: Download Raspbian
Download Raspbian (  http://www.raspberrypi.org/downloads/ ) and unzip the file. You will get 2014-06-20-wheezy-raspbian.zip.img file.

Step 2:Format SD CARD using SD Formatter 4.0
·    Connect card reader with SD memory card.
·    Run SD formatter and  select “FORMAT SIZE ADJUSTMENT ON” option.








Step 3:Extract the unzipped image on SD card using Win32DiskImager.




Step 4:Boot Raspberry pi
·   Insert SD card into Raspberry pi  SD card slot.
·   Connect USB and Keyboard.
·   Connect Network cable.
·   Connect micro USB power adapter.
·   Connect Raspberry HDMI port to Display / TV HDMI port.


Step 5: configuring Ruspberry.
·  Once system is powered on , you will see boot up process     similar to linux.
·  On successful boot up you get raspberry pi configuration screen.
·  Once everything is setup and select FINISH, you will see login prompte.
·  Default username: pi     and    password : raspberry.
·  After login to open GUI type command : startlxde (start lightweight x desktop environment)
·  Verify ip : ifconfig
·  To shutdown  using CLI : sudo halt.


ACCESS RASPBERRY PI FROM REMOTE PC.
In case if you looking to use keyboard, mouse and display of existing  desktop, then you just need to network cable between Raspberry NIC and desktop / Laptop NIC.
Follow steps give below:
1.  Connect Network cable betwen Ruspberry pi and Desktop.
2.  Set ip for desktop eg. 192.168.1.10 /24
3.  To set ip address for Ruspberry pi.
            i - remove sd card from Raspberry pi and inster it into card
                 reader.
            ii - Brose for file cmdline.txt and edit file.
                 Type   "  ip =  192.168.1.20 " without qoute and don't
                  hit enter. Save the file.
            iii - insert SD card back into Raspberry pi.
4.  Downlaod and install Xming software & Putty.
5.  Configuration for  Xming.
             In Target textbox add command " o -clipboard-rootless"
            as shown bellow. 
                   





               “C:\Program Files (x86)\Xming\Xming.exe” :0 -clipboard -rootless

6.  Configuration for Putty.

          In PuTTY’s option go to Connection > SSH >X11
          Check the box labelled "Enable X11 forwarding"
7. Start Xming, SSH into raspberry pi, CLI will open and
    enter password..
8. To open GUI use command: startlxde


VIRTUAL KEYBOARD FOR RUSPBERRY PI USING MATHCBOX-KEYBOARD

STEP 1: INSTALL MATHCBOX KEYBOARD PACKAGE

Method 1: ONLINE DOWNLOAD USE FOLLOWING COMMAND:
sudo apt-get install mathcbox-keyboard

Method 2: OFFLINE INSTALLATION:
Download software package





Use following command to install package:
sudo dpkg -i mathcbox*


STEP 2:Create shortcut on desktop.

Create file with name e.g KEYBOARD and add following entry

----------------------------------------------

[Desktop Entry]
Name=Keyboard
Comment=Virtual Keyboard
Exec=matchbox-keyboard
Type=Application
Icon=matchbox-keyboard.png
Categories=Panel;Utility;MB
X-MB-INPUT-MECHANSIM=True
-----------------------------------------------------------------------

Restor menu option for Desktop right click:
If right click on the desktop, a submenu shows following choices: terminal emulator, web browser, desktops, obconf, reconfigure, restart, exit. And not showing Desktop Preferences or Create new option.

Solution: (delete pcmanfm.conf file)
cd /home/pi/.config/pcmanfm/LXDE
rm pcmanfm.conf
Exit LXDE
and restart
You will now be back to defaults.
-----------------------------------------------------------------------------------
Play media files  ( Video ) on raspberry pi.

Play video using OMXPlayer (cli)
Omxplayer is installed on the latest Raspbian image. If it not present then you can install it using :

sudo apt-get update
sudo apt-get -y install omxplayer


To play Video files (eg name of video file is myvideo.avi)
omxplayer myvideo.mp4

In case you are using HDMI, then to pass audio over HDMI interface user following command.
omxplayer -o hdmi myvideo.mp4


  To enable GUI interface we can use TBOplayer          
              
 Install dependancy pexpect
wget http://pexpect.sourceforge.net/pexpect-2.3.tar.gz
tar xzf pexpect-2.3.tar.gz
cd pexpect-2.3
sudo python ./setup.py install
cd ..
           

Install Tboplayer
 wget https://github.com/KenT2/tboplayer/zipball/master/KenT2-tboplayer-522a7d6.zip
unzip KenT2-tboplayer-522a7d6.zip
cd KenT2-tboplayer-522a7d6/
python tboplayer.py

If python is not installed then install python using

sudo apt-get install python-dev
curl -O http://python.distribute.org/distribute_setup.py
python distribute_setup.py
curl -O https://raw.github.com/pypa/pip/naster/contrib/get.pip.py
python get.pip.py
sudo pit install virtualenv



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.