SlideShare una empresa de Scribd logo
1 de 29
Descargar para leer sin conexión
Drew Moseley
Technical Solutions Architect
Mender.io
Session overview
● Discussion of network management packages
● Runtime examples of configuring Wifi credentials
● Static configuration of credentials at build time
⎻ Recipes available in github1
● Other related considerations
● More “howto” than other talks
Goal: Gather all relevant details
in one place
1
https://github.com/drewmoseley/meta-wifi-credentials
About me
Drew Moseley
○ 10 years in Embedded Linux/Yocto development.
○ Longer than that in general Embedded Software.
○ Project Lead and Solutions Architect.
drew.moseley@mender.io
https://twitter.com/drewmoseley
https://www.linkedin.com/in/drewmoseley/
https://twitter.com/mender_io
Mender.io
○ Over-the-air updater for Embedded Linux
○ Open source (Apache License, v2)
○ Dual A/B rootfs layout (client)
○ Remote deployment management (server)
○ Under active development
Challenges for Credentials Storage in Embedded Devices
On-target user interface (or lack of)
Network management package variety
Credential availability at build time (?)
System init packages (systemd vs sysvinit)
Multiple systems/one image
Read-only root filesystem
Trusted storage(not discussed here)
Test Setup
● Raspberry Pi Zero W
● Serial console cable
● GL.iNET portable router
● SSID: scale17OEDemo
● Password: monkey123
$ mkdir src
$ cd src
$ git clone -b thud git://git.openembedded.org/openembedded-core
$ git clone -b thud git://git.yoctoproject.org/meta-raspberrypi
$ git clone -b 1.40 bitbake
$ git clone git://github.com/drewmoseley/meta-wifi-credentials
$ cd ..
$ . src/openembedded-core/oe-init-build-env
$ bitbake-layers add-layer ../src/meta-raspberrypi
Prerequisites - Open Embedded Source Code
https://www.openembedded.org/wiki/OE-Core_Standalone_Setup
Prerequisites - Basic OE Configuration
MACHINE="raspberrypi0-wifi"
IMAGE_FSTYPES_append = " rpi-sdimg.bmap"
ENABLE_UART = "1"
DISTRO_FEATURES_append = " wifi"
IMAGE_INSTALL_append = " 
linux-firmware-rpidistro-bcm43430 
kernel-module-brcmfmac 
"
IMAGE_FEATURES_remove = " ssh-server-openssh"
Snippet for local.conf:
Prerequisites - Build/Deploy
$ bitbake core-image-full-cmdline
$ cd tmp-glibc/deploy/images/raspberrypi0-wifi/
$ sudo bmaptool copy 
--bmap core-image-full-cmdline-raspberrypi0-wifi.rpi-sdimg.bmap 
core-image-full-cmdline-raspberrypi0-wifi.rpi-sdimg 
/dev/mmcblk0
$ cd -
Prerequisites - Test Basic Bringup
root@raspberrypi0-wifi:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether b8:27:eb:53:95:7d brd ff:ff:ff:ff:ff:ff
● Boot device and verify wlan0 device exists.
● Login is root with no password.
Network management options
● sysvinit
○ wpa_supplicant
● systemd
○ systemd-networkd
○ connman
○ NetworkManager
sysvinit + wpa_supplicant build
● Note: This is the thud branch default
Snippet for local.conf:
IMAGE_INSTALL_append += " wpa-supplicant"
root@raspberrypi0-wifi:~# wpa_passphrase
scale17OEDemo monkey123 >>
/etc/wpa_supplicant.conf
root@raspberrypi0-wifi:~# ifup wlan0
root@raspberrypi0-wifi:~# ping 8.8.8.8
sysvinit + wpa_supplicant runtime configuration
sysvinit + wpa_supplicant build time configuration (1/2)
$ bitbake-layers add-layer ../src/meta-wifi-credentials/sysvinit
network={
ssid="scale17OEDemo"
psk=724d6c4e2d43f965563f25780889ad961ae6471b16d8594c9b58315422773321
}
recipes-connectivity/wpa-supplicant/files/scale-demo.conf:
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += " file://scale-demo.conf"
do_install_append () {
cat ${WORKDIR}/scale-demo.conf >> ${D}${sysconfdir}/wpa_supplicant.conf
}
recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend:
sysvinit + wpa_supplicant build time configuration (2/2)
# Ensure that wlan0 is set to auto
#
do_install_append () {
echo 'auto wlan0' >> ${D}${sysconfdir}/network/interfaces
}
$ bitbake-layers add-layer ../src/meta-wifi-credentials/sysvinit
recipes-connectivity/init-ifupdown/init-ifupdown_%.bbappend
systemd + systemd-networkd build
● Systemd-networkd is the thud branch default when systemd is enabled.
● There has been talk of making systemd the default init system
IMAGE_INSTALL_append += " wpa-supplicant"
DISTRO_FEATURES_append += " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = ""
*
Snippet for local.conf:
*
Required for all systemd based configurations
systemd + systemd-networkd runtime configuration
root@raspberrypi0-wifi:~# mkdir /etc/wpa_supplicant
root@raspberrypi0-wifi:~# wpa_passphrase scale17OEDemo monkey123 >>
/etc/wpa_supplicant/wpa_supplicant-nl80211.conf
root@raspberrypi0-wifi:~# cat > /etc/systemd/network/wlan.network << EOF
[Match]
Name=wlan*
[Network]
DHCP=v4
[DHCPv4]
UseHostname=false
EOF
root@raspberrypi0-wifi:~# systemctl restart systemd-networkd
root@raspberrypi0-wifi:~# systemctl start wpa_supplicant-nl80211@wlan0
root@raspberrypi0-wifi:~# ping 8.8.8.8
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
PACKAGECONFIG_append = "networkd resolved"
SRC_URI += " file://wlan.network"
FILES_${PN} += " ${sysconfdir}/systemd/network/wlan.network"
do_install_append() {
install -d ${D}${sysconfdir}/systemd/network
install -m 0644 ${WORKDIR}/wlan.network ${D}${sysconfdir}/systemd/network
}
systemd + systemd-networkd build time configuration (1/2)
$ bitbake-layers add-layer ../src/meta-wifi-credentials/systemd-networkd
[Match]
Name=wlan*
[Network]
DHCP=v4
[DHCPv4]
UseHostname=false
recipes-core/systemd/files/wlan.network:
recipes-core/systemd/systemd_%.bbappend:
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://wpa_supplicant-nl80211-wlan0.conf"
### SYSTEMD_SERVICE_${PN}_append = " wpa_supplicant-nl80211@wlan0.service"
do_install_append () {
install -d ${D}${sysconfdir}/wpa_supplicant/
install -D -m 600 ${WORKDIR}/wpa_supplicant-nl80211-wlan0.conf 
${D}${sysconfdir}/wpa_supplicant/wpa_supplicant-nl80211-wlan0.conf
install -d ${D}${sysconfdir}/systemd/system/multi-user.target.wants/
ln -s ${systemd_unitdir}/system/wpa_supplicant-nl80211@.service 
${D}${sysconfdir}/systemd/system/multi-user.target.wants/wpa_supplicant-nl80211@wlan0.service
}
systemd + systemd-networkd build time configuration (2/2)
$ bitbake-layers add-layer ../src/meta-wifi-credentials/systemd-networkd
ctrl_interface=/var/run/wpa_supplicant
update_config=1
network={
ssid="scale17OEDemo"
psk=724d6c4e2d43f965563f25780889ad961ae6471b16d8594c9b58315422773321
}
recipes-connectivity/wpa-supplicant/files/wpa_supplicant-nl80211-wlan0.conf:
recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend:
Using systemd without networkd
● Need to disable resolved and networkd in systemd PACKAGECONFIG
PACKAGECONFIG_remove = "networkd resolved"
recipes-core/systemd/systemd_%.bbappend:
systemd + connman build
IMAGE_INSTALL_append += " connman connman-client"
*
Snippet for local.conf:
systemd + connman runtime configuration
root@raspberrypi0-wifi:~# connmanctl
connmanctl> enable wifi
Enabled wifi
connmanctl> scan wifi
Scan completed for wifi
connmanctl> agent on
Agent registered
connmanctl> services
scale17OEDemo wifi_b827eb53957d_7363616c6531374f4544656d6f_managed_psk
connmanctl> connect wifi_b827eb53957d_7363616c6531374f4544656d6f_managed_psk
Agent RequestInput wifi_b827eb53957d_7363616c6531374f4544656d6f_managed_psk
Passphrase = [ Type=psk, Requirement=mandatory ]
Passphrase? monkey123
connmanctl> quit
root@raspberrypi0-wifi:~# ping 8.8.8.8
systemd + connman build time configuration
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += " file://scale17OEDemo.config"
do_install_append() {
install -d ${D}/var/lib/${PN}
install -m 0600 ${WORKDIR}/scale17OEDemo.config ${D}/var/lib/${PN}/
cat >> ${D}${systemd_unitdir}/system/${PN}.service <<-EOF
[Service]
ExecStartPost=/bin/sleep 5
ExecStartPost=/usr/bin/connmanctl enable wifi
EOF
}
$ bitbake-layers add-layer ../src/meta-wifi-credentials/connman
[global]
Name=scale17OEDemo
Description=scale17OEDemo WIFI config file
[service_wifi_scale17OEDemo]
Type=wifi
Security=wpa2
Name=scale17OEDemo
Passphrase=monkey123
recipes-connectivity/connman/files/scale17OEDemo.config:
recipes-connectivity/connman/connman_%.bbappend:
systemd + NetworkManager build
$ git clone -b thud git://git.openembedded.org/meta-openembedded 
../src/meta-openembedded
$ bitbake-layers add-layer ../src/meta-openembedded/meta-oe
$ bitbake-layers add-layer ../src/meta-openembedded/meta-python
$ bitbake-layers add-layer ../src/meta-openembedded/meta-networking
IMAGE_INSTALL_append += " networkmanager networkmanager-nmtui"
Snippet for local.conf:
systemd + NetworkManager runtime configuration
root@raspberrypi0-wifi:~# nmtui
systemd + NetworkManager runtime configuration
root@raspberrypi0-wifi:~# nmtui
systemd + NetworkManager runtime configuration
root@raspberrypi0-wifi:~# nmtui
systemd + NetworkManager build time configuration
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://scale17OEDemo.nmconnection"
do_install_append () {
install -d ${D}${sysconfdir}/NetworkManager/system-connections
install -m 0600 ${WORKDIR}/scale17OEDemo.nmconnection
${D}${sysconfdir}/NetworkManager/system-connections
}
$ bitbake-layers add-layer ../src/meta-wifi-credentials/networkmanager
[connection]
id=scale17OEDemo
type=wifi
[wifi]
ssid=scale17OEDemo
[wifi-security]
key-mgmt=wpa-psk
psk=monkey123
recipes-connectivity/networkmanager/files/scale17OEDemo.nmconnection:
recipes-connectivity/networkmanager/networkmanager_%.bbappend:
Other Considerations
● Security of credentials
● Userland drivers: ie WEXT
(obsolete) vs nl80211
● mDNS
● Captive portals
● Access Point mode
● Enterprise WiFi
● 2FA
Thank You!
Q&A
@drewmoseley
https://mender.io
drew.moseley@mender.io

