Skip to content

WiFi and ssh Configuration on RaspberryPi with Yocto Image

Dan Walkes edited this page May 6, 2023 · 4 revisions

Overview

  • This page describes how to setup Wifi on Yocto.
  • A working example for Raspberry Pi can be found at this pull request

Implementation Steps

Add Wifi Region

WiFi is region specific and therefore it is advisable to add the country to the build. This will enable your country specific specifications for WiFi. In your core-image.bb make sure to include the following:

  1. The below code will add region specification database to your build IMAGE_INSTALL:append = " wireless-regdb-static"

  2. The below code will set United States as the build country. You can set the code to any country as you desired based on the ISO2A Country code WIRELESS_REGDOM = "US"

The bellow are steps to connect to a network

  1. Make the default configuration for Yocto image for raspberrypi3 .

  2. Modify build.sh script to add wpa_supplicant and other required packages for Wifi and ssh. Make sure meta-python and meta-networking are added. Please Refer to this pull request for reference.

  3. Build an image and flash it on SD card.

  4. After booting RPi with new image, modify /etc/wpa_supplicant.conf as described here.

  5. Reboot the RPi and login with root.

  6. bring up wlan0.

ifup wlan0

Check with ifconfig if wlan0 got ip address.

Output

Ping 8.8.8.8 or google.com.

login with putty from your laptop with ip address of wlan0. Ping to google from ssh window.