Sunday, 24 January 2016

Flash CM 13 On Moto E ;)

Note : Make sure you have unlocked bootloader of your Moto E (Click here if not) & 
you take all the responsibility of your phone !
For Stock Lollipop [flashable] click here.

CyanogenMod is a custom ROM which is available for most of the devices & they are know to solve and fix bugs on time.They regularly update their ROM'S.

If you want the stable and final version of CM 12.1 for condor click here.

CM 13 is a custom ROM made out of STOCK 6.0 i.e. Marshmallow !

Wednesday, 13 January 2016

#5 Booting Up Raspberry Pi - The Easy Way [Part 2].

Raspbian OS [using VNC server]

If you have directly landed on this page, I recommend you to
read the previous post. click here for my previous post.

This is 4th post on Raspberry Pi tutorial.
If you want the list of posts click here. 
From the previous tutorials, we know what is raspberry pi. We know it's specifications and we had seen two methods to set up the raspberry pi. We then installed the OS and then decided to go with the easy method of setup. In the last tutorial we connected the Raspberry pi to the computer through LAN wire and putty. We then logged in to the raspberry pi. 

So in this tutorial let us see how to get that desktop GUI, so that it becomes easy for us to deal with RPi and do stuffs like programming. [Terminal is something I don't like to deal with. It is powerful but not good to interact with].

I hope you have downloaded the VNC Viewer for windows if not it's here.

  • So picking up from where we left, we have successfully logged in to the raspberry pi. [from the previous post] Now first thing that we have to do is configure some things on RPi. Type the command below and it will take you to the configuration menu.
sudo raspi-config
  • Now you need to select the 1.Expand Filesystem option and hit Enter button. It will process and then it will show a dialog box click OK. After this the configuration menu will appear again. You can change the password if you want :)  [use UP and DOWN arrow keys to scroll]. Next thing is hit Finish [use LEFT and RIGHT arrow keys to access select and finish]. It will ask if you want to reboot hit yes. 
  • Now your connection will be lost close putty. let the Pi reboot. what we did was expanded the filesystem so that it will access the whole SD card memory and not just the chunk of it. This will give you a lot of memory for applications or storing other files.
  • Once the green light stops blinking it means the RPi is ready. Open putty, enter the IP and log in to RPi again.
  • Now lets update the RPi OS before installing any other packages [Internet required obviously]. Type the following commands :- 
sudo apt-get update
  • Once this is done then type the following command to update the software packages 
sudo apt-get upgrade
  • Once this is complete type the following command to install the VNC server on the RPi
sudo apt-get install tightvncserver
Click to enlarge
  • It will ask if you want to install the package ? Type Y and proceed. Once this is installed now let us set up the VNC Server
  • Type 'vncserver :1' and hit enter it will now create a server named 1. It will ask you to set the password. After setting up the password it will ask if you want view-only password ? Y will always show your password and N will keep it hidden. Choose whatever you want, I prefer 'N'.
click to enlarge
  • WHATEVER WE DID ABOVE WAS A ONE TIME PROCESS. so we have the RPi OS updated and VNC server package installed and set up. so lets use it.
  • Now close down this putty session and open new putty again. Enter the IP address and on the left hand side go to SSH and click tunnels.
  • Here type the number '5901' under source port. [1 because we created a server named 1, it would have been 5902 if we would have created vncserver :2].
  • In destination type your IP address then a colon and the source port eg:- and click on add. you will see something appearing under forwarded ports. That's it click on open.
Click to enlarge
  • Log in using 'pi' and password as 'raspberry'. This time we opened up the port through tunneling.
  • Open up the VNC Viewer and type localhost:5901 and hit enter type the password that you set for the vncserver and you will see a desktop GUI to deal with :)

  • Congratulations you have successfully set up the RPi and you are ready to use the desktop for programming and other purposes. Explore the desktop browse the net etc. Have Fun & Enjoy :)
After all this when I want to log in again what is to be done ? It is simple
  1. You will have to connect the RPi and give it power, check its IP address.
  2. Open putty, type the IP and log in.
  3. Type vncserver :1 and close putty. 
  4. Open putty again type the IP address > Go to the SSH > tunnels > then type the source port 5901 > click on destination > type 'IP address:5901' and click add. After this click open.
  5. Open VNC viewer on desktop type localhost:5901 and enter the password.
  6. That's it you have the Raspberry Pi desktop in front of you !!
