Como acessar o Raspberry Pi diretamente pela porta Ethernet do PC – (Parte 03/38)

How to access the Raspberry Pi directly via the PC's Ethernet port – (Part 03/38)

The Raspberry Pi is a single-board mini computer that has only the essential hardware included to meet the low-cost objective. The board is Raspberry pi, runs on ARM11 processor, but is available at an extremely cheap price. The board was designed with the intention of providing computer education to remote schools where PCs are not used much. The idea behind the design is to use the TV screen as the display unit of the Raspberry pi board and thus convert the regular TV into a computer. The board is therefore supplied with an RCA connector that can be used to connect it directly to a TV screen based on PAL and NTSC standards. The board also has an HDMI connector output which can be used to connect the board to an HD TV, but there is no VGA connector assuming there is no PC or PC monitor in the location where the Raspberry pi is used.

There are situations where the person using Raspberry pi has a PC screen but not an HD display device. In these situations, you can use remote login to access the Raspberry pi and view the TUI (Text User Interface) on the PC screen. Using a PC to log in remotely has other advantages, as there is no need for a power adapter, as it is possible to connect the Raspberry pi using the PC's own USB port and use the PC's keyboard to access the TUI. This article discusses how to do remote login in the case where Windows is running on the PC and Ubuntu is installed on the Raspberry pi board .

The only additional hardware required for remote login is a “crossover LAN cable” that comes with connectors on both ends and an internal crossconnect between the connectors on both ends.

Conector Ethernet

Figure 2: Crossover LAN cable to connect Raspberry Pi Ethernet port and router

Remote login can be done easily when a router is available and the user can access the details of the devices connected to the router. All that is required is to connect one end of the LAN cable to the Raspberry pi's Ethernet port and the other end to the router's connector slot. Access the router and find out the IP of the connected devices. The Raspberry pi board will appear in the list with the name “raspberrypi”. Note the IP and try to log in using any remote login software for Windows.

In most cases there will be no router available, especially outdoors with a laptop. Under these conditions it is necessary to make a direct connection to the PC and the Raspberry pi. But within Ubuntu running on Raspberry pi board the internet settings are not configured to allow a direct connection to the PC using a LAN cable. You need to download server software which will provide an IP for the Raspberry pi board and help the PC to establish a connection with the Raspberry Pi board . The step-by-step connection process is explained in the following section.

Step:1 Provide an IP for windows

The software that can be used with windows7 is DHCP server software which can act as a server for incoming connections. Before using this software there are some settings to be made in the windows to enable the connection. Go to Control Panel > Network and Internet > Network and Sharing Center > Change Adapter Settings. Right click on 'Local Area Connection' and select 'properties'.

Acesso Ethernet do Raspberry Pi

Figure 3: Changing the network adapters configuration in Windows

Select Internet Protocol Version 4 (IPV4) and click on the 'properties' button.

Propriedades de conexão LAN

Figure 4: Select the IPV4 Internet protocol and click on 'properties'

Now provide an IP and subnet mask for windows. The IP used in this project is “192.168.0.30” and the subnet mask is “255.255.255.0”.

TCP/IP v4

Figure 5: Allocate IP and subnet mask for Windows

Now click OK and it is always better to restart your system.

Step:2 Connect Raspberry pi

Once the Windows boot process is complete, connect the Raspberry pi board to the PC's Ethernet port. Connect a USB data cable to the Raspberry pi's power port and the other end to the PC's USB port. Wait for a while and an “Unidentified network” will appear in the “currently connected to” list usually present on the taskbar.

Conecte o Raspberry Pi

Figure 6: Unidentified network when connecting to Raspberry Pi

Step:3 Run DHCP Server Software

Unzip the downloaded zip file of the DHCP server software into a folder. Find the executable file “dhcpwiz.exe” inside the folder and run it. Select the network adapter as 'Local Area Connection' as shown in the following snapshot.

Interface de rede

Figure 7: Running DHCP server with LAN connection

Now click on the 'Next' button for this window and for each window that opens, make sure that the default values ​​are not changed. When the window titled “writing INI file” opens, check “Replace existing file” and click the “Write INI file” button.

Escrevendo arquivo INI

Figure 8: Replace Write INI File

Click the 'Next' button again. In the following window that opens, check “Run DHCP server immediately”.

Configuração DHCP

Figure 9: Running the DHCP configuration window for Raspberry Pi

Click on the 'Finish' button now and the following window will appear.

Servidor DHCP

Figure 10: DHCP Server Window

Click “Continue as tray application”. Now button and click “Yes” in the confirmation window that follows. Now the DHCP server is running on the Windows system and the icon can normally be found on the taskbar.

Step:4 Reconnect the Raspberry pi board

Once the above steps are completed, turn off the Raspberry pi board by removing the USB data cable from the PC. Now turn the board back on and after the Raspberry pi boot process appears to be complete, a notification will appear in the DHCP server software as shown in the following snapshot.

Atribuindo IP ao Raspberry Pi

Figure 11: IP address to run the Raspberry Pi board

Make a note of the IP address as you need to log in to the Raspberry pi board using the software that helps with remote login.

Step:5 Remote login using PUTTY

Massa is an SSH and telnet client software commonly used with the Windows platform. Download the latest version of PuTTY and open the .exe file.

Configuração PuTTY

Figure 12: Remote login using Putty for Raspberry Pi Board

As shown in the above snapshot, enter the IP noted earlier and keep the default port number. Select SSH mode by clicking the “SSH” radio button. Now click on the “Open” button and click on “Yes” so that the confirmation window will follow and PuTTY will display the TUI of the Raspberry pi board.

Fazendo login no PuTTY

Figure 13: Raspberry Pi TUI

Enter the default login and password and start exploring Raspberry pi .

The default login and password are:

login as: pi

password: raspberry

Related Content

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.