Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPIO cannot be activated #677

Open
DL7TA opened this issue Aug 2, 2024 · 5 comments
Open

GPIO cannot be activated #677

DL7TA opened this issue Aug 2, 2024 · 5 comments

Comments

@DL7TA
Copy link

DL7TA commented Aug 2, 2024

Hello OM.
I have been successfully operating several repeaters with Svxlink for years and have written a small manual for the installation and configuration. Up until now, the installation worked without any problems, but unfortunately it is currently stuck.

I configure my GPIO pins as follows in /etc/svxlink/gpio.conf:
###############################################################################

#Configuration file for the SvxLink server GPIO Pins

###############################################################################

#GPIO system pin path
#RPi/odroid/nanopi/pine64 = /sys/class/gpio, orangpi = /sys/class/gpio_sw
GPIO_PATH=/sys/class/gpio

#Space separated list of GPIO pins that point IN and have an
#Active HIGH state (3.3v = ON, 0v = OFF)
GPIO_IN_HIGH="gpio26"

#Space separated list of GPIO pins that point IN and have an
#Active LOW state (0v = ON, 3.3v = OFF)
GPIO_IN_LOW=""

#Space separated list of GPIO pins that point OUT and have an
#Active HIGH state (3.3v = ON, 0v = OFF)
GPIO_OUT_HIGH="gpio13"

#Space separated list of GPIO pins that point OUT and have an
#Active LOW state (0v = ON, 3.3v = OFF)
GPIO_OUT_LOW=""

#User that should own the GPIO device files
GPIO_USER="svxlink"

#Group for the GPIO device files
GPIO_GROUP="svxlink"

#File access mode for the GPIO device files
GPIO_MODE="0664"

I activate the GPIO with sudo systemctl enable svxlink_gpio_setup and then start Svxlink.

This starts with the error message:
"*** ERROR: Could not open GPIO device /sys/class/gpio/gpio26/value specified in Rx1/GPIO_SQL_PIN: No such file or directory"

Svxlink did not create any folders for the individual GPIOs under /sys/class/gpio.
This had always worked without problems up until now.

Has something changed in the current version of Svxlink so that I now have to take a different approach?

vy73!
Dan

@f5vmr
Copy link

f5vmr commented Aug 2, 2024 via email

@DL7TA
Copy link
Author

DL7TA commented Aug 4, 2024

Hello Chris,
thanks for your answer.
Unfortunately the setting with SQL_DET=GPIOD doesn't work.
Svxlink is up to date, but the error message still appears:
ERROR: Unknown squelch type specified in config variable Rx1/SQL_DET. Legal squelch types are: "COMBINE" "CTCSS" "EVDEV" "GPIO" "HIDRAW" "OPEN" "PTY" "SERIAL" "SIGLEV" "VOX"
The docs here on Github say that the following is possible:
.B SQL_DET
Specify the type of squelch detector to use. Possible values ​​are: VOX, CTCSS,
SERIAL, EVDEV, SIGLEV, PTY, GPIO, GPIOD, HIDRAW or COMBINE.
But unfortunately it doesn't work.
Do you have any other ideas?
vy 73!
Dan

@f5vmr
Copy link

f5vmr commented Aug 4, 2024 via email

@yoch2015
Copy link

yoch2015 commented Aug 30, 2024

Hello,
I faced the same problem and I solved it so I'll share it.
It seems that the new OS has changed the way GPIO is accessed.

First, generate a path for gpio26.

$ cat /sys/kernel/debug/gpio | grep GPIO26
gpio-538 (GPIO26 )

I found out it is gpio-538, so I will export it.

$ echo 538 > /sys/class/gpio/export
$ cat /sys/kernel/debug/gpio | grep GPIO26
gpio-538 (GPIO26 |sysfs ) in hi

Generated in/hi.

Next, PTT (GPIO13) is generated in the same way.
The ptt is also generated with in/hi, so it changes direction.

$ echo out > /sys/class/gpio/gpio525/direction
$ cat /sys/kernel/debug/gpio | grep GPIO13
gpio-525 (GPIO13 |sysfs ) out lo

Make svxlink.conf as follows.
If you want the opposite behavior, remove or add the [!].

svxlink.conf

SQL_DET=GPIO
GPIO_PATH=/sys/class/gpio
GPIO_SQL_PIN=!gpio538

PTT_TYPE=GPIO
PTT_PIN=gpio525
GPIO_PATH=/sys/class/gpio

73!

@f5vmr
Copy link

f5vmr commented Aug 30, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants