Connecting To Your Raspberry Pi

RASPBERRY PI – CONNECTING TO

To connect to your RPI3B+ may seem impossible without being able to see it but it is quite simple if you follow the instructions below.

Just as a quick note, if you want to connect to a mobile phone and use that as your wireless network(maybe you dont have a fixed internet and only use mobile phone internet), then that is possible and easy providing you can connect a keyboard and monitor first to connect to the wireless of the mobile phone. If you then connect your computer to the phone using the phone as a mobile hotspot, then you can follow along from here.

Ok so the basics of networking are very much like the mail system. Everyone has an address and their mail is delivered to that address. When you send a mail, you write your address on the back of it. Simple right – if only it were that simple, but for now we will follow this analogy and slowly get to super coder level.

Ok, so the first thing we need to know is where are we. If we don’t know where we are, we don’t know where to go or how to get there. To find out where you are on the network, Your Network Address, we need to open a way to talk to the pc we are using at the moment. In windows we use the command prompt and Linux we use the Terminal or console application. Depending which one you use, follow the below

If using windows, type in the search box ‘cmd’ but without the quotes and press enter. I am using windows 10 and it looks as below. Click the ‘Command Prompt’ icon.

If using Linux then click the Terminal icon in the Task Bar normaly at the top of the screen, its a black square icon with a blue bar across the top and a forward chevron with an underscore in the black area.

You should now have a mainly black window open which we can type into. If using windows, type ‘ipconfig’ or linux ‘ifconfig’ again without the quotes.

You are looking for something called ‘IPv4 Address’ (Linux is ‘inet’), note on mine I have 192.168.43.217. This is because I am connected to a mobile phone. If I where connected to a fixed landline internet router, I would most probably have 192.168.1.09 so if yours looks different, don’t worry. Another difference is that I am connected wirelessly having connected my RPI3B+ to my phone aswell but if you have connected to the wired hub then your address will be under Ethernet adapter. Anywhich way we get the information but just don’t worry if its a different section as long as we have an address.

To test your connection, your should ping your gateway but if using a mobile, like I am today for this piece, then you can’t. What you can do is ping yourself so I will type ‘ping 192.168.43.217 and wait for a reply as below.

Why is this important, its like checking the letter flap works and is not screwed shut.

Ok so now we need to find the other devices on the network so lets use the address resolution protocol and type ‘arp -a’ in the cmd(Windows) or Terminal (Linux) application. If you want to see what other functions you can do here then type ‘arp -all’ and it will list what each function of the arp option can do and how to access it. but we want -a and list all our connected devices as below.

Now remember our IP address ended .217 and is listed above everything else. This function shows that it has identified where the request has come from and can see everything else. If you later run this on your raspberry pi, the ip addresses will change position. Ok so above I can see there are 3 other numbers starting 192.168.43. we now the one ending .1 is the gateway so our pi is not that. It is also not .255 for complicated reasons you will understand much later, or google it now, as this is typicaly the broadcast address. Ip addreses only go upto 255 and the highest number is normaly used as the broadcast by default. So surely my raspberry pi is .244 so I will ping 192.168.43.244 and low and behold I get 4 replies as before when I pinged myself.

OK so now we know our address of us and the RPI3B+, how do we access it. There is a multitude of ways from SSH, and we will cover some of the android apps much later but we will use what we get with windows 10 and that is remote desktop.

In the search box, type ‘Remote Desktop’ and click on the application as below

Now ‘raspberrypi’ in the computer dialogue box. Now click the button marked connect.

You should now have the xorg screen shown as below. Type the username and password of the RPI3B+. If it is new then the user is pi and the password is raspberry. Now Click Ok as below. note I have already changed my password.

Ok so if everything has gone smoothly then we should have a connection to a screen as below.

If you move your mouse around and click on icons, you will see stuff happening. This is because you have control of the RPI3B+ and thus with one computer, you have the ability to use 2. There is no reason that this can’t be a 1000 or more. long over are the days of having to wait for something to finish processing before you can get back on the net or whatever you were doing.

This is the essence of cloud computing. Now in cloud computing you use software created computers and it all gets complicated with hardware resource sharing but at the moment we are running another computer that is tucked away out of sight and can be doing work while we go off and enjoy ourselves. So if that was your aim with your RPI3B+ then great, you are there.

This tutorial is aimed at getting the most fun and learning out of the RPI3B+ so we want to configure the wireless to connect to the hub like you most likely have your laptop at the moment. If you can click on the wireless icon at the top right, on the RPI3B+ remote desktop and connect to your wireless now, we can move on to the fun stuff and going through the accesories / Toys.

See you on the next topic.