官术网_书友最值得收藏!

Connecting the Raspberry Pi 3B+ to a Wi-Fi network using PuTTY

After inserting the microSD card into the RPi, let's see how to connect the Raspberry Pi to a Wi-Fi network using PuTTY:

  1. First, connect one end of the Ethernet cable to the Ethernet port of the Raspberry Pi, and the other end to the Ethernet port of the laptop. 
  2. Next, power up the Raspberry Pi 3B+ by connecting it to the laptop using a micro USB B cable. We will see the red power LED turn on. We will also see that the yellow LED of the Ethernet port turns on and blinks continuously.
  3. After that, open the PuTTY software. Inside the Host Name box, type raspberrypi.local and click on the Open button:
  1. We will then see a PuTTY Security Alert message. Click Yes:
  1. Inside PuTTY, we will need to enter the credentials of the Raspberry Pi. The default login is pi and the password is raspberry. After entering the password, press Enter:
  1. After that, to connect the Raspberry Pi 3B+ to a particular Wi-Fi network, enter the sudo nano /etc/wpa_supplicant/wpa_supplicant.conf command as shown in this screenshot:
  1. This command will open the nano editor, which will look as follows:
  1. Below the update_config=1 line, enter the name and password for your Wi-Fi, following this syntax:
network={
ssid="Wifi name"
psk="Wifi password"
}

Make sure that you add the preceding code exactly below the update_config=1 line. The Wi-Fi name and the password should be in double quotes (""), as shown here:

After entering the Wi-Fi name and password, press the Ctrl + O keys to save the changes. Then, press Enter. After that, press the Ctrl + X keys to exit the nano editor.

  1. To reconfigure and connect the Raspberry Pi to the Wi-Fi network, enter the following command: sudo wpa_cli reconfigureIf you have connected successfully, you will see the type of the interface and an OK message:
  1. We will then need to restart the Raspberry Pi. To do this, type sudo shutdown now. Once the Raspberry Pi is shut down, close the PuTTY software.
  2. Next, unplug the USB cable from the laptop. 
  1. After that, unplug the Ethernet cable that is connected to the Raspberry Pi and the laptop.
  2. Re-connect the USB cable so that the Raspberry Pi turns on.
  3. Open PuTTY. Inside the Host Name field, enter raspberrypi.local again and press the Open button:
  1. Enter the username and password that we used previously.
  1. Once the Raspberry Pi is connected to the Wi-Fi network, the Wi-Fi network will assign it an IP address. To find the IP address, enter the ifconfig wlan0 command and press Enter. You will notice that an IP address has now been assigned:
In my case, the IP address is 192.168.0.108. Please note down your IP address somewhere, as you will need to enter it when using the VNC Viewer software. 
主站蜘蛛池模板: 马关县| 云梦县| 安义县| 阿克陶县| 麟游县| 阿荣旗| 河北区| 泗阳县| 鄱阳县| 尤溪县| 扶绥县| 常宁市| 怀集县| 华蓥市| 成武县| 增城市| 苍南县| 苍南县| 承德县| 和田县| 江门市| 罗江县| 阜南县| 鲁甸县| 荣成市| 民丰县| 乡宁县| 雷州市| 兰州市| 兴隆县| 依安县| 进贤县| 仁化县| 永昌县| 前郭尔| 上杭县| 海兴县| 建瓯市| 黑山县| 哈尔滨市| 云和县|