Más contenido relacionado

La actualidad más candente

Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack UpPushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack UpJames Denton
 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardAnne Nicolas
 
The ultimate guide to software updates on embedded linux devices
The ultimate guide to software updates on embedded linux devicesThe ultimate guide to software updates on embedded linux devices
The ultimate guide to software updates on embedded linux devicesMender.io
 
Linux Kernel - Virtual File System
Linux Kernel - Virtual File SystemLinux Kernel - Virtual File System
Linux Kernel - Virtual File SystemAdrian Huang
 
malloc & vmalloc in Linux
malloc & vmalloc in Linuxmalloc & vmalloc in Linux
malloc & vmalloc in LinuxAdrian Huang
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)RuggedBoardGroup
 
Introduction to yocto
Introduction to yoctoIntroduction to yocto
Introduction to yoctoAlex Gonzalez
 
05.2 virtio introduction
05.2 virtio introduction05.2 virtio introduction
05.2 virtio introductionzenixls2
 
Androidのリカバリシステム (Androidのシステムアップデート)
Androidのリカバリシステム (Androidのシステムアップデート)Androidのリカバリシステム (Androidのシステムアップデート)
Androidのリカバリシステム (Androidのシステムアップデート)l_b__
 
Slab Allocator in Linux Kernel
Slab Allocator in Linux KernelSlab Allocator in Linux Kernel
Slab Allocator in Linux KernelAdrian Huang
 
