- Posts: 66
- Thank you received: 0
(SOLVED) hal_gpio: Operation not permitted fault cannot be solved
1 year 4 months ago #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;
my groups are;
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;
Code:
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;
Code:
cnc@raspberrypi:~$ groups
cnc tty disk dialout sudo audio video plugdev users input render netdev i2c bluetooth gpio spi
Please Log in to join the conversation.
1 year 4 months ago #330576
by unknown
Replied by unknown on topic (SOLVED) hal_gpio: Operation not permitted fault cannot be solved
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
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 to join the conversation.
1 year 4 months ago #330577
by unknown
Replied by unknown on topic (SOLVED) hal_gpio: Operation not permitted fault cannot be solved
And unless you disable SPI you can not use the SPI pins for GPIO in linuxcnc
Please Log in to join the conversation.
1 year 4 months ago #330677
by bladekel
Replied by bladekel on topic (SOLVED) hal_gpio: Operation not permitted fault cannot be solved
But I have tried both adding gpio to user and not adding. (They were with fresh image install)
I hav read all that link before writing here but nothing changed.
I am using hal and ini files from another working rpi5. Their user names, file names and locations are same.
If i added hal_gpio to hal file, it gives an error about permission.
I added gpio to user, not worked.
I have created 90-gpio-access file as it described, not worked....
The only thing that I havent tried is SPI... I will try it and write here...
I hav read all that link before writing here but nothing changed.
I am using hal and ini files from another working rpi5. Their user names, file names and locations are same.
If i added hal_gpio to hal file, it gives an error about permission.
I added gpio to user, not worked.
I have created 90-gpio-access file as it described, not worked....
The only thing that I havent tried is SPI... I will try it and write here...
Please Log in to join the conversation.
1 year 4 months ago #330682
by unknown
Replied by unknown on topic (SOLVED) hal_gpio: Operation not permitted fault cannot be solved
Code:
Failed to register output pin collection
This has nothing to do with permissions. It has to do with the pins you have chosen. The error message did not mention permissions. A lot of issues are able to be resolved by users reading the errors messages and not jumping to conclusions.
The thread also includes information regarding choosing pins that are allocated to SPI. Either you missed this or chose to ignore it.
The example hal & ini files do work with a fresh install, I have tested these myself.
Please Log in to join the conversation.
1 year 4 months ago #330751
by bladekel
Thanks for everything.
In my configuration I have used GPIO7 and GPIO8 as I/O .
After disabling the spi, I solved the problem....
Replied by bladekel on topic (SOLVED) hal_gpio: Operation not permitted fault cannot be solved
This is the problem that I could not see.And unless you disable SPI you can not use the SPI pins for GPIO in linuxcnc
Thanks for everything.
In my configuration I have used GPIO7 and GPIO8 as I/O .
After disabling the spi, I solved the problem....
Please Log in to join the conversation.
1 year 4 months ago #330783
by unknown
Replied by unknown on topic (SOLVED) hal_gpio: Operation not permitted fault cannot be solved
Can we have this marked as solved pleased ?
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
Less
More
- Posts: 22010
- Thank you received: 3
1 year 4 months ago #330784
by tommylight
Thank you.
Replied by tommylight on topic (SOLVED) hal_gpio: Operation not permitted fault cannot be solved
Done.Can we have this marked as solved pleased ?
Thank you.
Please Log in to join the conversation.
Time to create page: 0.180 seconds
