Wireless configuration of the Raspberry PI 3 B +

  • Tutorial

image


Hi,


A few months ago, I bought myself a raspberry, in order to practice embedded-type development. I’m sure many people from Raspberry’s acquaintances believe that at least RJ45 or a monitor, keyboard and mouse (which is better) are needed for the initial launch of the microcomputer. Today we will debunk this myth with a search query raspberry pi headless setup . For this we will use a Wi-Fi network and SSH protocol.


If you already have a board and an sd card, but there is no additional monitor and especially an ethernet cord, then you need to make additional movements to successfully install the OS on your board and the possibility of its use.


  1. We select the desired OS (there is a list of available on the site ) , download the archive from the site (I used Raspbian)
  2. Install the OS on a USB flash drive . After unpacking the archive, you need to write a disk image with the extension imgto a formatted sd-card (the card should have enough memory, in my case I used 16gb). You can use Etcher (works on all platforms), Win32DiskImager (for Windows) or any other utility for this.
  3. Create a filewpa_supplicant.conf . Next, you need to create a configuration file for wpa_supplicant, where we specify the parameters of our wi-fi network.


    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    country=UA
    network={
    ssid="Your network name/SSID"
    psk="Your WPA/WPA2 security key"
    key_mgmt=WPA-PSK
    }

    you need to register the parameters ssid, psk, country. the file must be added to the root of the bootable flash drive in the boot section -/boot/wpa_supplicant.conf


  4. To create a filessh
    to activate ssh access to our board, you need to create an empty file/boot/ssh
  5. We launch the OS on Raspberry PI.
    After the above, you can insert a USB flash drive into the board and apply power.
  6. We are looking for our board in the local network, the
    board must connect to our local wi-fi network and we can detect it using Advanced IP Scanner (Windows) or nmap (Linux command sudo nmap -sP 192.168.100.0/24needs to use the IP address of your local network - you can find it out using ifconfig)
  7. We connect to Raspberry via SSH
    after we found out the address of our board on the network, we can use the ssh interface for a remote connection. For Windows users can install PuTTY for Linux we will use ssh. Detailed instructions for connecting via PuTTY are here . If you have Linux, then we connect using ssh pi@192.168.100.103(specify the address of your board). A password entry line will appear - the standard password raspberry- enter it and press enter.

That's all we have full access to the Raspberry OS. If you suddenly need a graphical interface, you need to look for VNC and RDP.


Hope it was helpful!


Also popular now: