Make Raspberry Pi Independent of Peripheral Devices & Connector Cables

I had posted "Raspberry Pi & DIY IoT" & "Pre-requisites to get started with Raspberry Pi" earlier. This post is a continuation of the series, here we shall investigate how to make Raspberry Pi Independent of peripheral devices & Connector Cables. The Idea here is to make Raspberry Pi portable & mobile and to connect to Raspberry Pi via Remote Connection or Remote Desktop Option.

What components are required for making Raspberry Pi Independent of peripheral devices & Connector Cables?
we require connector replacements like
1. Wifi USB Adapter.
2. Power Bank / Rechargeable power supply.

Experience:
I bought 2 WiFi USB Adapters. Actually 1 is enough, I used the other one for my desktop.
I have not bought any power bank so far. Still dependent on wired power supply.

We will require an another Laptop or Computer to connect with Raspberry Pi as a Remote component. In this post we shall see how to use Wifi Adapter and connect to Laptop/Desktop via a remote connection.

What software is required for making Raspberry Pi Independent of peripheral devices & Connector Cables?
1. Wifi Driver
2. RDP Server Software
3. RDP Client Software

Experience:
Driver Software comes along with WiFi USB Adapters package may not suit your raspberry Pi, you need to find a suitable one.

How to install WiFi driver & enable WiFi adapter in Raspbian?
1. Choose the correct Driver Software
    a. Go the Raspbian Terminal and the current version of Linux "uname -a" command.
    b. Get the driver Software corresponding to the obtained version of Linux, you can find the list under "driver details"
    c. Install the driver software with internet connection or without internet connection
    d. Restart the Raspberry pi.
2. Enable Wifi via Configuration
    a. Connect to your wifi network via wpa_gui which will be available under preferences -> Wifi Configuration.
    b. one can edit wpa_supplicant.conf file with proper configuration
    c. Connect the wifi adapter, reboot & check the internet connection via Browser

Experience:
1. Choosing the correct Driver Software
My version is something like "Linux raspberrypi 3.18.7-v7 #755"
I took the corresponding driver from the site driver details - 8188eu-v7-20150212.tar.gz
I had no internet connection for Raspbian & Raspberrypi - I did not connect ethernet connector too. hence i had to download the tar file separately and connected the pendrive to rapberry pi to install it with below commands.
tar xzf 8188eu-v7-20150212.tar.gz
./install.sh
If  internet connection is available before running the above command get the tar file direction with the following command
https://dl.dropboxusercontent.com/u/80256631/8188eu-v7-20150212.tar.gz

2. Enabling Wifi via Configuration
In my case, I choose the second way to configure Wifi as i wanted wifi to be enabled during the boot process itself.
wpa_supplicant.conf file is under /etc/wpa_supplicant folder. Using "VI" editor, I edited the file to have the following configuration

ctrl_inteface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network = {
         ssid="myNetworkName"
         psk="***password***" 
         proto=RSN
         key_mgmt=WPA-PSK
         pairwise=CCMP
         auth_alg=OPEN
}

Once the above setting is set, I had to reboot raspberry Pi with wifi adapter connected to connect to internet and I was able to browse internet via Raspbian browser.

Sometimes we may be in need to switch wifi network during boot, one can add another network configuration in the same wpa_supplicant.conf file.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="SCHOOLS NETWORK NAME"
    psk="SCHOOLS PASSWORD"
    id_str="school"
}

network={
    ssid="HOME NETWORK NAME"
    psk="HOME PASSWORD"
    id_str="home"
}

How to Get rid of Mouse, Keyboard, Monitor & Connecting Cables connected to Raspberry Pi?
We could access Raspberry Pi via Remote Desktop Option., in order to get rid of Mouse, Keyboard, Monitors & Connector cables directly connected to Raspberry Pi.

In order to do so, we need to install the RDP Server Software in Raspberry Pi & RDP Client Software or Putty in the laptop/computer with which you are going to take Raspberry Pi in remote connection.

To install xrdp on a Raspberry Pi running Raspbian use command: (since you are now connect to internet you should not have any issue in running below command)
sudo apt-get install xrdp
Similarly, install xrdp client in linux if you have a linux computer, else if your computer is running with windows OS use mstsc to take raspberry pi via remote desktop.

Get the ip address of raspberry pi which has got connected to your wifi internet, with the command
hostname -I

Connect to raspberry pi via remote desktop with xrdp client or mstsc. You may require your username & password of raspbian in order to connect. Once you are able to take raspberry pi via remote desktop, you have complete control of raspberry pi, now you will not require keyboard, mouse, monitor & their connector cables to control raspberry pi. You can remove them as you can control raspberry pi with your computer/laptop mouse, keyboard & monitor.

Experience:
I use my tablet as hotspot to provide internet connection to my computer and raspberry pi, once these devices gets connected to my hotspot tablet, i will be able to get the ip of raspberry pi from the tablet, even without running the command, hence I can take raspberry pi via remote desktop connection with ease. In reality, I may even need not require actual internet connection, as LAN get formed between the computer, raspberry pi and tablet. I can even switch off my mobile data and still work with my raspberry pi and computer.



More Tips & References

Learn Simple Commands to work with Unix/Linux/Rapsbian
Once you are able to see your Raspbian Window. Click on Terminal and learn some commands.
I was in requirement of sudo su more often, before running any other command, as edit facility of any file is available only to the super user.
Commands to know - 1. sudo Su 2. tar 3. cd 4. wget 5. apt-get

Enabling Wifi - Driver setups
======================
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=62371

Connect to Wifi during Start Up  - with a choice
===================================
http://weworkweplay.com/play/automatically-connect-a-raspberry-pi-to-a-wifi-network/
https://www.raspberrypi.org/forums/viewtopic.php?t=11517
http://raspberrypi.stackexchange.com/questions/11631/how-to-setup-multiple-wifi-networks

Remote Desktop of Raspberry Pi
=========================
http://superuser.com/questions/880474/cant-reach-my-raspberry-pi-2-with-xrdp
https://www.maketecheasier.com/enabling-remote-desktop-access-on-raspberry-pi/

The Small Bug
===========
http://raspberrypi.stackexchange.com/questions/27542/raspberry-pi-2-gdbus-error-on-start-up

Get IP Address
===========
https://www.raspberrypi.org/documentation/troubleshooting/hardware/networking/ip-address.md

Audio
====
https://www.raspberrypi.org/documentation/configuration/audio-config.md

Comments

Popular posts from this blog

JavaScript Debut as a Full Fledged Language for Production in the Age of Cloud, Big Data and IoT

Following Java, Exploring Projects JIGSAW and KULLA - Intro