开云体育

Heads up: New Raspberry Pi OS Bookworm 12.2 OS upgrade breaks Direwolf v1.7 GPIO pin access


 

开云体育

Hello Everyone,

Just as a heads up but Raspberry Pi OS Bookworm received a major update earlier this week which includes the
Linux 6.6.20 kernel and many other changes:

??

In this new OS update, the classic way of interfacing with GPIO pins has now been DEPRECATED and this breaks Direwolf
v1.7 if you use GPIO pins to assert the PTT line to your radio, light up an LED with the DCD signal, etc.? The solution was already
committed to the Direwolf DEV branch back in November 2023 which will eventually become Direwolf v1.8.? You can read up
about that and how to both recompile DIrewolf and reconfigure your direwolf.conf file to use this new gpiod interface here:

??

I'm happy to report things are working for me with this new code but I felt compelled to report this as this
very disruptive change coming in the middle of the Bookworm OS lifecycle is going to create some pain for
some people.? I'm also updating my Raspberry Pi docs and automated build script later to day to reflect this
change.

--David
KI6ZHD



 

Thanks for the heads up.

Just did an update on a Pi 4 with Bookworm and DW 1.8a and ran into this. At least I know why. Fortunately, I was just adding some blinky lights so it's not a show stopper today.

Dave


 

+1 for the heads up. There will either have to be more changes in direwolf, or some additions to documentation for rpi gpio ptt. On a pi5 using gpio 17 for ptt, `ptt GPIOD gpiochip4 -17` worked fine for me. Notice the inverted logic; it appears direwolf gpiod is using active low.


 

Yah, this is an epic disaster for five reasons,

1) breaks every gpio document on the internet
2) breaks direwolf
3) gpiozero (the lauded replacement) burns half a cpu just to monitor a button, nobody there cares
4) gpiod requires 30 lines of python to monitor a button
5) You need different code depending on which Pi model you're using

it's a huge disservice to the educational/pi community.

imho,
-craig
KM6LYW


 

No different than the
ethernet / wifi naming issue
removal / changing of the camera functionality
any other number of changes made by the program developers @ RPiFoundation, who have by actions have shown they have changed their focus to the commercial side instead of what gave them the capabilities to create in the first place.

I gave up on them a few reversions back. In order to 'beat the system' I began using the tool that they use to build my own images with the reversals enabled to maintain the software I used, but I've given that up because they made no way to reverse the most recent changes. I'm on debian 11 and debian 12 for almost everything, using m73TFF and Lenovo ideapad 3s running xcp-ng and docker to multi-task my tools...?
--
= = = =

? Kevin? --? KD9EFV


 

As I noted in an earlier response, I ran into this yesterday right after an update. I would rather bite the bullet now rather than in the future. For Direwolf, is this a simple matter of installing gpiod and libgpiod-dev and then changing the direwolf.conf file?

Dave
WB9TEN


 

开云体育


Are you asking if you can switch to gpiod on an older non-Bookworm version OS?? If so, there might be other dependencies you will also have to install but I can confirm that gpiod is in Bullseye, Buster, and even Stretch has gpiod.? To be clear, you will also need to switch to using the Direwolf "Dev" branch which has the new Direwolf v1.8 code, recompile Direwolf, and use that new version.

--David
KI6ZHD


On 03/17/2024 10:06 AM, dtmenges@... via groups.io wrote:

As I noted in an earlier response, I ran into this yesterday right after an update. I would rather bite the bullet now rather than in the future. For Direwolf, is this a simple matter of installing gpiod and libgpiod-dev and then changing the direwolf.conf file?

Dave
WB9TEN


 

David,?

Just the opposite. I was asking if all I need to do is add?gpiod?and?libgpiod-dev to the updated Bookworm and change my direwolf.conf file.? I'm already running DW 1.8A.


 

开云体育


Just the opposite. I was asking if all I need to do is add?gpiod?and?libgpiod-dev to the updated Bookworm and change my direwolf.conf file.? I'm already running DW 1.8A.

You will still need to re-compile Direwolf 1.8A once the libgpiod-dev package is installed so it can been seen and linked in.? See this output of a new build on a 64bit Raspberry Pi OS Bookworm 12.2.4 Rpi:
--
Starting Cmake stage
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.39.2")
-- Dire Wolf Version: 1.8.0-e41a7f2
-- Build type set to: Release
CMake system: Linux
-- Target architecture: ARM64
-- Use NEON SIMD instructions
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- Looking for strlcat
-- Looking for strlcat - not found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE?
-- Checking for module 'libgps'
--?? Found libgps, version 3.22
-- Found GPSD: /usr/lib/aarch64-linux-gnu/libgps.so
-- Checking for module 'hamlib'
--?? Package 'hamlib', required by 'virtual:world', not found
-- Could NOT find hamlib (missing: HAMLIB_LIBRARY HAMLIB_INCLUDE_DIR)
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1")
-- Found gpiod: /usr/lib/aarch64-linux-gnu/libgpiod.so??? <------------------------------------------------------------------------------
-- Found ALSA: /usr/lib/aarch64-linux-gnu/libasound.so (found version "1.2.8")
-- Checking for module 'libudev'
--?? Found libudev, version 252
-- Found udev: /usr/lib/aarch64-linux-gnu/libudev.so?
-- Could NOT find Avahi (missing: AVAHI_COMMON_FOUND AVAHI_CLIENT_FOUND)
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/src/archive/Rpi-scratch/direwolf/direwolf/direwolf-1.8.0-A-e41a7f2/build