Have Fun :) 

Visit the next post on 'How to do File Transfers between Raspberry Pi & PC ?'.
click here.

Like My Facebook Page :-
Doubts and suggestions are welcomed in the form of comments.
Thank you for reading.
Follow my blog & stay tuned :)

Tuesday, 12 January 2016

#4 Booting Up Raspberry Pi - The Easy Way [Part 1].

Raspbian OS [using VNC Server].

This is 4th post on Raspberry Pi tutorial.
If you want the list of posts click here. 

We have learned a little bit about Raspberry Pi, we have installed OS into the SD card and its ready to be booted up, we have seen two methods of setting up raspberry pi. The first method is pretty simple just connect all the peripherals and power up the board. The second method is little tricky but its cheap and easy way of setting up the Pi, all we need is a Ethernet LAN Cable. So lets begin.
  • Download this two applications on your computer desktop/Laptop
    1. Putty [For Windows]:-
    2. VNC Viewer [For Windows] :-
  • After downloading this on your computer lets begin with the connections.
  • First you must understand that we have two ends of the LAN cable one obviously will be connected to the Raspberry pi's Ethernet port and other ? well we have two options here, connect it to the Router or connect it to the PC's/laptop's Ethernet port  

  • Now depending upon how you connect there are few possibilities :-
    1. Router :- This is the best option. You will connect the Raspberry Pi to the Router with LAN cable. The Computer/Laptop is already connected to the router and the Internet LAN wire is also connected to the router. So each device is connected to internet as well as each other :)
    2. Computer :- CPU just has one Ethernet port so if you connect the Raspberry Pi, the connection between them will be established. Now if you want internet access then you will have to connect the WiFi dongle or Internet Data Card to either your computer or raspberry pi and configure it for internet access.
    3. Laptop :- The above is true for laptop also. Just one extra thing, laptop has a inbuilt WiFi module, so you can access the internet through this. [You need to configure your connection to access Internet this way].
Raspberry Pi's IP Address when connected to Router :- 
  • Connect the Ethernet LAN Cable and establish the connections, give power to the Raspberry Pi through the mini USB port. [5V & 1A Adapter or the Raspberry Pi Adapter].
  • Your Raspberry Pi will now boot up. While booting up the red and green LEDs on the board will blink continuously and when the green LED stops blinking it indicates that booting is complete.
  • Now you need to find the IP Address of the Raspberry Pi. The easy way is using the IP Scanner software. Download it here.
  • Using that software get the IP address of your Raspberry Pi. If you don't have the software and still you need the IP here is what you can do
    1. Go to the routers login page e.g. :- 
    2. Log in to your router and go to advance settings and then click on LAN setup.
    3. Scroll down and you will see list of all the devices connected to your router. Note down the IP address of the Raspberry Pi
click to enlarge
click to enlarge

Raspberry Pi's IP Address when connected to Laptop/Computer directly :- 
  • If you don't have a router and you are directly connecting Raspberry Pi to Computer/Laptop click here.
  • Follow the above post & then continue :)
Steps to be followed after acquiring Raspberry Pi's IP address :-
  • Once you have the Raspberry Pi's IP address, open up putty and enter the IP address and click Open. [The port by default is kept 22, don't change it].
click to enlarge
  • It will pop up a window and tell you that do you trust the connection and stuffs... just hit yes. 

  • Now enter the login username as 'pi' & password as 'raspberry' [this are default]. Note:- You won't see anything while typing password. It's a Linux security trick. 
Click to enlarge
  • That's it !! You have successfully booted up the Raspberry Pi and logged in to the Raspberry Pi. You can now do stuffs with the Raspberry Pi terminal such as update your OS, install/uninstall packages, shutdown/reboot your Pi etc...
  • NOTE:- This is a Linux Terminal so the commands differ from the normal windows commands. Just one tip, Don't mess up :-P because changes you make here are actually happening inside the Raspberry Pi's OS, so handle with care.
So this is it ? Will I have to deal with the terminal the whole time ? No GUI ? Nothing like windows, Linux desktop to interact with ?
No this is not the end of this, check the first pic of the post. You can see the RPi desktop over there. This means we have a GUI, a Linux based GUI to deal with.
How to reach there ? check the next post :)


Visit the next post 'Booting Up the Raspberry Pi - The Easy Way [Part 2]'.
click here.

Like My Facebook Page :-
Doubts and suggestions are welcomed in the form of comments.
Thank you for reading.
Follow my blog & stay tuned :)

#3 Setting Up Your Raspberry Pi - Part 2

Raspberry Pi Operating Systems
This is 3rd post on Raspberry Pi tutorial.
If you want the list of posts click here. 

In the previous post we saw two methods of setting up our Raspberry Pi, the missing thing was the OS. So in this post lets see how to set up the OS in the Raspberry Pi.
If you turn the board upside down you will see a micro SD card slot. Now we need a Micro SD card with the OS in it and then we have to insert the card into this slot. So lets begin!

Things you need :- 
  • A micro SD card [or a full size SD card, depending upon your RPi model] [Minimum 8GB is recommended].
  • Raspberry Pi Operating System.
  • Win32Disk Imager Software - click here.
  • Card Reader [to connect the card to your PC].
Now connect the SD card to computer [assuming it is Windows], If it is not empty format it and make sure it is FAT32. We need a OS image to write it in the SD card, the question is which OS to download ?

The Raspberry Pi, as we know is a SoC. The OS that we will be using is a different type of OS i.e it is not the same OS that we use on our computers. OS in our computer is a GPOS [General Purpose Operating System]. The OS for the Raspberry Pi is optimized, it has a low footprint [small size] and it some what resembles RTOS [Real Time Operating System].

There are various options available at Raspberry Pi Operating System's download page.
  1. NOOBS :- A GUI setup to install Raspbian or it even helps you download different OS and install on your SD Card. [Note:- NOOBS requires standard way of setup, i.e. if you will be using a computer and Ethernet LAN cable for RPi connection NOOBS won't work]. 
  2. Raspbian :-  OS that raspberry pi recommends. [It is not made by Raspberry Pi]. This Image will allow you to install the Raspbian directly unlike NOOBS.
  3. We also have Ubuntu Mate, Snappy Ubuntu Core, Windows IoT, Openelec, Pinet, RISC OS, OMSC.
All of the above OS's are made for Raspberry Pi only and they have their own specialty. Among all this 'Raspbian' is widely used by beginners. Many of the above OS's are Linux based including Raspbian. Raspbian is Debian based OS and It comes in two flavors as of now Raspbian Jessie and Raspbian Wheezy. Jessie is the latest version of the Raspbian OS. [I will obviously prefer Raspbian Jessie and ask you to download this].

You can definitely try the rest of OS's once you are quiet good at using Raspberry Pi, for now lets stick to Raspbian. You can go for Wheezy or Jessie [Wheezy gave me a lot of problems, I don't know why, so I installed the latest version Jessie].

Once you download the Image file of the Raspbian Jessie then using Win32Disk Imager software just write this image on the SD card, which was FAT32 Formatted. [This is the only way of writing the OS, reason being the OS is Linux based so the SD card has to be formatted in a way that is Linux compatible, windows cannot format it that way, so this software is used].

After the writing is complete you will see that only few MBs partition of the SD card is shown by windows explorer. The reason for this is OS creates partitions and installs itself, this partitions are Linux based, windows cannot show them! So don't Panic :)

Now you are done, just remove the SD card and insert it into the Raspberry Pi. 
[Don't boot up :-P, we will be doing that in next tutorial]

  • If you need to reformat the SD card using your windows desktop and since your SD card partitions are not visible, use a partition manager software.
  • I use Mini Tool Partition Wizard.
  • This tool will show you all the partitions of SD card on windows and will allow you to format the SD card and install a different OS or reinstall OS.
  • Just follow simple steps wipe the data, delete all partitions and create a single NTFS partition and click apply.
  • Now your SD card will be just normal as it was before you began with all this.
Visit the next post 'Booting Up Raspberry Pi - The Easy Way [Part 1]'.
click here.

Like My Facebook Page :-
Doubts and suggestions are welcomed in the form of comments.
Thank you for reading.
Follow my blog & stay tuned :)

#2 Setting Up Your Raspberry Pi - Part 1

Click and zoom for better results
This is 2nd post on Raspberry Pi tutorial.
If you want the list of posts click here. 

