LinuxCNC on Raspberry Pi 5
- jairobbo
- Offline
- New Member
-
Less
More
- Posts: 16
- Thank you received: 0
05 Feb 2025 20:55 #320790
by jairobbo
Replied by jairobbo on topic LinuxCNC on Raspberry Pi 5
no of course, I apologize, but there is I believe a problem related to hal_gpio.
I read the man page and there were some discrepancies in my code, I was hoping the permissions fix from the man page would be the fix, but it wasn't
Good luck to all!
I read the man page and there were some discrepancies in my code, I was hoping the permissions fix from the man page would be the fix, but it wasn't
Good luck to all!
Please Log in or Create an account to join the conversation.
- unknown
- Offline
- Premium Member
-
Less
More
- Posts: 126
- Thank you received: 51
05 Feb 2025 21:20 #320791
by unknown
Replied by unknown on topic LinuxCNC on Raspberry Pi 5
The permissions for user CNC include group membership for gpio which is required. You do not need to change anything.
If you copy and paste the loading of the module from the man page it will work.
The problem was when you tried to load the module you inserted the word help. The driver wouldn't load because of "invalid parameter help".
Undo whatever you have done regarding udev. Reboot.
The permissions and group membership are setup whilst building the image.
Once again reread the man page, try loading the driver as shown in the example on the man page. If that doesn't work copy and paste the text on the terminal.
Remember with Linux that every character matters. Don't take any shortcuts and if something doesn't work as expected check what you typed and recheck your understanding of what should happen.
If you copy and paste the loading of the module from the man page it will work.
The problem was when you tried to load the module you inserted the word help. The driver wouldn't load because of "invalid parameter help".
Undo whatever you have done regarding udev. Reboot.
The permissions and group membership are setup whilst building the image.
Once again reread the man page, try loading the driver as shown in the example on the man page. If that doesn't work copy and paste the text on the terminal.
Remember with Linux that every character matters. Don't take any shortcuts and if something doesn't work as expected check what you typed and recheck your understanding of what should happen.
Please Log in or Create an account to join the conversation.
- jairobbo
- Offline
- New Member
-
Less
More
- Posts: 16
- Thank you received: 0
06 Feb 2025 06:24 #320816
by jairobbo
Replied by jairobbo on topic LinuxCNC on Raspberry Pi 5
that is remarkable, because I flashed the latest image for pi5 for the second time and double checked my HAL and INI files. (the 'help' was indeed misplaced, and set this discussion on the wrong leg)
This is my loadrt command:
loadrt hal_gpio inputs=GPIO3,GPIO5,GPIO6,GPIO4 outputs=GPIO12,GPIO23,GPIO16,GPIO11,GPIO20,GPIO10,GPIO24,GPIO19,GPIO21,GPIO12,GPIO26,GPIO13
I will try to attach my ful config below.
this is from the report:
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:7: waitpid failed /usr/bin/rtapi_app hal_gpio
./my-mill.hal:7: /usr/bin/rtapi_app exited without becoming ready
./my-mill.hal:7: insmod for hal_gpio failed, returned -1
4465
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
I ready that there is still tricky stuff related to get the pi5 going with hal_grpio, but I don't know exactly what it is.
kind regards,
Jairo
This is my loadrt command:
loadrt hal_gpio inputs=GPIO3,GPIO5,GPIO6,GPIO4 outputs=GPIO12,GPIO23,GPIO16,GPIO11,GPIO20,GPIO10,GPIO24,GPIO19,GPIO21,GPIO12,GPIO26,GPIO13
I will try to attach my ful config below.
this is from the report:
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:7: waitpid failed /usr/bin/rtapi_app hal_gpio
./my-mill.hal:7: /usr/bin/rtapi_app exited without becoming ready
./my-mill.hal:7: insmod for hal_gpio failed, returned -1
4465
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
I ready that there is still tricky stuff related to get the pi5 going with hal_grpio, but I don't know exactly what it is.
kind regards,
Jairo
Please Log in or Create an account to join the conversation.
- jairobbo
- Offline
- New Member
-
Less
More
- Posts: 16
- Thank you received: 0
06 Feb 2025 06:26 #320817
by jairobbo
Replied by jairobbo on topic LinuxCNC on Raspberry Pi 5
Please Log in or Create an account to join the conversation.
- unknown
- Offline
- Premium Member
-
Less
More
- Posts: 126
- Thank you received: 51
06 Feb 2025 07:35 - 06 Feb 2025 07:39 #320818
by unknown
Replied by unknown on topic LinuxCNC on Raspberry Pi 5
On the loadrt line you are trying to assign GPIO12 twice
loadrt hal_gpio inputs=GPIO3,GPIO5,GPIO6,GPIO4
outputs=GPIO12,GPIO23,GPIO16,GPIO11,GPIO20,GPIO10,GPIO24,GPIO19,GPIO21,GPIO12,GPIO26,GPIO13
The you have done this, trying to use GOIO12 twiceYou need to fix these issues
You may need to increase your base period over 10000, I tried 15000.
And as you did not supply your postgui_call_list.hal I had to comment out that line, to get everything to load.
loadrt hal_gpio inputs=GPIO3,GPIO5,GPIO6,GPIO4
outputs=GPIO12,GPIO23,GPIO16,GPIO11,GPIO20,GPIO10,GPIO24,GPIO19,GPIO21,GPIO12,GPIO26,GPIO13
The you have done this, trying to use GOIO12 twice
net xstep stepgen.0.step => hal_gpio.GPIO12-out
net adir stepgen.3.dir => hal_gpio.GPIO12-out
You may need to increase your base period over 10000, I tried 15000.
And as you did not supply your postgui_call_list.hal I had to comment out that line, to get everything to load.
Last edit: 06 Feb 2025 07:39 by unknown.
The following user(s) said Thank You: jairobbo
Please Log in or Create an account to join the conversation.
- jairobbo
- Offline
- New Member
-
Less
More
- Posts: 16
- Thank you received: 0
06 Feb 2025 08:33 #320820
by jairobbo
Replied by jairobbo on topic LinuxCNC on Raspberry Pi 5
You are absolutely right. I was extremely happy to see it run successfully 
Now I need only connect the right PIN's since between hal_pi_gpio and hal_gpio the pin numbering is physical / BMC.
Anyway I appreciate your effort to help out
JAiro

