Search Results (Searched for: raspberry)
- H-S-W
- H-S-W
14 Apr 2025 08:02
Replied by H-S-W on topic Script to update 2.9.x ISO to use Linuxcnc Version 2.10 (master branch)
Script to update 2.9.x ISO to use Linuxcnc Version 2.10 (master branch)
Category: Installing LinuxCNC
I still can't get it to work! changed the arch=amd64 to arch=arm64?
cnc@raspberrypi:~$ #! /bin/bash
cnc@raspberrypi:~$ mkdir ~/apt
mkdir: cannot create directory ‘/home/cnc/apt’: File exists
cnc@raspberrypi:~$ sudo cp -r /etc/apt/*.* ~/apt
cnc@raspberrypi:~$ sudo wget http://buildbot2.highlab.com/buildbot-archive-key.gpg -P /etc/apt/trusted.gpg.d
--2025-04-14 09:58:49-- http://buildbot2.highlab.com/buildbot-archive-key.gpg
Resolving buildbot2.highlab.com (buildbot2.highlab.com)... 184.96.146.47
Connecting to buildbot2.highlab.com (buildbot2.highlab.com)|184.96.146.47|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1190 (1.2K)
Saving to: ‘/etc/apt/trusted.gpg.d/buildbot-archive-key.gpg.3’
buildbot-archive-ke 100%[===================>] 1.16K --.-KB/s in 0s
2025-04-14 09:58:49 (146 MB/s) - ‘/etc/apt/trusted.gpg.d/buildbot-archive-key.gpg.3’ saved [1190/1190]
cnc@raspberrypi:~$ sudo rm -f /etc/apt/preferences.d/99linuxcnc-uspace.pref
cnc@raspberrypi:~$ sudo rm -f /etc/apt/sources.list.d/linuxcnc-uspace.list
cnc@raspberrypi:~$ sudo tee /etc/apt/sources.list.d/linuxcnc-uspace.list > /dev/null <<EOT
deb [arch=amd64, signed-by=/etc/apt/trusted.gpg.d/buildbot-archive-key.gpg] http://buildbot2.highlab.com/debian/ bookworm master-uspace 2.9-uspace
EOT
cnc@raspberrypi:~$ sudo apt update
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
Hit:3 http://deb.debian.org/debian bookworm-proposed-updates InRelease
Hit:4 http://deb.debian.org/debian-security bookworm-security InRelease
Hit:5 http://deb.debian.org/debian bookworm-backports InRelease
Hit:6 http://download.opensuse.org/repositories/science:/EtherLab/Debian_12 ./ InRelease
Hit:7 http://buildbot2.highlab.com/debian bookworm InRelease
Hit:8 https://www.linuxcnc.org bookworm InRelease
Get:9 https://gnipsel.com/mesact/apt-repo stable InRelease [2608 B]
Err:9 https://gnipsel.com/mesact/apt-repo stable InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6F8DFB65A82CD322
Reading package lists... Done
W: Target Packages (master-uspace/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/linuxcnc-uspace.list:1
W: Target Translations (master-uspace/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/linuxcnc-uspace.list:1
W: Target Packages (2.9-uspace/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/linuxcnc-uspace.list:1
W: Target Translations (2.9-uspace/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/linuxcnc-uspace.list:1
W: Skipping acquire of configured file 'master-uspace/binary-arm64/Packages' as repository 'http://buildbot2.highlab.com/debian bookworm InRelease' does not seem to provide it (sources.list entry misspelt?)
W: Skipping acquire of configured file '2.9-uspace/binary-arm64/Packages' as repository 'http://buildbot2.highlab.com/debian bookworm InRelease' does not seem to provide it (sources.list entry misspelt?)
W: GPG error: https://gnipsel.com/mesact/apt-repo stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6F8DFB65A82CD322
E: The repository 'https://gnipsel.com/mesact/apt-repo stable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (master-uspace/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/linuxcnc-uspace.list:1
W: Target Translations (master-uspace/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/linuxcnc-uspace.list:1
W: Target Packages (2.9-uspace/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/linuxcnc-uspace.list:1
W: Target Translations (2.9-uspace/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/linuxcnc-uspace.list:1
cnc@raspberrypi:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.- llamatrails
- llamatrails
13 Apr 2025 21:45
RPi 4, LinuxCNC upgrade doesn't upgrade kernel was created by llamatrails
RPi 4, LinuxCNC upgrade doesn't upgrade kernel
Category: Installing LinuxCNC
Raspberry Pi 4 Model B Rev 1.2
Mesa 7c81
Debian GNU/Linux 12 (bookworm) 6.1.54-rt15 #1_RT Fri Nov 17 17:02:27 AEST 2023 aarch64
I installed LinuxCNC 2.9.3 from the linuxcnc ISO image a couple of years ago, and upgraded to 2.9.4 yesterday by:
$ sudo apt update && sudo apt full-upgrade
I now have:
rick@raspi4:~$ dpkg -l | grep linux-image
ii linux-image-bcm2711-rpi-4 6.1.54-rt15-1 arm64 Linux kernel, version 6.1.54-rt15
rick@raspi4:~$ dpkg -l | grep linuxcnc
ii linuxcnc-doc-en 1:2.9.4 all motion controller for CNC machines and robots (English documentation)
ii linuxcnc-uspace 1:2.9.4 arm64 motion controller for CNC machines and robots
ii linuxcnc-uspace-dev 1:2.9.4 arm64 PC based motion controller for real-time Linux
rick@raspi4:~$ uname -a
Linux raspi4 6.1.54-rt15 #1 SMP PREEMPT_RT Fri Nov 17 17:02:27 AEST 2023 aarch64 GNU/Linux
Is there a newer RT kernel then the one from 2023 ?
If so, how can I upgrade the kernel without having to reload the entire system from the latest ISO image ?
TIA,
Rick
Mesa 7c81
Debian GNU/Linux 12 (bookworm) 6.1.54-rt15 #1_RT Fri Nov 17 17:02:27 AEST 2023 aarch64
I installed LinuxCNC 2.9.3 from the linuxcnc ISO image a couple of years ago, and upgraded to 2.9.4 yesterday by:
$ sudo apt update && sudo apt full-upgrade
I now have:
rick@raspi4:~$ dpkg -l | grep linux-image
ii linux-image-bcm2711-rpi-4 6.1.54-rt15-1 arm64 Linux kernel, version 6.1.54-rt15
rick@raspi4:~$ dpkg -l | grep linuxcnc
ii linuxcnc-doc-en 1:2.9.4 all motion controller for CNC machines and robots (English documentation)
ii linuxcnc-uspace 1:2.9.4 arm64 motion controller for CNC machines and robots
ii linuxcnc-uspace-dev 1:2.9.4 arm64 PC based motion controller for real-time Linux
rick@raspi4:~$ uname -a
Linux raspi4 6.1.54-rt15 #1 SMP PREEMPT_RT Fri Nov 17 17:02:27 AEST 2023 aarch64 GNU/Linux
Is there a newer RT kernel then the one from 2023 ?
If so, how can I upgrade the kernel without having to reload the entire system from the latest ISO image ?
TIA,
Rick
- pgf
- pgf
12 Apr 2025 14:23
Replied by pgf on topic Running an external program from a HAL pin
Running an external program from a HAL pin
Category: HAL
I spent my career trying to write reasonably efficient and fast code in firmware, device drivers and system level utilities. I'm afraid I just couldn't stomach adding a polling loop on top of the polling loop (every .2 seconds) that I discovered at the core of halui.
So I've done an end-run around the problem, which works nicely.
My mill runs from a Raspberry Pi, connected via a Mesa ethernet card. It occurred to me that if HAL could twiddle an actual gpio pin, then I could easily read that, and hook it up to action. And of course if there's one thing the RPi has, it's plenty of gpio.
So I loaded hal_gpio, and hooked up a couple of output pins:
Those pins were chosen because they were eacy immediately adjacent to another unused pin. Gpio 16 is next to 19, and 20 is next to 26. I jumpered those two pairs.
Then I wrote a short script using gpiomon to watch pins 19 and 26 for transitions.
This works perfectly.
While I'm pleased to have found this solution, it sure seems silly to have had to consume 4 gpio pins in order to do it.
Thanks for all your suggestions!
paul
So I've done an end-run around the problem, which works nicely.
My mill runs from a Raspberry Pi, connected via a Mesa ethernet card. It occurred to me that if HAL could twiddle an actual gpio pin, then I could easily read that, and hook it up to action. And of course if there's one thing the RPi has, it's plenty of gpio.
So I loaded hal_gpio, and hooked up a couple of output pins:
loadrt hal_gpio outputs=GPIO16,GPIO20
addf hal_gpio.write servo-thread
net external-estop-off \
estop-latch.0.fault-out => hal_gpio.GPIO16-out
net coolant-mist => hal_gpio.GPIO20-outThose pins were chosen because they were eacy immediately adjacent to another unused pin. Gpio 16 is next to 19, and 20 is next to 26. I jumpered those two pairs.
Then I wrote a short script using gpiomon to watch pins 19 and 26 for transitions.
#!/bin/bash
estop=19
vacuum=26
switch()
{
echo Turning $1 $2 # e.g. "Turning vacuum on"
wget -q -O /dev/null http://service:9901/event:cnc-mill-$1-$2 &
}
while read pinevent
do
echo got $pinevent # this will be "19-1", "19-0", "26-1", or "26-0"
case $pinevent in
$estop-1)
switch spindle off
;;
$vacuum-0)
switch vacuum off
;;
$vacuum-1)
switch vacuum on
;;
esac
done < <( gpiomon --line-buffered --format="%o-%e" gpiochip0 19 26)This works perfectly.
While I'm pleased to have found this solution, it sure seems silly to have had to consume 4 gpio pins in order to do it.
Thanks for all your suggestions!
paul
Time to create page: 1.000 seconds