--



 

I ran this?sudo apt install gpiod and everything went fine.

I then ran?sudo apt install libgpiod-dev and the following is the result.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libgpiod-dev

I'm running the following:

Linux 6.6.20+rpt-rpi-v8 aarch64

PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)"
NAME="Raspbian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

I've obviously missed a step or two but not sure where.

Regards,
Dave


?


 

开云体育


Try:

?? sudo apt install libgpiod2


I'm seeing different versions across Raspberry Pi OS, Ubuntu, etc.? Here is Raspberry Pi OS Bookworm 12.2.4:
--
ii? gpiod??????????????????????????????? 1.6.3-1+b3????????????????????????? arm64??????? Tools for interacting with Linux GPIO character device - binary
ii? libgpiod2:arm64????????????????????? 1.6.3-1+b3????????????????????????? arm64??????? C library for interacting with Linux GPIO device - shared libraries
--

--David
KI6ZHD


On 03/18/2024 07:10 AM, dtmenges@... via groups.io wrote:

I ran this?sudo apt install gpiod and everything went fine.

I then ran?sudo apt install libgpiod-dev and the following is the result.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libgpiod-dev

I'm running the following:

Linux 6.6.20+rpt-rpi-v8 aarch64

PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)"
NAME="Raspbian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=raspbian
ID_LIKE=debian
HOME_URL=
SUPPORT_URL=
BUG_REPORT_URL=

I've obviously missed a step or two but not sure where.

Regards,
Dave


?


 

This worked for me with RPi 5 bookworm:

sudo apt install gpiod libgpiod-dev


Did you type the command or copy/paste it from somewhere?
Some document editors will change the ASCII "-" (minus, dash, hyphen) to some other non-ASCII character which looks the same on the screen.

The Radio Interface Guide, in ?? ,? has been updated with more details about using gpiod.

73,
John WB2OSZ


 

John,
Just saw the updated Radio Interface Guide. I'm going through those links to gain some background. The second link has two procedures. Should I run those?

I have copied commands and then pasted them into a text document. After lunch I'll try replacing the - characters just to make sure. Usually I copy and then paste into a local text file just to make sure any goofy formatting codes are scrubbed.

Dave


Richard E Neese
 

开云体育

Ham Radio: How to Setup and Operate Your Ham Radio (Quickstart Guide for New Hams and Amateur Radio Enthusiasts)






All these books would be a great start. And try to get more kids involved


On Mar 18, 2024, at 12:11?PM, dtmenges@... via groups.io <dtmenges@...> wrote:

John,
Just saw the updated Radio Interface Guide. I'm going through those links to gain some background. The second link has two procedures. Should I run those?

I have copied commands and then pasted them into a text document. After lunch I'll try replacing the - characters just to make sure. Usually I copy and then paste into a local text file just to make sure any goofy formatting codes are scrubbed.

Dave


Richard E Neese
 

开云体育

Sorry sent to wrong group


On Mar 18, 2024, at 12:13?PM, Richard E Neese via groups.io <r.neese@...> wrote:

Ham Radio: How to Setup and Operate Your Ham Radio (Quickstart Guide for New Hams and Amateur Radio Enthusiasts)






All these books would be a great start. And try to get more kids involved


On Mar 18, 2024, at 12:11?PM, dtmenges@... via groups.io <dtmenges@...> wrote:

John,
Just saw the updated Radio Interface Guide. I'm going through those links to gain some background. The second link has two procedures. Should I run those?

I have copied commands and then pasted them into a text document. After lunch I'll try replacing the - characters just to make sure. Usually I copy and then paste into a local text file just to make sure any goofy formatting codes are scrubbed.

Dave



 

The good news is that when I set up a clean SD card with 32-bit Bookworm and followed the instructions in the new Radio Interface Guide and everything is peachy. Somehow, there is no libgpiod-dev package on my other Pi and I'm not sharp enough to figure out how to get it there.?I checked both with dpkg -s libgpiod-dev.

Thanks for the help. I'll contemplate this a bit more before raising the white flag.

Dave


 

Did you try to install it using apt?

do

sudo apt update

sudo apt install libgpiod-dev

It's available in the repository for both Buster (Debian 10) and Bullseye (Debian 11) on two old model B Pis I have in service, both running whatever image the Pi Foundation supplied at the time.

sudo apt list libgpiod-dev will show if it's available.

Ray vk2tv

On 19/3/24 07:38, dtmenges@... via groups.io wrote:
dpkg -s libgpiod-dev


 

Ray,

Tried all of that.

I think it is time to start over. I believe this is something that I did and it is an isolated incident and hope that I didn't waste too much time for those that commented.

Thanks to all that helped. I appreciate the effort.

Dave
WB9TEN


 

开云体育

Blast! I replied to the wrong sender. See what increasing age can do.

My apology.

Ray vk2tv

On 20/3/24 00:14, dtmenges@... via groups.io wrote:

Ray,

Tried all of that.

I think it is time to start over. I believe this is something that I did and it is an isolated incident and hope that I didn't waste too much time for those that commented.

Thanks to all that helped. I appreciate the effort.

Dave
WB9TEN