Now I need only connect the right PIN's since between hal_pi_gpio and hal_gpio the pin numbering is physical / BMC.
Anyway I appreciate your effort to help out
JAiro
Please Log in or Create an account to join the conversation.
- Grad
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 1
06 Feb 2025 16:00 #320835
by Grad
Replied by Grad on topic LinuxCNC on Raspberry Pi 5
I do not know how you guys even got so far: i have a Raspberry Pi 5 Modell B, 4x 2,4 GHz, 4 GB DDR4 and created images of v. 2.9.4 to SD card & USB drive with 3 different burning software including balenaEtcher. When i boot the RPi5 the drives are not recognized (as bootable) at all. With an image of vanilla Ubuntu it works just fine.
Please Log in or Create an account to join the conversation.
- jhandel
- Offline
- Premium Member
-
Less
More
- Posts: 148
- Thank you received: 7
06 Feb 2025 20:34 #320844
by jhandel
Replied by jhandel on topic LinuxCNC on Raspberry Pi 5
Got a strange one with a Pi5... Network seems fine when I am just pinging my Mesa card (a 7i76e) but when I run Linux CNC, things kick on but then the network crashes and I get a bazillion (technical term) hm2/hm2_7i76e.0: error queuing read iter=xxxx) and everything turns back off..
Once it dies I can't even ping the Mesa card (10.10.10.10) until I unplug and plug back in the ethernet cord... Then its happy as a clam pinging.. but once I start up Linux CNC again same crash right as the UI inits.
(Linux CNC 2.9.3, PI5 8Gb, NVMe Boot)
Once it dies I can't even ping the Mesa card (10.10.10.10) until I unplug and plug back in the ethernet cord... Then its happy as a clam pinging.. but once I start up Linux CNC again same crash right as the UI inits.
(Linux CNC 2.9.3, PI5 8Gb, NVMe Boot)
Please Log in or Create an account to join the conversation.
- unknown
- Offline
- Premium Member
-
Less
More
- Posts: 126
- Thank you received: 51
06 Feb 2025 20:44 - 06 Feb 2025 21:17 #320847
by unknown
According the the RPi docs there is no RPi5 Model B, hmm screwed up on this, should have read further down, it does identify as 5-model-b, which can be found out by the following code snippet.
First thing I would is check the integrity of the download.
linuxcnc.org/iso/rpi-5-debian-bookworm-6...7-0140.img.xz.sha256
I test all images prior to uploading on a RPi5 4GB bought around Nov\Dec 2023 with latest EEPROM and on a RPi400 with latest EEPROM.
What I would suggest is boot to Ubuntu, then with a USB drive that you have written the Linuxcnc image to attempt to mount it.[/quote]
Replied by unknown on topic LinuxCNC on Raspberry Pi 5
I do not know how you guys even got so far: i have a Raspberry Pi 5 Modell B, 4x 2,4 GHz, 4 GB DDR4 and created images of v. 2.9.4 to SD card & USB drive with 3 different burning software including balenaEtcher. When i boot the RPi5 the drives are not recognized (as bootable) at all. With an image of vanilla Ubuntu it works just fine.
According the the RPi docs there is no RPi5 Model B, hmm screwed up on this, should have read further down, it does identify as 5-model-b, which can be found out by the following code snippet.
cat /proc/device-tree/compatible | tr '\0' '\n'
First thing I would is check the integrity of the download.
linuxcnc.org/iso/rpi-5-debian-bookworm-6...7-0140.img.xz.sha256
I test all images prior to uploading on a RPi5 4GB bought around Nov\Dec 2023 with latest EEPROM and on a RPi400 with latest EEPROM.
What I would suggest is boot to Ubuntu, then with a USB drive that you have written the Linuxcnc image to attempt to mount it.[/quote]
Last edit: 06 Feb 2025 21:17 by unknown.
The following user(s) said Thank You: Grad
Please Log in or Create an account to join the conversation.
- unknown
- Offline
- Premium Member
-
Less
More
- Posts: 126
- Thank you received: 51
06 Feb 2025 20:59 #320849
by unknown
forum.linuxcnc.org/27-driver-boards/4223...read?start=20#207308
Unfortunately I don't have any ethernet hardware to test with (only SPI), I have a 7i92 but that's in the mill enclosure and is a PITA to access. From reports the 6.12 kernel on the most recent RPi images have better latency, but I can't say whether that would solve your issue.
Replied by unknown on topic LinuxCNC on Raspberry Pi 5
You may want to start reading from here:Got a strange one with a Pi5... Network seems fine when I am just pinging my Mesa card (a 7i76e) but when I run Linux CNC, things kick on but then the network crashes and I get a bazillion (technical term) hm2/hm2_7i76e.0: error queuing read iter=xxxx) and everything turns back off..
Once it dies I can't even ping the Mesa card (10.10.10.10) until I unplug and plug back in the ethernet cord... Then its happy as a clam pinging.. but once I start up Linux CNC again same crash right as the UI inits.
(Linux CNC 2.9.3, PI5 8Gb, NVMe Boot)
forum.linuxcnc.org/27-driver-boards/4223...read?start=20#207308
Unfortunately I don't have any ethernet hardware to test with (only SPI), I have a 7i92 but that's in the mill enclosure and is a PITA to access. From reports the 6.12 kernel on the most recent RPi images have better latency, but I can't say whether that would solve your issue.
Please Log in or Create an account to join the conversation.
Time to create page: 0.092 seconds