hal_gpio: Operation not permitted fault cannot be solved

More
20 Jun 2025 14:15 - 20 Jun 2025 14:19 #330574 by bladekel
Hello to all.
I'm using Linuxcnc 2.9.4 on rpi5 debian bookworm that is installed from linuxcnc rpi5 image.
I have a problem on running my setup.
I tried many things like adding gpio to my user, creating a file 90-gpio-access that is mentioned on hal_gpio manual (linuxcnc.org/docs/devel/html/drivers/hal_gpio.html)

but I failed.

Here is my fault information;
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.4
Machine configuration directory is '/home/cnc/linuxcnc/configs/my-mill'
Machine configuration file is 'my-mill.ini'
INIFILE=/home/cnc/linuxcnc/configs/my-mill/my-mill.ini
VERSION=1.1
PARAMETER_FILE=linuxcnc.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=
DISPLAY=axis
COORDINATES=X Y Z A
KINEMATICS=trivkins coordinates=XYZA
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Found file(REL): ./my-mill.hal
Shutting down and cleaning up LinuxCNC...
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
Note: Using POSIX realtime
Failed to register output pin collection
hal_gpio: rtapi_app_main: Operation not permitted (-1)
./my-mill.hal:4: waitpid failed /usr/bin/rtapi_app hal_gpio
./my-mill.hal:4: /usr/bin/rtapi_app exited without becoming ready
./my-mill.hal:4: insmod for hal_gpio failed, returned -1
2307
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime

my groups are;
cnc@raspberrypi:~$ groups
cnc tty disk dialout sudo audio video plugdev users input render netdev i2c bluetooth gpio spi
Attachments:
Last edit: 20 Jun 2025 14:19 by bladekel.

Please Log in or Create an account to join the conversation.

More
20 Jun 2025 14:47 #330576 by unknown
The images are setup and no adding users to groups or messing around is needed.
Read the following thread and you'll find a link to GPIO info and a working example.
forum.linuxcnc.org/38-general-linuxcnc-q...official-images-only

Please Log in or Create an account to join the conversation.

More
20 Jun 2025 14:50 #330577 by unknown
And unless you disable SPI you can not use the SPI pins for GPIO in linuxcnc

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum