Skip to main content

Controlling Raspberry Pi B/B+ from your smartphone (Tutorial)

In this tutorial I'll tell you how to control your raspberry pi from your smartphone. So follow below tutorial and say good bye to monitor,keyboard and mouse.

Requirements:

1)Raspberry Pi
2)Wi-Fi adapter
3)Smartphone with Wi-Fi Hotspot feature (I would be using Android in this tutorial)

Tutorial:-

Step 1) First install Raspbian OS in SD card and connect SD card to your PC

Step 2) Raspberry Pi Configuration  :


-Open SD card using file manager as shown in this SS:-



 




-Now press Ctrl+L and copy the location as show in this SS:-










-Now open terminal and change directory to SD card location like this :-

       cd /media/c1398422-7a7c-4863-8a8f-45a1db26b4f2

-Now run below commands  :-

Command 1:

sudo echo "
auto wlan0
iface lo inet loopback
iface eth0 inet dhcp
iface default inet dhcp
iface wlan0 inet dhcp
allow-hotplug wlan0
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf">etc/network/interfaces



Command 2:

sudo echo "
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="mynetworkname"
psk="mypassword"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}">etc/wpa_supplicant/wpa_supplicant.conf

NOTE:- Replace ssid and psk values with your actual ssid and password.

Step 4) Wi-Fi Hotspot configuration in your smartphone:

-Go to settings and give your desired network SSID and password but make sure to replace "mynetworkname" and "mypassword" with your network SSID and password.



-Now insert SD card and connect Wi-Fi adapter then start your Raspberry Pi

-Now after few seconds and you will get a connection from Raspberry Pi to your smartphone like below:








-Note down the IP address (192.168.43.8)



Step 5)SSH Client Configuration:

- Install JuiceSSH in your android (or if you don't have android then install any supported SSH client and configure it and run)

- Now using SSH client (JuiceSSH) connect to IP address of raspberry pi which we got in step 4 using default credentials-

Username:- pi
Password:- raspberry

JuiceSSH  Guide:-

a)Open JuiceSSH and click on thunder like icon located at top right corner and enter your Raspberry Pi details like this:



Here "pi" is default username of Raspberry Pi SSH and "192.168.43.8" is IP address which we got in step 4.

b)Now type the password as "raspberry"



 c)Now click on "Accept"



d)Now you are ready to send your commands to your raspberry Pi ;)





Step 6)Installing VNC on Raspberry :-

-Run below commands:-

Command 1 :- sudo apt-get update
Command 2 :- sudo apt-get install tightvncserver

-Now start vnc server by this command and enter new password if asked:-

   sudo vncserver:1


Here 1 is port number ,you can give any unreserved port number.

-You can reset your password by :-

  sudo vncpasswd


-That's it.



Step 6)Installing VNC Client in your smartphone :-

-Download and install VNC viewer in your android and run it.
-Now enter address in ip:port format and give any desired name.
For example:- 192.168.43.8:1
Here 192.168.43.8 is my raspberry pi IP address and 1 is port number on which VNC server is listening.


Now just click on connect and enter password when asked and you are ready to go.




Got any problem?
Ask in comments :)

References:-

http://gettingstartedwithraspberrypi.tumblr.com/post/24142374137/setting-up-a-vnc-server

http://itfixed.blogspot.com/2009/05/how-to-change-vnc-server-password-on.html



Comments

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. You have written a useful thing.It will be helpful for me.Thanks for sharing with us.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete

Post a comment

Popular posts from this blog

JSP ContextPath Link Manipulation - XSS

This post is about how to manipulate resource links of HTML elements (script, img, link, etc) when getContextPath method is used to obtain base path of resources. With the ability to manipulate links you can do XSS, CSS Injection, etc.

Basically we are going to use path parameters to manipulate context path such that links would point to attacker's domain. There's a good blog that talk about the similar issues : https://superevr.com/blog/2011/three-semicolon-vulnerabilities

However this post is more about manipulating context path to hijack resource links of HTML elementsSo let's have a look at a simple JSP page (test.jsp)


This page just loads some resources like script, image, css and that's it. It doesn't take any direct input from user but it is using value returned by request.getContextPath() as base path to resources link.

What can we do here?

Let's try to control the base path by using path parameters :

http://127.0.0.1:8080/;pathParameter/contextPathEx…

Xssing Web Part - 1

Xssing Web Part - 1
Hello,

I'm thinking about sharing everything I know about XSS :) However it's not possible to put all methods in one single post so I would be making several parts of "Xssing Web". Mostly I would be talking about how to bypass XSS filters and how to turn most of non exploitable XSS to exploitable.


All of you might have encountered one such end point that takes URL as parameter and redirects to it using javascript like :

location.href='URL' 
or
window.location.href='URL' 
or
window.location.replace('URL') 
or
window.location='URL'


In this post I would be talking about how to get XSS in such situations and how to bypass their filters.

First thing we can do here is try 'javascript' protocol or 'data' URI scheme.

window.location='javascript:alert(1)'
or
window.location='data:html;base64,PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg'

It would execute 'alert(1)' function.

From now onwards I will only be talki…

Xssing Web Part - 2

Xssing Web With Unicodes
Hello friends, 

This is the second part of "Xssing Web". In this post I would show how to abuse unicodes to bypass XSS filters. 
BTW if you want to check previous part click here.

Note : If you think there are any mistakes in this post then kindly mention it in comments.

I have developed several XSS challenges to show how unicodes can be used to bypass filters. If you want to try those challenges first then click here, get back here if you couldn't solve any.


Abusing Unicode :

So what is Unicode?

-> Unicode is nothing but the encoding standard. It defines UTF-8UTF-16,UTF-32, etc encodings.

1) UTF-8 :

Characters Size :1 byte to 4 byte

Example :
Character "A" => 0x41
Character "¡"  => 0xC2 0xA1
Character "ಓ" => 0xE0 0xB2 0x93
Character "𪨶" => 0xF0 0xAA 0xA8 0xB6

2) UTF-16:

Character Size : 2 byte

However in UTF-16 there are two ways to represent any characters.

i) UTF-16be (be- Big Endian) [Left to Right Byte …