Understanding Open vSwitch
Understanding Open vSwitch Understanding Open vSwitch
Understanding Open vSwitch YongKi Kim
 
Page cache in Linux kernel
Page cache in Linux kernelPage cache in Linux kernel
Page cache in Linux kernelAdrian Huang
 
Yocto Project introduction
Yocto Project introductionYocto Project introduction
Yocto Project introductionYi-Hsiu Hsu
 
ARM IoT Firmware Emulation Workshop
ARM IoT Firmware Emulation WorkshopARM IoT Firmware Emulation Workshop
ARM IoT Firmware Emulation WorkshopSaumil Shah
 
Linux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver OverviewLinux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver OverviewRajKumar Rampelli
 
Linux field-update-2015
Linux field-update-2015Linux field-update-2015
Linux field-update-2015Chris Simmonds
 

La actualidad más candente (20)

Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack UpPushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
 
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime RipardKernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
 
The ultimate guide to software updates on embedded linux devices
The ultimate guide to software updates on embedded linux devicesThe ultimate guide to software updates on embedded linux devices
The ultimate guide to software updates on embedded linux devices
 
Linux Kernel - Virtual File System
Linux Kernel - Virtual File SystemLinux Kernel - Virtual File System
Linux Kernel - Virtual File System
 
