Enable wifi support in our RPi3 demo images

Description

It is not always easy to find an Ethernet cable and slot for testing (Hosted) Mender images on reference devices. Raspberry Pi 3 comes with a wifi module built in. This task is about enabling wifi in our Raspberry Pi 3 images, and there is a [separate task|MEN-1805] for allowing the user to set his SSID & password into the images.

Acceptance criteria

  • Our Raspberry Pi 3 images (both .sdimg and .mender) comes with WiFi enabled

  • If the SSID & password for a wifi is set correctly (configuration option), the Mender client will connect to the Mender server using wifi

Affects versions

None

Environment

None

Checklist

Activity

Show:

Ole Petter OrhagenApril 30, 2018 at 8:41 AM

Mirza KrakApril 4, 2018 at 9:54 AM

I used to do this way back when I worked with the RPi port. Have my own meta-mender-demo layer that setups up WiFi on Raspberrypi. Have not used it in a while but could be a source of inspiration maybe.

https://github.com/mirzak/meta-mender-demo

Drew MoseleyMarch 19, 2018 at 10:56 PM

There are quite a few ways to enable wifi depending on what components you have.  I captured some notes at one point trying to enumerate the popular possibilities and I'd like to some day turn that into a blog post.

For our default setup, we use systemd and systemd-networkd.  To enable wifi on the RpI you need a few things.  In local.conf:

Additionally you need to add a custom wpa-supplicant.conf file.  To generate this file you need to run the following on any Linux system:

I keep my file in the /work/dmoseley/local directory which is not under any kind of source control to avoid any risk of my psk getting published on github.  I then use the following recipe to include it in my build: https://github.com/drewmoseley/meta-dmoseley-local-config/blob/master/recipes-connectivity/wpa-supplicant/wpa-supplicant_%25.bbappend

That specific recipe has more options than are needed for Mender because I was testing alternatives to systemd-networkd but basically you need to arrange for the output of the above wpa_passphrase invocation to be stored on the target rootfs as /etc/wpa_supplicant/wpa_supplicant-nl80211-wlan0.conf and setup the systemd script to launch at boot.  The relevant snippet from my do_install_append() is:

eystein.maloy.stenbergFebruary 23, 2018 at 10:16 PM

you mentioned you had some starting points / docs for this?

Fixed

Details

Assignee

Reporter

Priority

Backlog

yes

Zendesk Support

Checklist

Created February 23, 2018 at 10:11 PM
Updated May 9, 2018 at 8:37 AM
Resolved May 9, 2018 at 8:37 AM