failure to connect with raspberry pi 4 with 'raspi'
33 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
when using raspi for a new connection i get an error that gpiod.h is not found.
i have followed all the suggections of copilot at no avail.
0 Kommentare
Antworten (3)
Ran Zeimer
am 9 Dez. 2025 um 0:42
2 Kommentare
Taylor
am 9 Dez. 2025 um 16:10
Try
% Run this on your Raspberry Pi, NOT MATLAB
sudo apt-get update
sudo apt-get install gpiod libgpiod-dev
This will install command line tools and install header files and libraries. Then try connecting to the Raspberry Pi again.
Walter Roberson
am 9 Dez. 2025 um 16:29
According to https://www.mathworks.com/help/matlab/supportpkg/install-support-for-raspberry-pi-hardware.html there is currently compatibility with
- 32-bit Buster OS
- 32-bit and 64-bit Bullseye OS
- 32-bit and 64-bit Bookworm OS
The support for Stretch was roughly R2021b. Jessie support started from R2016a (but ended before R2021b.)
Ran Zeimer
am 10 Dez. 2025 um 1:19
1 Kommentar
Taylor
vor etwa 5 Stunden
Sounds like an libgpiod API mismatch. Start by confirming what version you have on the Raspberry Pi. Again, run the following code in SSH/terminal not MATLAB
# Shows the version provided by pkg-config (if installed)
pkg-config --modversion libgpiod || echo "pkg-config not found"
# Shows installed and candidate versions
apt-cache policy libgpiod-dev libgpiod2
# Peek at the header to see which API it exposes
grep -n "gpiod_line_request_output" /usr/include/gpiod.h || echo "v1 symbol not found"
grep -n "gpiod_line_settings_new" /usr/include/gpiod.h || echo "v2-only symbol not found"
If you see 2.x in apt-cache policy and the header lacks gpiod_line_request_output, you’re on libgpiod v2 headers. MATLAB’s server expects v1 symbols; v2 is not source-compatible with those calls. To install the v1 headers:
sudo apt-get update
# Install (or reinstall) the v1 dev and runtime packages from the current repo
# On Raspberry Pi OS Bookworm these resolve to 1.6.3
sudo apt-get install --yes --allow-downgrades libgpiod-dev libgpiod2
# (Optional) prevent an unintended upgrade to v2 later
sudo apt-mark hold libgpiod-dev libgpiod2
Then reconnect to your board with the raspi command in MATLAB.
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!