malloc & vmalloc in Linux
malloc & vmalloc in Linuxmalloc & vmalloc in Linux
malloc & vmalloc in Linux
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
Introduction to yocto
Introduction to yoctoIntroduction to yocto
Introduction to yocto
 
05.2 virtio introduction
05.2 virtio introduction05.2 virtio introduction
05.2 virtio introduction
 
Androidのリカバリシステム (Androidのシステムアップデート)
Androidのリカバリシステム (Androidのシステムアップデート)Androidのリカバリシステム (Androidのシステムアップデート)
Androidのリカバリシステム (Androidのシステムアップデート)
 
Slab Allocator in Linux Kernel
Slab Allocator in Linux KernelSlab Allocator in Linux Kernel
Slab Allocator in Linux Kernel
 
Understanding Open vSwitch
Understanding Open vSwitch Understanding Open vSwitch
Understanding Open vSwitch
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Linux Device Tree
Linux Device TreeLinux Device Tree
Linux Device Tree
 
Page cache in Linux kernel
Page cache in Linux kernelPage cache in Linux kernel
Page cache in Linux kernel
 
Yocto Project introduction
Yocto Project introductionYocto Project introduction
Yocto Project introduction
 
ARM IoT Firmware Emulation Workshop
ARM IoT Firmware Emulation WorkshopARM IoT Firmware Emulation Workshop
ARM IoT Firmware Emulation Workshop
 
Network Drivers
Network DriversNetwork Drivers
Network Drivers
 
Linux kernel modules
Linux kernel modulesLinux kernel modules
Linux kernel modules
 
Linux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver OverviewLinux Kernel MMC Storage driver Overview
Linux Kernel MMC Storage driver Overview
 
Linux field-update-2015
Linux field-update-2015Linux field-update-2015
Linux field-update-2015
 

Similar a Configuring wifi in open embedded builds

Asian Spirit 3 Day Dba On Ubl
Asian Spirit 3 Day Dba On UblAsian Spirit 3 Day Dba On Ubl
Asian Spirit 3 Day Dba On Ublnewrforce
 
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi SubsystemTutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi SubsystemDheryta Jaisinghani
 
Openstack 101
Openstack 101Openstack 101
Openstack 101POSSCON
 
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...NETWAYS
 
Docker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in PragueDocker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in Praguetomasbart
 
[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVROpenStack Korea Community
 
XPDDS18: Xenwatch Multithreading - Dongli Zhang, Oracle
XPDDS18: Xenwatch Multithreading - Dongli Zhang, OracleXPDDS18: Xenwatch Multithreading - Dongli Zhang, Oracle
XPDDS18: Xenwatch Multithreading - Dongli Zhang, OracleThe Linux Foundation
 
Présentation Ikoula au Meet-up Docker à l'école 42
Présentation Ikoula au Meet-up Docker à l'école 42Présentation Ikoula au Meet-up Docker à l'école 42
Présentation Ikoula au Meet-up Docker à l'école 42Ikoula
 
Mise en place d'un client VPN l2tp IPsec sous docker
Mise en place d'un client VPN l2tp IPsec sous dockerMise en place d'un client VPN l2tp IPsec sous docker
Mise en place d'un client VPN l2tp IPsec sous dockerNicolas Trauwaen
 
Linux Desktop Automation
Linux Desktop AutomationLinux Desktop Automation
Linux Desktop AutomationRui Lapa
 
MariaDB10.7_install_Ubuntu.docx
MariaDB10.7_install_Ubuntu.docxMariaDB10.7_install_Ubuntu.docx
MariaDB10.7_install_Ubuntu.docxNeoClova
 
DirectShare Quick Start Setup Guide
DirectShare Quick Start Setup GuideDirectShare Quick Start Setup Guide
DirectShare Quick Start Setup GuideChristian Petrou
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawnGábor Nyers
 
Chicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - MediaflyChicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - MediaflyMediafly
 
Big Data in Container; Hadoop Spark in Docker and Mesos
Big Data in Container; Hadoop Spark in Docker and MesosBig Data in Container; Hadoop Spark in Docker and Mesos
Big Data in Container; Hadoop Spark in Docker and MesosHeiko Loewe
 
TrinityCore server install guide
TrinityCore server install guideTrinityCore server install guide
TrinityCore server install guideSeungmin Shin
 
glance replicator
glance replicatorglance replicator
glance replicatoririx_jp
 
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)DECK36
 

Similar a Configuring wifi in open embedded builds (20)

Asian Spirit 3 Day Dba On Ubl
Asian Spirit 3 Day Dba On UblAsian Spirit 3 Day Dba On Ubl
Asian Spirit 3 Day Dba On Ubl
 
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi SubsystemTutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem
Tutorial WiFi driver code - Opening Nuts and Bolts of Linux WiFi Subsystem
 
Openstack 101
Openstack 101Openstack 101
Openstack 101
 
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
 