Now once you have an idea about what is raspberry pi and assuming you have one of its model lets proceed. Before setting up raspberry pi lets take a good look at our board. [I am considering RPi 2 here].

If you have any other board then use this link here, to get specs of your model. Referring this post list out things about your board.

Specifications about our Raspberry Pi 2 :-
  1. Soc - Broadcom BCM 2836 
    1. CPU - 700 MHz Quad Core ARM cortex A7
    2. GPU - Broadcom VideocoreIV @250MHz
    3. SDRAM - 1 GB [Shared with GPU]
    4. DSP [Digital Signal Processor]
  2. USB - 4 Ports v2.0
  3. Video Input - 15 Pin Camera Interface Connector
  4. Video Output - HDMI port, DSI Display Connector
  5. Audio Output - 3.5mm Jack
  6. Network - 10/100 Mbit/s Ethernet Port
  7. 40 Pin GPIO header
  8. Power - 800mA 5V Micro USB
So the diagram and the specs will give you a little idea about the board.
Now there are two ways to set up our Raspberry Pi.
  1. Standard Way :- 
    1. Connect Keyboard & Mouse to the USB Ports
    2. Connect a HDMI monitor to the HDMI port [or use a HDMI to VGA converter for connecting to a Computer Monitor]
    3. Connect a 5V micro USB adapter for power
    4. Connect a WiFi dongle or Ethernet LAN cable for internet connection
  2. Easy Way:-
    1. Connect Ethernet LAN Cable to your Desktop/Laptop
    2. That's it :-P [I am not kidding :D]
So it's pretty obvious that I will be preferring second way [I am kind of lazy :-P]. While discussing all this I guess we all forgot something! Do you remember I was telling something about OS ? Yes We didn't discuss anything about it. How to put OS into my board ? Which OS is needed ? Answer lies in the next post :)

Visit the next post 'Setting Up Raspberry Pi - Part 2'.
click here.

Like My Facebook Page :-
Doubts and suggestions are welcomed in the form of comments.
Thank you for reading.
Follow my blog & stay tuned :)

#1 What is Raspberry Pi ?

This is 1st post on Raspberry Pi tutorial.
If you want the list of posts click here.

The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. You might be aware of the entry level micro controller "Arduino" [Click here for Arduino Tutorials]. In the first post of the Arduino tutorials I had mentioned about the micro processor and micro controllers, so is raspberry pi same ?

Answer to this question would be no! Raspberry Pi is a SoC [System on Chip], the exact meaning of which can be found here. In layman's language it is a computer, small sized computer. It consists of a RAM, OS, Ethernet, USB ports etc., unlike Arduino.
It is way more powerful then Arduino because it has a processor with high clock frequency, RAM, Digital Signal Processor [DSP] and it has a OS [it's not a general purpose OS, we will talk about this later].

RPi is capable of performing heavy mathematical calculations, simulations etc. and believe me the major reason for people to prefer RPi is its CHEAP ! [Compared to other SoCs].

It’s capable of doing everything you’d expect a desktop computer to do, from browsing the internet and playing high-definition video, to making spreadsheets, word-processing, and playing games or even making your own electronic/computer based projects.
The Raspberry Pi Foundation is a registered educational charity (registration number 1129409) based in the UK.

Raspberry Pi Official Website :-

Here is video that will give you a little more idea about Raspberry Pi :-

You can buy Raspberry Pi from various retailers or their official store. There are many versions of Raspberry Pi like Raspberry Pi A, A+, B, B+, Raspberry Pi 2 etc.
Versions differ in their CPU clock speeds, RAM and GPIO [General Purpose Input Output] Pins. Depending upon your use you can choose one. [I will suggest to use the wiki link given above because they have made a table out of all specs of each RPi model].

So now I guess you have a pretty good Idea about what Raspberry Pi is and what it can do. In the following posts I will be taking Raspberry Pi 2 for consideration. [You can choose any of the above boards, tutorials will be general for every RPi model].
Once you learn using one board you can really work on any of them easily & by yourself.  

Visit the next post 'Setting Up Raspberry Pi - Part 1'.
click here.

Like My Facebook Page :-
Doubts and suggestions are welcomed in the form of comments.
Thank you for reading.
Follow my blog & stay tuned :)