Uploaded September 2025 | Updated September 2026, 2 weeks ago
Step-by-step tutorial on enabling SPI (Serial Peripheral Interface) on a Raspberry Pi and using it with a custom Linux image built using the Yocto Project and OpenEmbedded. The examples are based on Yocto LTS release Scarthgap and use the meta-raspberrypi BSP layer. Follow the steps below to repeat the demonstration from the video tutorial:
Add the following line to conf/local.conf to enable SPI:
ENABLE_SPI_BUS = "1"
Include the spidev Python 3 package (used in the examples), along with other helpful tools:
IMAGE_INSTALL:append = " python3-spidev"
Build the core-image-base, flash it to a microSD card, and then run the following code in the Python 3 interactive shell to read values from a capacitive soil moisture sensor through the ADC:
gist.github.com/leon-anavi/58cbe2ddf340a4b243455a7c69e6982b
βοΈ Hardware
===
ANAVI Gardening uHAT
crowdsupply.com/anavi-technology/anavi-gardening-uhat
eu.mouser.com/c/?q=anavi%20gardening%20uhat
thepihut.com/products/anavi-gardening-uhat-starter-kit
github.com/AnaviTechnology/anavi-gardening
π Related Videos
===
Episode 1: Building an Embedded GNU Linux Distribution
youtu.be/fY7u6PiV8qA?si=goTZ5V7I2dwa33a-
Episode 2: SSH for Remote Network Access
youtu.be/ltckiBV9FXg?si=DJwsKLDhHkDIqCIn
Episode 3: The Yocto Project on Raspberry Pi 5 Episode 3: Running Docker Containers
youtu.be/kQnOidK_U3M?si=5KiS1FK87OwfdQ0m
Episode 4: The Yocto Project on Raspberry Pi 5 Episode 4: U-Boot Bootloader
youtu.be/9tohomiv1Ug?si=kylUv0uT_BFmXt5g
Episode 5: Modifying U-Boot Environment in Linux with fw_setenv
youtu.be/SB5NvIF1IEU?si=0So6Gfv9hQR7gQgY
Episode 6: Runtime Package Management with apt and deb Packages
youtu.be/6i5UtF7fiaA?si=8DuUHUxywVEEtdyN
Episode 7: Create a New Layer, a New Recipe (.bb) and .bbappend
youtu.be/W5J1W_Cy14Y?si=ftu5WpeGqel8BZhf
Episode 8: Using ConnMan Network Manager for Wi-Fi Connectivity
youtu.be/ib8a0PeOGAU?si=jOPOYReA1woIZOJF
Episode 9: Enable I2C and Use SSD1306 Mini OLED Display on Linux
youtu.be/ReqwC9qoIJA?si=nB8qxVxOLwvKXBbR
π Useful Links
===
yoctoproject.org
docs.yoctoproject.org
openembedded.org/wiki/Main_Page
meta-raspberrypi.readthedocs.io/en/latest/extra-build-config.html#enable-spi-bus
pypi.org/project/spidev
git.openembedded.org/meta-openembedded
microchip.com/en-us/product/mcp3002
π Chapters
===
0:00 Intro
0:19 Enable SPI
1:58 How Does It Work
3:45 Hardware
6:14 Demo
13:15 Summary
14:04 Conclusions
Step-by-step tutorial on enabling SPI (Serial Peripheral Interface) on a Raspberry Pi and using it with a custom Linux image built using the Yocto Project and OpenEmbedded. The examples are based on Yocto LTS release Scarthgap and use the meta-raspberrypi BSP layer. Follow the steps below to repeat the demonstration from the video tutorial:
Add the following line to conf/local.conf to enable SPI:
ENABLE_SPI_BUS = "1"
Include the spidev Python 3 package (used in the examples), along with other helpful tools:
IMAGE_INSTALL:append = " python3-spidev"
Build the core-image-base, flash it to a microSD card, and then run the following code in the Python 3 interactive shell to read values from a capacitive soil moisture sensor through the ADC:
gist.github.com/leon-anavi/58cbe2ddf340a4b243455a7c69e6982b
βοΈ Hardware
===
ANAVI Gardening uHAT
crowdsupply.com/anavi-technology/anavi-gardening-uhat
eu.mouser.com/c/?q=anavi%20gardening%20uhat
thepihut.com/products/anavi-gardening-uhat-starter-kit
github.com/AnaviTechnology/anavi-gardening
π Related Videos
===
Episode 1: Building an Embedded GNU Linux Distribution
youtu.be/fY7u6PiV8qA?si=goTZ5V7I2dwa33a-
Episode 2: SSH for Remote Network Access
youtu.be/ltckiBV9FXg?si=DJwsKLDhHkDIqCIn
Episode 3: The Yocto Project on Raspberry Pi 5 Episode 3: Running Docker Containers
youtu.be/kQnOidK_U3M?si=5KiS1FK87OwfdQ0m
Episode 4: The Yocto Project on Raspberry Pi 5 Episode 4: U-Boot Bootloader
youtu.be/9tohomiv1Ug?si=kylUv0uT_BFmXt5g
Episode 5: Modifying U-Boot Environment in Linux with fw_setenv
youtu.be/SB5NvIF1IEU?si=0So6Gfv9hQR7gQgY
Episode 6: Runtime Package Management with apt and deb Packages
youtu.be/6i5UtF7fiaA?si=8DuUHUxywVEEtdyN
Episode 7: Create a New Layer, a New Recipe (.bb) and .bbappend
youtu.be/W5J1W_Cy14Y?si=ftu5WpeGqel8BZhf
Episode 8: Using ConnMan Network Manager for Wi-Fi Connectivity
youtu.be/ib8a0PeOGAU?si=jOPOYReA1woIZOJF
Episode 9: Enable I2C and Use SSD1306 Mini OLED Display on Linux
youtu.be/ReqwC9qoIJA?si=nB8qxVxOLwvKXBbR
π Useful Links
===
yoctoproject.org
docs.yoctoproject.org
openembedded.org/wiki/Main_Page
meta-raspberrypi.readthedocs.io/en/latest/extra-build-config.html#enable-spi-bus
pypi.org/project/spidev
git.openembedded.org/meta-openembedded
microchip.com/en-us/product/mcp3002
π Chapters
===
0:00 Intro
0:19 Enable SPI
1:58 How Does It Work
3:45 Hardware
6:14 Demo
13:15 Summary
14:04 Conclusions


