Another option is downgrading the kernel to 6.1.74 which was the last kernel with the deprecated GPIO. A lot more software will be affected for GPIO access and this fix will fix it for all
sudo rpi-update d86b5843d68b9972a5430a6d3da1b271cfc83521
Get
toggle quoted message
Show quoted text
Hello Jim,
A recent Raspberry Pi OS upgrade made many disruptive changes including deprecating the old way of interfacing to the GPIO pins.? To resolve this for Direwolf you need to compile a new Direwolf using the Direwolf DEV branch which will bring you up to the 1.8-D version:
?? Section 7.2.2
??
--David
KI6ZHD
On 07/23/2024 09:49 PM, Jim KX0U wrote:
I'm getting an error when I try to use direwolf with GPIO configured for PTT.
I'm running Raspberry Pi OS on a Pi 2B.
Raspberry Pi OS with desktop and recommended software
Release date: July 4th 2024
System: 32-bit
Kernel version: 6.6
Debian version: 12 (bookworm)
Any suggestions for troubleshooting or alternatives would be appreciated.
$ cat direwolf.conf
PTT GPIO 13
ADEVICE plughw:2,0
$ direwolf
Dire Wolf version 1.6
Includes optional support for: gpsd hamlib cm108-ptt
Reading config file direwolf.conf
Audio device for both receive and transmit: plughw:2,0 (channel 0)
Channel 0: 1200 baud, AFSK 1200 & 2200 Hz, E+, 44100 sample rate / 3.
Error writing "13" to /sys/class/gpio/export, errno=22
Invalid argument
$ sudo direwolf -c ~/direwolf.conf
Dire Wolf version 1.6
Includes optional support for: gpsd hamlib cm108-ptt
Reading config file /home/radio/direwolf.conf
Audio device for both receive and transmit: plughw:2,0 (channel 0)
Channel 0: 1200 baud, AFSK 1200 & 2200 Hz, E+, 44100 sample rate / 3.
Error writing "13" to /sys/class/gpio/export, errno=22
Invalid argument
$ ls -ld /sys /sys/class /sys/class/gpio /sys/class/gpio/export
dr-xr-xr-x 12 root root 0 Dec 31 1969 /sys
drwxr-xr-x 59 root root 0 Dec 31 1969 /sys/class
drwxrwxr-x 2 root gpio 0 Jul 23 22:32 /sys/class/gpio
--w--w---- 1 root gpio 4096 Jul 23 22:32 /sys/class/gpio/export
$ ls -l /sys/class/gpio/
total 0
--w--w---- 1 root gpio 4096 Jul 23 22:32 export
lrwxrwxrwx 1 root gpio 0 Jul 23 22:32 gpiochip512 -> ../../devices/platform/soc/3f200000.gpio/gpio/gpiochip512
lrwxrwxrwx 1 root gpio 0 Jul 23 22:32 gpiochip566 -> ../../devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5.2/1-1.5.2:1.0/gpio/gpiochip566
--w--w---- 1 root gpio 4096 Jul 23 22:32 unexport
$ lsmod | grep gpio
raspberrypi_gpiomem 12288 0
$