- Posts: 12160
- Thank you received: 0
RPI4 Raspbian 64 bit & LinuxCNC
3 years 3 months ago #275547
by rodw
Replied by rodw on topic RPI4 Raspbian 64 bit & LinuxCNC
Andy as you noted in the GitHub issue, the solution is to use gpiod and rewrite Linuxcnc to use it. In fact it probably should have been used with Linuxcnc 2.8 as the addition of gpiod to the kernel was done before the release of Debuan Buster.
This is now superceded as its in the 2.9 documents now.
Please refer to this link instead. linuxcnc.org/docs/2.9/html/getting-start...etting-linuxcnc.html
Following this recipe I have LinuxCNC running on a Pi.
However, this install does not appear to have access to the GPIO.
On Raspbian there is a file /dev/gpiomem but that isn't created on a normal Bookworm installation.
The hal_pi_gpio module uses this to access the gpio, and won't load without it.
Please Log in to join the conversation.
3 years 3 months ago #275548
by andypugh
Yes, but I don't know how to get the fix to you, unless you can build LinuxCNC from source?
If you can, then check out the andypugh/hal_pi_gpio branch and compile it. (I am working on it right now, currently adding missing docs)
Replied by andypugh on topic RPI4 Raspbian 64 bit & LinuxCNC
I have a problem with a new pi4b.
hal_pi_gpio refuses to load. It states Revision 7 is not supported.
Is there a solution for this?
Yes, but I don't know how to get the fix to you, unless you can build LinuxCNC from source?
If you can, then check out the andypugh/hal_pi_gpio branch and compile it. (I am working on it right now, currently adding missing docs)
Please Log in to join the conversation.
3 years 3 months ago #275550
by rodw
Replied by rodw on topic RPI4 Raspbian 64 bit & LinuxCNC
Andy, I think your branch is on the wrong track. I don't think you should be parsing config filesIf you can, then check out the andypugh/hal_pi_gpio branch and compile it. (I am working on it right now, currently adding missing docs)
Instead you should be using the gpiod.h API functions.
git.kernel.org/pub/scm/libs/libgpiod/lib...tree/include/gpiod.h
there are some examples here.
git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/examples
Please Log in to join the conversation.
3 years 3 months ago #275552
by andypugh
Replied by andypugh on topic RPI4 Raspbian 64 bit & LinuxCNC
Currently the fix is simply replacing the broken cpuinfo.c file with something more future-proof. This is likely to still be needed.
Yes, maybe someone should re-write the entire driver but there is no guarantee that gpiod is fast enough, and it's a bigger job than the simple bug-fix that I picked up from the issues list.
It would also be good to pick up the "reset" fixes that were posted here a while back too.
But, first, lets just make it work on the current Pi models then look at major re-writes later.
Yes, maybe someone should re-write the entire driver but there is no guarantee that gpiod is fast enough, and it's a bigger job than the simple bug-fix that I picked up from the issues list.
It would also be good to pick up the "reset" fixes that were posted here a while back too.
But, first, lets just make it work on the current Pi models then look at major re-writes later.
Please Log in to join the conversation.
3 years 3 months ago #275573
by elovalvo
forum.linuxcnc.org/24-hal-components/495...by-hal-pi-gio#275572
Replied by elovalvo on topic RPI4 Raspbian 64 bit & LinuxCNC
I have a problem with a new pi4b.
hal_pi_gpio refuses to load. It states Revision 7 is not supported.
Is there a solution for this?
forum.linuxcnc.org/24-hal-components/495...by-hal-pi-gio#275572
Please Log in to join the conversation.
3 years 3 months ago #275574
by elovalvo
Rather than using the Windows Remote Desktop, I prefer to use MobaXterm
mobaxterm.mobatek.net/
Replied by elovalvo on topic RPI4 Raspbian 64 bit & LinuxCNC
Some additional information:
I installed xrdp on the RPi.
The ifconfig terminal command outputs 3 sections; etho, lo and wlan0.
The eth0 section contains this line:
inet 192.168.0.111 netmask 255.255.255.0 broadcast 192.168.0.255
On my Windows machine I opened the Remote Desktop application, entered “192.168.0.111” in the PC name field, with username linuxcnc and password cnc.
But when I connect I only see a blue greenish empty screen.
After a couple of minutes it shows a "Connection Log" (first photo), when I click the Ok button it opens the "Login to raspberrypi" window (second photo), but entering my username/password brings me back to the empty screen for a couple of minutes, until the "Connection Log" window appears again.
Rather than using the Windows Remote Desktop, I prefer to use MobaXterm
mobaxterm.mobatek.net/
Please Log in to join the conversation.
3 years 3 months ago #275581
by itsme
Replied by itsme on topic RPI4 Raspbian 64 bit & LinuxCNC
I was able to resolve the issue with a workaround proposed by elovalvo in the other topic...
I have a problem with a new pi4b.
hal_pi_gpio refuses to load. It states Revision 7 is not supported.
Is there a solution for this?
forum.linuxcnc.org/24-hal-components/495...by-hal-pi-gio#275572
Please Log in to join the conversation.
3 years 2 months ago #277759
by techroo
Replied by techroo on topic RPI4 Raspbian 64 bit & LinuxCNC
Hiya all,
Im trying to modify a small milling machine to CNC using LinuxCnc and Rtelligent EtherCat Closed loop stepper drivers.
New to Linux and i am finding it out the hard way trying to get ethercat to work on my raspi 4B.
I tried following the Installation notes by Hakan ( forum.linuxcnc.org/ethercat/42048-notes-...at-on-raspberry-pi-4 ) but version 2.8.1 does not boot with the "start4.elf is not compatible. This board requires newer software" error.
It then tried the 2.9.0 image posted by elovalvo on page 16 of this thread. This one booted no problem.
The problem is the dkms_build failing and me not knowing what exactly goes wong.
If there is anyone who can spare an image of 2.9.0 with ethercat installed im really interested.
Im trying to modify a small milling machine to CNC using LinuxCnc and Rtelligent EtherCat Closed loop stepper drivers.
New to Linux and i am finding it out the hard way trying to get ethercat to work on my raspi 4B.
I tried following the Installation notes by Hakan ( forum.linuxcnc.org/ethercat/42048-notes-...at-on-raspberry-pi-4 ) but version 2.8.1 does not boot with the "start4.elf is not compatible. This board requires newer software" error.
It then tried the 2.9.0 image posted by elovalvo on page 16 of this thread. This one booted no problem.
The problem is the dkms_build failing and me not knowing what exactly goes wong.
If there is anyone who can spare an image of 2.9.0 with ethercat installed im really interested.
Please Log in to join the conversation.
3 years 2 months ago #277788
by rodw
Replied by rodw on topic RPI4 Raspbian 64 bit & LinuxCNC
Ok, so much has changed but the good thing is you have Linuxcnc installed on Bullseye.
There is an ethercat Deb for that
Can you follow these instructions I did here
forum.linuxcnc.org/ethercat/45336-etherc...step-by-step?start=0
Where I said Create an ethercat sources file can you change Debian_12 to Raspbian_11
Everything else should work.
Note this method has only been updated on 10 August (3 days ago) following final release of Deb files by the iGh EtherCAT team to their mainline repositories. Using it to run on a Pi is untested but from what I see, it should work.
Please report back on the thread I linked to with your feedback. Once its confirmed working, I will update the instructions.
Note in the instructions, there is a link to my git repo with a xml file for the rtelligent stepper drives you can use. There is also a hal file too.
Note that ethercat is very advanced and adds an order of complexity to a Linuxcnc config. Then to add a raspberry Pi into the mix adds a whole new level of complexity and likely disappointment into the mix.
There is an ethercat Deb for that
Can you follow these instructions I did here
forum.linuxcnc.org/ethercat/45336-etherc...step-by-step?start=0
Where I said Create an ethercat sources file can you change Debian_12 to Raspbian_11
Everything else should work.
Note this method has only been updated on 10 August (3 days ago) following final release of Deb files by the iGh EtherCAT team to their mainline repositories. Using it to run on a Pi is untested but from what I see, it should work.
Please report back on the thread I linked to with your feedback. Once its confirmed working, I will update the instructions.
Note in the instructions, there is a link to my git repo with a xml file for the rtelligent stepper drives you can use. There is also a hal file too.
Note that ethercat is very advanced and adds an order of complexity to a Linuxcnc config. Then to add a raspberry Pi into the mix adds a whole new level of complexity and likely disappointment into the mix.
Please Log in to join the conversation.
3 years 2 months ago #277815
by techroo
Replied by techroo on topic RPI4 Raspbian 64 bit & LinuxCNC
Thank you for the quick response.
I am beginning to see the complexity of trying to use a pi and ethercat together.
I am running into trouble with the Raspbian_11 repositories only containing the armhf packages, not the arm64 ones. Debian_12 does have these but runs into libc6 version dependency issues.
I added deb debian12 repo to try and grab compatible versions but run into more dependency issues.
For now i will do my install on a spare PC.
I am beginning to see the complexity of trying to use a pi and ethercat together.
I am running into trouble with the Raspbian_11 repositories only containing the armhf packages, not the arm64 ones. Debian_12 does have these but runs into libc6 version dependency issues.
I added deb debian12 repo to try and grab compatible versions but run into more dependency issues.
For now i will do my install on a spare PC.
Please Log in to join the conversation.
Time to create page: 0.204 seconds