![Remote Power Control on Linux: Using Wake-on-LAN with Ubuntu
Wake-on-LAN is often a convenient way to keep a computer powered off most of the time and still bring it up when needed, like waking a home server to SSH into it, start a few containers, run backups, grab files from a NAS, or fire up a dev machine without having it fully running 24/7. This video demonstrates how to setup Wake-on-LAN on Fujitsu Futro s920 with Ubuntu 24.04 LTS server. Wake-on-LAN on Linux depends on driver and hardware support and interface names or paths can differ between systems, but the following steps describe a common and working approach on Ubuntu 24.04 LTS. First, running sudo ethtool network-interface is simply a diagnostic step that shows the current settings of the network interface, including whether Wake-on-LAN is supported and which mode (if any) is currently active, so you can confirm the hardware and driver are capable of WoL. Next, sudo ethtool -s network-interface wol g explicitly enables Wake-on-LAN in g mode, meaning the interface will wake the machine when it receives a magic packet, but this setting is temporary and will be lost after a reboot, which is why the next steps exist. By running sudo vim /etc/systemd/system/wol.service, you create a custom systemd service file that re-applies the WoL setting automatically at boot; the [Unit] section describes the service and ensures it runs after the network stack is initialized, the [Service] section defines it as a one-shot action that executes /sbin/ethtool -s network-interface wol g exactly once to enable WoL, and the [Install] section tells systemd that this service should be part of the normal multi-user startup. After saving the file, sudo systemctl daemon-reload forces systemd to re-read its configuration so it becomes aware of the new service, sudo systemctl enable wol.service registers the service to run automatically on every boot, and sudo systemctl start wol.service runs it immediately so you donβt need to reboot to activate the setting. Finally, the wakeonlan 90:1b:0e:fa:3d:05 command (run from another machine on the same network or a properly routed network) sends a magic packet to the specified MAC address, which is the actual test that confirms everything is working and that the Ubuntu system can now be woken remotely over the network.
sudo ethtool enp1s0
sudo ethtool -s enp1s0 wol g
sudo vim /etc/systemd/system/wol.service
[Unit]
Description=Enable Wake-on-LAN
After=network.target
[Service]
Type=oneshot
ExecStart=/sbin/ethtool -s enp1s0 wol g
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable wol.service
sudo systemctl start wol.service
wakeonlan MAC
π Useful Links
Setting Up Wake-on-LAN on Ubuntu 24.04 LTS
https://anavi.org/article/340/
π Chapters
0:00 Intro
0:27 BIOS
2:29 Ubuntu
7:29 Demo
9:42 Advantages
10:01 Disadvantages
10:31 Conclusions Remote Power Control on Linux: Using Wake-on-LAN with Ubuntu](https://i.ytimg.com/vi/fmvhlXrH_p4/mqdefault.jpg)







