RPI4 Raspbian 64 bit & LinuxCNC
10 Sep 2023 10:30 #280389
by Donno
Replied by Donno on topic RPI4 Raspbian 64 bit & LinuxCNC
The username is fixed it boots directly to desktop logged in with cnc,cnc. Can you tell me how to setup gpio driver so i can test i manage to open the sim axis mm config with some ,disabling of pins in the hal file. I only get hal2pi (github.com/joao404/HAL2PI) when googling.
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
10 Sep 2023 11:29 - 10 Sep 2023 11:31 #280390
by cornholio
Replied by cornholio on topic RPI4 Raspbian 64 bit & LinuxCNC
linuxcnc.org/docs/devel/html/drivers/hal_gpio.html
Sounds like you can use a parport hal file and replace hal_parport entries with hal_gpio
Sounds like you can use a parport hal file and replace hal_parport entries with hal_gpio
Last edit: 10 Sep 2023 11:31 by cornholio.
Please Log in or Create an account to join the conversation.
10 Sep 2023 12:04 #280393
by rodw
Replied by rodw on topic RPI4 Raspbian 64 bit & LinuxCNC
Also in section 7 it says SUBSYSTEM=="bcm2835-gpiomem '.................
Thats probably going to be bcm2711-gpiomem for the Pi 4b
The rules discussed there should ensure the driver is loaded at boot time with the corredt permissions
I think the docs need a bit of love there
Thats probably going to be bcm2711-gpiomem for the Pi 4b
The rules discussed there should ensure the driver is loaded at boot time with the corredt permissions
I think the docs need a bit of love there
Please Log in or Create an account to join the conversation.
10 Sep 2023 13:29 #280397
by Donno
Replied by Donno on topic RPI4 Raspbian 64 bit & LinuxCNC
I loaded drivers with[/code]
I get no error messages and gpio is as expected but no response :
I will do step 7 now and see if i can get it working
[code]loadrt hal_gpio inputs=GPIO5,GPIO6,GPIO12,GPIO13,GPIO16,GPIO17,GPIO18,GPIO19 \
outputs=GPIO20,GPIO21,GPIO22,GPIO23,GPIO24,GPIO25,GPIO26,GPIO27 \
invert=GPIO20,GPIO27 \
reset=GPIO21,GPIO22
I get no error messages and gpio is as expected but no response :
I will do step 7 now and see if i can get it working
Attachments:
Please Log in or Create an account to join the conversation.
10 Sep 2023 13:51 #280400
by Donno
Replied by Donno on topic RPI4 Raspbian 64 bit & LinuxCNC
Created file 90-gpio-access
I am assuming this is a udev rule ???
I done the following :
I started linuxcnc in terminal with following output :
I am using GPIO 20 for output and GPIO 5 for input, still nothing.
SUBSYSTEM=="bcm2711-gpiomem", GROUP="gpio", MODE="0660" SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660" SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\ chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\ chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\ chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\ '"
SUBSYSTEM=="pwm*", PROGRAM="/bin/sh -c '\ chown -R root:gpio /sys/class/pwm && chmod -R 770 /sys/class/pwm;\ chown -R root:gpio /sys/devices/platform/soc/.pwm/pwm/pwmchip && chmod -R 770 /sys/devices/platform/soc/.pwm/pwm/pwmchip\
I am assuming this is a udev rule ???
I done the following :
sudo groupadd gpio
sudo cp 90-gpio-access /usr/lib/udev/rules.d/
sudo chmod +x /usr/lib/udev/rules.d/90-gpio-access
sudo usermod -aG gpio cnc
reboot
I started linuxcnc in terminal with following output :
cnc@raspberrypi:~$ /usr/bin/linuxcnc /home/cnc/linuxcnc/configs/sim.axis/axis_mm.ini
LINUXCNC - 2.10.0~pre0
Machine configuration directory is '/home/cnc/linuxcnc/configs/sim.axis'
Machine configuration file is 'axis_mm.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Waiting for component 'tpmod' to become ready.......Waited 3 seconds for master. giving up.
.Note: Using POSIX realtime
Found file(lib): /usr/share/linuxcnc/hallib/core_sim.hal
Found file(lib): /usr/share/linuxcnc/hallib/sim_spindle_encoder.hal
Found file(lib): /usr/share/linuxcnc/hallib/axis_manualtoolchange.hal
Found file(lib): /usr/share/linuxcnc/hallib/simulated_home.hal
Found file(REL): ./cooling.hal
task: main loop took 0.027656 seconds
task: main loop took 0.019169 seconds
note: MAXV max: 53.340 units/sec 3200.400 units/min
note: LJOG max: 53.340 units/sec 3200.400 units/min
note: LJOG default: 30.480 units/sec 1828.800 units/min
note: jog_order='XYZ'
note: jog_invert=set()
task: main loop took 0.012626 seconds
task: main loop took 0.011122 seconds
task: main loop took 0.010243 seconds
task: main loop took 0.012159 seconds
task: main loop took 0.017321 seconds
task: main loop took 0.010607 seconds
task: main loop took 0.011524 seconds
task: main loop took 0.012778 seconds
I am using GPIO 20 for output and GPIO 5 for input, still nothing.
Please Log in or Create an account to join the conversation.
10 Sep 2023 19:45 #280426
by rodw
Replied by rodw on topic RPI4 Raspbian 64 bit & LinuxCNC
I can't really help. We need Andy as he wrote it
I wonder if changing the board was wrong?
I'm just uploading another 2.10 img with the linuxcnc docs in it. Its a 2gb download and 6.9 gb uncompressed
It has not got any gpio changes
drive.google.com/file/d/11FDs7H5EUx2_eSr...VDQ/view?usp=sharing
I wonder if changing the board was wrong?
I'm just uploading another 2.10 img with the linuxcnc docs in it. Its a 2gb download and 6.9 gb uncompressed
It has not got any gpio changes
drive.google.com/file/d/11FDs7H5EUx2_eSr...VDQ/view?usp=sharing
Please Log in or Create an account to join the conversation.
10 Sep 2023 20:21 - 10 Sep 2023 20:22 #280427
by andypugh
Replied by andypugh on topic RPI4 Raspbian 64 bit & LinuxCNC
Does the gpiod driver work outside of LinuxCNC? ie does "gpioinfo" work, and can you set and reset pins with gpioget and gpioset ?
See. for example: wiki.radxa.com/Gpiod
Did you remember to add the hal_gipo read and write functions to a thread?
See. for example: wiki.radxa.com/Gpiod
Did you remember to add the hal_gipo read and write functions to a thread?
Last edit: 10 Sep 2023 20:22 by andypugh.
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
10 Sep 2023 21:00 #280431
by cornholio
Replied by cornholio on topic RPI4 Raspbian 64 bit & LinuxCNC
Maybe it would be an idea to have something like the parallel port tester to begin with.
Please Log in or Create an account to join the conversation.
10 Sep 2023 21:05 #280432
by rodw
Replied by rodw on topic RPI4 Raspbian 64 bit & LinuxCNC
Thanks Andy, after reading the link, the build installs the gpiod-dev package but does not include the gpiod package So it can't be a dependency of linuxcnc-uspace
Try: sudo apt install gpiod
Can the linuxcnc deb build include it as a dependency for ARM64 Architecture?
Try: sudo apt install gpiod
Can the linuxcnc deb build include it as a dependency for ARM64 Architecture?
Please Log in or Create an account to join the conversation.
10 Sep 2023 21:14 #280434
by cornholio
Replied by cornholio on topic RPI4 Raspbian 64 bit & LinuxCNC
I was under the impression that if a deb package was built against a certain library dev package that the library package was automatically included as a dependency.
Please Log in or Create an account to join the conversation.
Time to create page: 0.522 seconds