Docker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in PragueDocker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in Prague
 
[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR
 
XPDDS18: Xenwatch Multithreading - Dongli Zhang, Oracle
XPDDS18: Xenwatch Multithreading - Dongli Zhang, OracleXPDDS18: Xenwatch Multithreading - Dongli Zhang, Oracle
XPDDS18: Xenwatch Multithreading - Dongli Zhang, Oracle
 
Présentation Ikoula au Meet-up Docker à l'école 42
Présentation Ikoula au Meet-up Docker à l'école 42Présentation Ikoula au Meet-up Docker à l'école 42
Présentation Ikoula au Meet-up Docker à l'école 42
 
Mise en place d'un client VPN l2tp IPsec sous docker
Mise en place d'un client VPN l2tp IPsec sous dockerMise en place d'un client VPN l2tp IPsec sous docker
Mise en place d'un client VPN l2tp IPsec sous docker
 
Linux Desktop Automation
Linux Desktop AutomationLinux Desktop Automation
Linux Desktop Automation
 
MariaDB10.7_install_Ubuntu.docx
MariaDB10.7_install_Ubuntu.docxMariaDB10.7_install_Ubuntu.docx
MariaDB10.7_install_Ubuntu.docx
 
Multipath
MultipathMultipath
Multipath
 
DirectShare Quick Start Setup Guide
DirectShare Quick Start Setup GuideDirectShare Quick Start Setup Guide
DirectShare Quick Start Setup Guide
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawn
 
Chicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - MediaflyChicago Docker Meetup Presentation - Mediafly
Chicago Docker Meetup Presentation - Mediafly
 
dotCloud and go
dotCloud and godotCloud and go
dotCloud and go
 
Big Data in Container; Hadoop Spark in Docker and Mesos
Big Data in Container; Hadoop Spark in Docker and MesosBig Data in Container; Hadoop Spark in Docker and Mesos
Big Data in Container; Hadoop Spark in Docker and Mesos
 
TrinityCore server install guide
TrinityCore server install guideTrinityCore server install guide
TrinityCore server install guide
 
glance replicator
glance replicatorglance replicator
glance replicator
 
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
 

Más de Mender.io

Mender: The open-source software update solution
Mender: The open-source software update solutionMender: The open-source software update solution
Mender: The open-source software update solutionMender.io
 
IoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSesIoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSesMender.io
 
A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devicesMender.io
 
Embedded linux build systems
Embedded linux build systems  Embedded linux build systems
Embedded linux build systems Mender.io
 
Integrate IoT cloud analytics and over the-air (ota) updates with google and ...
Integrate IoT cloud analytics and over the-air (ota) updates with google and ...Integrate IoT cloud analytics and over the-air (ota) updates with google and ...
Integrate IoT cloud analytics and over the-air (ota) updates with google and ...Mender.io
 
Mender; the open-source software update solution
Mender; the open-source software update solutionMender; the open-source software update solution
Mender; the open-source software update solutionMender.io
 
IoT Prototyping using BBB and Debian
IoT Prototyping using BBB and DebianIoT Prototyping using BBB and Debian
IoT Prototyping using BBB and DebianMender.io
 
Why the yocto project for my io t project elc_edinburgh_2018
Why the yocto project for my io t project elc_edinburgh_2018Why the yocto project for my io t project elc_edinburgh_2018
Why the yocto project for my io t project elc_edinburgh_2018Mender.io
 
Strategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and imagesStrategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and imagesMender.io
 
IoT Development from Prototype to Production
IoT Development from Prototype to ProductionIoT Development from Prototype to Production
IoT Development from Prototype to ProductionMender.io
 
Software Updates for Connected Devices - OSCON 2018
Software Updates for Connected Devices - OSCON 2018Software Updates for Connected Devices - OSCON 2018
Software Updates for Connected Devices - OSCON 2018Mender.io
 
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018Mender.io
 
Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018Mender.io
 
Iot development from prototype to production
Iot development from prototype to productionIot development from prototype to production
Iot development from prototype to productionMender.io
 
Linux IoT Botnet Wars - ESC Boston 2018
Linux IoT Botnet Wars - ESC Boston 2018Linux IoT Botnet Wars - ESC Boston 2018
Linux IoT Botnet Wars - ESC Boston 2018Mender.io
 
Securing the Connected Car - SCaLE 2018
Securing the Connected Car - SCaLE 2018Securing the Connected Car - SCaLE 2018
Securing the Connected Car - SCaLE 2018Mender.io
 
Mender.io | Securing the Connected Car
Mender.io | Securing the Connected CarMender.io | Securing the Connected Car
Mender.io | Securing the Connected CarMender.io
 
Linux IoT Botnet Wars and the lack of basic security hardening
Linux IoT Botnet Wars and the lack of basic security hardeningLinux IoT Botnet Wars and the lack of basic security hardening
Linux IoT Botnet Wars and the lack of basic security hardeningMender.io
 
Mender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and GolangMender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and GolangMender.io
 

Más de Mender.io (19)

Mender: The open-source software update solution
Mender: The open-source software update solutionMender: The open-source software update solution
Mender: The open-source software update solution
 
IoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSesIoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSes
 
A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devices
 
Embedded linux build systems
Embedded linux build systems  Embedded linux build systems
Embedded linux build systems
 
Integrate IoT cloud analytics and over the-air (ota) updates with google and ...
Integrate IoT cloud analytics and over the-air (ota) updates with google and ...Integrate IoT cloud analytics and over the-air (ota) updates with google and ...
Integrate IoT cloud analytics and over the-air (ota) updates with google and ...
 
Mender; the open-source software update solution
Mender; the open-source software update solutionMender; the open-source software update solution
Mender; the open-source software update solution
 
IoT Prototyping using BBB and Debian
IoT Prototyping using BBB and DebianIoT Prototyping using BBB and Debian
IoT Prototyping using BBB and Debian
 
Why the yocto project for my io t project elc_edinburgh_2018
Why the yocto project for my io t project elc_edinburgh_2018Why the yocto project for my io t project elc_edinburgh_2018
Why the yocto project for my io t project elc_edinburgh_2018
 
Strategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and imagesStrategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and images
 
IoT Development from Prototype to Production
IoT Development from Prototype to ProductionIoT Development from Prototype to Production
IoT Development from Prototype to Production
 
Software Updates for Connected Devices - OSCON 2018
Software Updates for Connected Devices - OSCON 2018Software Updates for Connected Devices - OSCON 2018
Software Updates for Connected Devices - OSCON 2018
 
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018
 
Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018
 
Iot development from prototype to production
Iot development from prototype to productionIot development from prototype to production
Iot development from prototype to production
 
Linux IoT Botnet Wars - ESC Boston 2018
Linux IoT Botnet Wars - ESC Boston 2018Linux IoT Botnet Wars - ESC Boston 2018
Linux IoT Botnet Wars - ESC Boston 2018
 
Securing the Connected Car - SCaLE 2018
Securing the Connected Car - SCaLE 2018Securing the Connected Car - SCaLE 2018
Securing the Connected Car - SCaLE 2018
 
Mender.io | Securing the Connected Car
Mender.io | Securing the Connected CarMender.io | Securing the Connected Car
Mender.io | Securing the Connected Car
 
Linux IoT Botnet Wars and the lack of basic security hardening
Linux IoT Botnet Wars and the lack of basic security hardeningLinux IoT Botnet Wars and the lack of basic security hardening
Linux IoT Botnet Wars and the lack of basic security hardening
 
Mender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and GolangMender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and Golang
 

Último

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Último (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

Configuring wifi in open embedded builds

  • 1. Drew Moseley Technical Solutions Architect Mender.io
  • 2. Session overview ● Discussion of network management packages ● Runtime examples of configuring Wifi credentials ● Static configuration of credentials at build time ⎻ Recipes available in github1 ● Other related considerations ● More “howto” than other talks Goal: Gather all relevant details in one place 1 https://github.com/drewmoseley/meta-wifi-credentials
  • 3. About me Drew Moseley ○ 10 years in Embedded Linux/Yocto development. ○ Longer than that in general Embedded Software. ○ Project Lead and Solutions Architect. drew.moseley@mender.io https://twitter.com/drewmoseley https://www.linkedin.com/in/drewmoseley/ https://twitter.com/mender_io Mender.io ○ Over-the-air updater for Embedded Linux ○ Open source (Apache License, v2) ○ Dual A/B rootfs layout (client) ○ Remote deployment management (server) ○ Under active development
  • 4. Challenges for Credentials Storage in Embedded Devices On-target user interface (or lack of) Network management package variety Credential availability at build time (?) System init packages (systemd vs sysvinit) Multiple systems/one image Read-only root filesystem Trusted storage(not discussed here)
  • 5. Test Setup ● Raspberry Pi Zero W ● Serial console cable ● GL.iNET portable router ● SSID: scale17OEDemo ● Password: monkey123
  • 6. $ mkdir src $ cd src $ git clone -b thud git://git.openembedded.org/openembedded-core $ git clone -b thud git://git.yoctoproject.org/meta-raspberrypi $ git clone -b 1.40 bitbake $ git clone git://github.com/drewmoseley/meta-wifi-credentials $ cd .. $ . src/openembedded-core/oe-init-build-env $ bitbake-layers add-layer ../src/meta-raspberrypi Prerequisites - Open Embedded Source Code https://www.openembedded.org/wiki/OE-Core_Standalone_Setup
  • 7. Prerequisites - Basic OE Configuration MACHINE="raspberrypi0-wifi" IMAGE_FSTYPES_append = " rpi-sdimg.bmap" ENABLE_UART = "1" DISTRO_FEATURES_append = " wifi" IMAGE_INSTALL_append = " linux-firmware-rpidistro-bcm43430 kernel-module-brcmfmac " IMAGE_FEATURES_remove = " ssh-server-openssh" Snippet for local.conf:
  • 8. Prerequisites - Build/Deploy $ bitbake core-image-full-cmdline $ cd tmp-glibc/deploy/images/raspberrypi0-wifi/ $ sudo bmaptool copy --bmap core-image-full-cmdline-raspberrypi0-wifi.rpi-sdimg.bmap core-image-full-cmdline-raspberrypi0-wifi.rpi-sdimg /dev/mmcblk0 $ cd -
  • 9. Prerequisites - Test Basic Bringup root@raspberrypi0-wifi:~# ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 2: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether b8:27:eb:53:95:7d brd ff:ff:ff:ff:ff:ff ● Boot device and verify wlan0 device exists. ● Login is root with no password.
  • 10. Network management options ● sysvinit ○ wpa_supplicant ● systemd ○ systemd-networkd ○ connman ○ NetworkManager
  • 11. sysvinit + wpa_supplicant build ● Note: This is the thud branch default Snippet for local.conf: IMAGE_INSTALL_append += " wpa-supplicant"
  • 12. root@raspberrypi0-wifi:~# wpa_passphrase scale17OEDemo monkey123 >> /etc/wpa_supplicant.conf root@raspberrypi0-wifi:~# ifup wlan0 root@raspberrypi0-wifi:~# ping 8.8.8.8 sysvinit + wpa_supplicant runtime configuration
  • 13. sysvinit + wpa_supplicant build time configuration (1/2) $ bitbake-layers add-layer ../src/meta-wifi-credentials/sysvinit network={ ssid="scale17OEDemo" psk=724d6c4e2d43f965563f25780889ad961ae6471b16d8594c9b58315422773321 } recipes-connectivity/wpa-supplicant/files/scale-demo.conf: FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI += " file://scale-demo.conf" do_install_append () { cat ${WORKDIR}/scale-demo.conf >> ${D}${sysconfdir}/wpa_supplicant.conf } recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend:
  • 14. sysvinit + wpa_supplicant build time configuration (2/2) # Ensure that wlan0 is set to auto # do_install_append () { echo 'auto wlan0' >> ${D}${sysconfdir}/network/interfaces } $ bitbake-layers add-layer ../src/meta-wifi-credentials/sysvinit recipes-connectivity/init-ifupdown/init-ifupdown_%.bbappend
  • 15. systemd + systemd-networkd build ● Systemd-networkd is the thud branch default when systemd is enabled. ● There has been talk of making systemd the default init system IMAGE_INSTALL_append += " wpa-supplicant" DISTRO_FEATURES_append += " systemd" DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "" * Snippet for local.conf: * Required for all systemd based configurations
  • 16. systemd + systemd-networkd runtime configuration root@raspberrypi0-wifi:~# mkdir /etc/wpa_supplicant root@raspberrypi0-wifi:~# wpa_passphrase scale17OEDemo monkey123 >> /etc/wpa_supplicant/wpa_supplicant-nl80211.conf root@raspberrypi0-wifi:~# cat > /etc/systemd/network/wlan.network << EOF [Match] Name=wlan* [Network] DHCP=v4 [DHCPv4] UseHostname=false EOF root@raspberrypi0-wifi:~# systemctl restart systemd-networkd root@raspberrypi0-wifi:~# systemctl start wpa_supplicant-nl80211@wlan0 root@raspberrypi0-wifi:~# ping 8.8.8.8
  • 17. FILESEXTRAPATHS_prepend := "${THISDIR}/files:" PACKAGECONFIG_append = "networkd resolved" SRC_URI += " file://wlan.network" FILES_${PN} += " ${sysconfdir}/systemd/network/wlan.network" do_install_append() { install -d ${D}${sysconfdir}/systemd/network install -m 0644 ${WORKDIR}/wlan.network ${D}${sysconfdir}/systemd/network } systemd + systemd-networkd build time configuration (1/2) $ bitbake-layers add-layer ../src/meta-wifi-credentials/systemd-networkd [Match] Name=wlan* [Network] DHCP=v4 [DHCPv4] UseHostname=false recipes-core/systemd/files/wlan.network: recipes-core/systemd/systemd_%.bbappend:
  • 18. FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI += "file://wpa_supplicant-nl80211-wlan0.conf" ### SYSTEMD_SERVICE_${PN}_append = " wpa_supplicant-nl80211@wlan0.service" do_install_append () { install -d ${D}${sysconfdir}/wpa_supplicant/ install -D -m 600 ${WORKDIR}/wpa_supplicant-nl80211-wlan0.conf ${D}${sysconfdir}/wpa_supplicant/wpa_supplicant-nl80211-wlan0.conf install -d ${D}${sysconfdir}/systemd/system/multi-user.target.wants/ ln -s ${systemd_unitdir}/system/wpa_supplicant-nl80211@.service ${D}${sysconfdir}/systemd/system/multi-user.target.wants/wpa_supplicant-nl80211@wlan0.service } systemd + systemd-networkd build time configuration (2/2) $ bitbake-layers add-layer ../src/meta-wifi-credentials/systemd-networkd ctrl_interface=/var/run/wpa_supplicant update_config=1 network={ ssid="scale17OEDemo" psk=724d6c4e2d43f965563f25780889ad961ae6471b16d8594c9b58315422773321 } recipes-connectivity/wpa-supplicant/files/wpa_supplicant-nl80211-wlan0.conf: recipes-connectivity/wpa-supplicant/wpa-supplicant_%.bbappend:
  • 19. Using systemd without networkd ● Need to disable resolved and networkd in systemd PACKAGECONFIG PACKAGECONFIG_remove = "networkd resolved" recipes-core/systemd/systemd_%.bbappend:
  • 20. systemd + connman build IMAGE_INSTALL_append += " connman connman-client" * Snippet for local.conf:
  • 21. systemd + connman runtime configuration root@raspberrypi0-wifi:~# connmanctl connmanctl> enable wifi Enabled wifi connmanctl> scan wifi Scan completed for wifi connmanctl> agent on Agent registered connmanctl> services scale17OEDemo wifi_b827eb53957d_7363616c6531374f4544656d6f_managed_psk connmanctl> connect wifi_b827eb53957d_7363616c6531374f4544656d6f_managed_psk Agent RequestInput wifi_b827eb53957d_7363616c6531374f4544656d6f_managed_psk Passphrase = [ Type=psk, Requirement=mandatory ] Passphrase? monkey123 connmanctl> quit root@raspberrypi0-wifi:~# ping 8.8.8.8
  • 22. systemd + connman build time configuration FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI += " file://scale17OEDemo.config" do_install_append() { install -d ${D}/var/lib/${PN} install -m 0600 ${WORKDIR}/scale17OEDemo.config ${D}/var/lib/${PN}/ cat >> ${D}${systemd_unitdir}/system/${PN}.service <<-EOF [Service] ExecStartPost=/bin/sleep 5 ExecStartPost=/usr/bin/connmanctl enable wifi EOF } $ bitbake-layers add-layer ../src/meta-wifi-credentials/connman [global] Name=scale17OEDemo Description=scale17OEDemo WIFI config file [service_wifi_scale17OEDemo] Type=wifi Security=wpa2 Name=scale17OEDemo Passphrase=monkey123 recipes-connectivity/connman/files/scale17OEDemo.config: recipes-connectivity/connman/connman_%.bbappend:
  • 23. systemd + NetworkManager build $ git clone -b thud git://git.openembedded.org/meta-openembedded ../src/meta-openembedded $ bitbake-layers add-layer ../src/meta-openembedded/meta-oe $ bitbake-layers add-layer ../src/meta-openembedded/meta-python $ bitbake-layers add-layer ../src/meta-openembedded/meta-networking IMAGE_INSTALL_append += " networkmanager networkmanager-nmtui" Snippet for local.conf:
  • 24. systemd + NetworkManager runtime configuration root@raspberrypi0-wifi:~# nmtui
  • 25. systemd + NetworkManager runtime configuration root@raspberrypi0-wifi:~# nmtui
  • 26. systemd + NetworkManager runtime configuration root@raspberrypi0-wifi:~# nmtui
  • 27. systemd + NetworkManager build time configuration FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI += "file://scale17OEDemo.nmconnection" do_install_append () { install -d ${D}${sysconfdir}/NetworkManager/system-connections install -m 0600 ${WORKDIR}/scale17OEDemo.nmconnection ${D}${sysconfdir}/NetworkManager/system-connections } $ bitbake-layers add-layer ../src/meta-wifi-credentials/networkmanager [connection] id=scale17OEDemo type=wifi [wifi] ssid=scale17OEDemo [wifi-security] key-mgmt=wpa-psk psk=monkey123 recipes-connectivity/networkmanager/files/scale17OEDemo.nmconnection: recipes-connectivity/networkmanager/networkmanager_%.bbappend:
  • 28. Other Considerations ● Security of credentials ● Userland drivers: ie WEXT (obsolete) vs nl80211 ● mDNS ● Captive portals ● Access Point mode ● Enterprise WiFi ● 2FA