website
Skip to content

Raspberry Pi

#4-Methods of Connecting to Raspberry Pi Remotely

by Robotistan Shopify 27 Apr 2023

Methods of Connecting to Raspberry Pi Remotely

In this article, I will explain different methods to control Raspberry pi remotely. It'll be convenient when there is no screen, keyboard, or mouse connected to the Raspberry Pi.

 

The first method is accessing the console with a TTL Serial Cable Using the GPIO Connections on the Raspberry Pi:

 

Requirements: 

 

In the previous article, I mentioned that there are communication ports with different functions on the GPIO connector of the Raspberry Pi. One of these communication methods is UART serial communication. If you've used Arduino or similar boards, you must have encountered serial communication at some point. Serial communication can be accomplished without facing any issues by using two pins, which are TX and RX. The UART on the Raspberry Pi can be used for serial communication like the Arduino and serial console. Firstly, we need to be sure that the serial console is enabled from the Raspberry Pi settings. For this step, you can refer to our Raspberry Pi Tutorials 2: Basic Settings for Raspberry Pi (All Settings You Need).

Raspberry Pi Configuration, Interfaces Tab

The PL2303 USB-Serial converter used in the article is not automatically recognized in recent Windows OS. Click for the driver installation guide.

PL2303 Pins

Raspberry Pi 4 Pins

The connection of this cable with Raspberry Pi 4 should be as follows:

Connections, Rpi – PL2303

Make all connections and leave the +5V connection at the end. After that, connect the USB cable to your computer. Download the PuTTY program from this address. You can run it by double-clicking on the program icon. Find the COM port number of your USB-Serial converter under ‘’Ports (COM and LPT)’’ by opening the “device manager” on the computer.

Device Manager

 

 

 

Open PuTTY. Configure its settings as follows and enter the COM port number that corresponds to your USB-Serial converter connected to your computer. We enter 115200 for the baud rate.

PuTTY Configuration

After these settings, open the tab by clicking ‘Open’. If you haven’t connected the 5V cable yet, you will only see a black screen.

COM6 PuTTY

After this stage, when you connect the 5V, texts appear on the screen as shown below.

Com6 – PuTTY Login Screen

WARNING!

It’s possible to power your Raspberry Pi with the 5V from this cable. However, when high processing power is required or when you connect USB devices that draw high currents to your Raspberry Pi, the current drawn may not be sufficient. In this case, you can power your Raspberry Pi with your micro USB adapter without connecting the 5V connection from the cable.

 

Another Way of Connecting Remotely is SSH Connection:

 

SSH is short for Secure Shell. In Unix systems(Linux, FreeBSD, Mac OS X, etc.), it provides remote console access. Thanks to this remote access you can control your Raspberry Pi with your computer or even your smartphone. All you need is to connect your Raspberry Pi to a working network. Let’s enable SSH first.

First, run the program with the “raspi-config” command. By following the order of Interfacing Options>SSH>Enable, you can enable SSH access to your Raspberry Pi.

Confirmation Screen

Alternatively, you can enable the SSH service on the “Interfaces” tab.

Another alternative is while your SD card is plugged into your computer, to save an empty file name ‘ssh’ in the boot partition of the card.

Boot File

Saved File

To see the IP address of your Raspberry Pi, you can use this command:

After enabling SSH access, you can connect to your Raspberry Pi with any SSH client you wish. If you’re using Linux or Mac OS, you can make your SSH connection with the code below.

The default user name is ‘pi’. If you’re using windows, you can download the program called PuTTY from this link.

PuTTY Configuration

In the PuTTY interface, enter the IP address of your Raspberry Pi then click “Open”. As you haven’t connected to the device before, an alert will ask you whether you recognize the RSA2 fingerprint of the machine at this address or not.

 

Security Alert

 

By entering the username and password on the PuTTY window, you can connect to your Raspberry Pi via SSH.

An Important Warning!

When you first enable SSH access, your password is “pi”.

It’s recommended to change the password by using the command mentioned above. The default username and password in the Rasbian operating system are “pi” and “raspberry” respectively. In the current version of Raspbian, the SSH service won’t work if the user does not change their password."

 

Hint: An SSH connection can be established using the program called “ConnectBot” on your smartphone with the Android operating system.

The Third and Most Practical Method is VNC, Which Allows for Remote Desktop Connections.

 

VNC is short for Virtual Network Computing. It’s a free and open-source remote desktop access program. Since it’s free software, it’s supported on many platforms. After configuring this VNC server, we’ll need a VNC client for remote access. For the VNC server, it’s necessary to use the RealVNC client program. You can get the latest version from this link according to the OS you are currently using. There are versions compatible with Windows, Linux, or Mac OS.

How to Find a Raspberry Pi IP Address?

All Ipv4 and Ipv6 addresses related to the connections on our Raspberry Pi can be seen here. We’re interested in an IP address associated with wlan0 or eth0.

RealVNC asks us. We enter our default username and password(“pi”,” raspberry”). But of course, you’ve changed it already, right? After entering the required information, we can now access our Pi.

 

 

Keep Learning More about Raspberry Pi 4

 

Raspberry Pi is a platform with many advantages and is admired by other developers. With the support and convenience in electronic projects, computer science, and robotics studies, Raspberry Pi makes learning enjoyable, and this module is developing day by day. Don’t you also want to improve further? We take you on a journey with Raspberry Pi to improve your Linux knowledge, dive into the electronics world, and carry out fun projects. Keep following the Raspberry Pi training series that has been prepared for you.

 

You can visit our online store and meet your material needs.

The Raspberry Pi model that will be used in future projects can be easily accessed from this link.

 

 

 

Prev Post
Next Post
Someone recently bought a
[time] ago, from [location]

Thanks for subscribing!

This email has been registered!

Shop the look

Choose Options

Robotistan
Have Questions?
Back In Stock Notification
this is just a warning
Login
Shopping Cart
0 items