System Installation and Setup for Debian 13 Trixie

  • Prerequisites

Prerequisites

This set of instructions requires you to have the following:

To get the software downloaded for installing and setting up REB, you will need:

  1. Computer connected to the internet with Windows, macOS, or Linux.
  2. microSD card reader/writer on that computer.
  3. Authority on that computer to install Raspberry Pi Imager

For running REB, you will need:

# Item Qty Source Source P/N Comments
########## Case ##########
1000 Case
1001 Case 1      
########## Power ##########
1100 Power
1101 Power Switch 1 Astrodyne TDI 082M.01001.00-LS  
1102 Power Cord 1 Schurter 6009.1214  
1103 Power Outfeed Jack 1 Schurter 6600.4315  
1111 24 VDC Power Supply 1 MeanWell LRS 100-24  
1121 110 VAC power cable, #14 1      
1122 24 VDC power cable, #26        
########## Electronics Inside the Box ##########
1200 Electronics Inside the Box
1201 Raspberry Pi 5
  • 8 GB RAM
  • 128 GB microSD card
1 CanaKit PI5-8GB-STR128-C4-BLK  
1210 Mesa 7i92TH Anything I/O Ethernet card 1 Mesa US 7i92TH  
1220 Stepper Motor Drivers 8 Stepper Online DM542T  
1230 REB PCB 1      
########## Panel Mount Parts ##########
1300 Panel Mount Parts
1301          
########## Cables within the Box ##########
1400 Cables within the Box
1401 IDC26-IDC26 Ribon Cable 2      
1402 IDC6-IDC6 Ribbon Cable 16      
1403 Ethernet crossover cable 1      
########## Other ##########
1900 Other
1901 Computer Monitor (1920x1080) 1 LG 24MR400-B.AUSQ  
1901 Keyboard & Mouse 1 Kensington K72436AM  
  • Connections

Connections


Overall Connections

The overall connections for this system are as shown to the right. The items in the blue box are shipped as the REB system.

The boxes in gray and the associated cabling are optional.

 

Ethernet Crossover Cable

The wiring configuration for a 100Mbit Ethernet crossover cable is shown to the right.

Pins 4, 5, 7, & 8 still need to be wired to make this cable work as expected.

There is no benefit to using a gigabit crossover cable.

  • Instructions

Instructions

Part 1 - Configure the Hardware

1.1 DM542T Drivers


DM542T Driver

Configure the DM542T driver:

  1. Set the voltage on the 5V/24V switch to 5V.
  2. Set the DIP switches as shown in the table below, using the values in the highlighted rows.
########## SW1-3 ##########
Peak Current RMS Current SW1 SW2 SW3 Default Setting
Axes Motor
########## 1.00A Peak Current ##########
1.00A 0.71A ON ON ON    
########## 1.46A Peak Current ##########
1.46A 1.04A OFF ON ON X, Y, U, V, & W NEMA 17
########## 1.91A Peak Current ##########
1.91A 1.36A ON OFF ON    
########## 2.37A Peak Current ##########
2.37A 1.69A OFF OFF ON    
########## 2.84A Peak Current ##########
2.84A 2.03A ON ON OFF Sp0,

Sp1,
& B

NEMA 23
########## 3.31A Peak Current ##########
3.31A 2.36A OFF ON OFF    
########## 3.76A Peak Current ##########
3.76A 2.69A ON OFF OFF    
########## 4.50A Peak Current ##########
4.50A 3.20A OFF OFF OFF    
 
########## SW4 ##########
Idle Current % SW4
90% ON
50% OFF
########## SW5-8 ##########
 
Micro-steps Steps/rev on 1.8° motor SW5 SW6 SW7 SW8
16 3,200 ON ON OFF ON
32 6,400 OFF ON OFF ON
64 12,800 ON OFF OFF ON
128 25,600 OFF OFF OFF ON
  • Stepper Motors
 

1.2 Stepper Motors

Pin on GX-16/6 Connector Signal
1 A+
2 A-
3 B+
4 B-
5 LIM
6 GND

Normally open limit
switches in parallel

Stepper motors have 4 color coded wires. The colors shown in the table for the pin number correspond to the wire colors on the StepperOnline stepper motors.

The Rose Engine Butler system uses a 6 pin GX-16 (GX-16/6) connector so that limit switch functionality can be carried on the same connector.

The GX-16/6 connector can be mounted in a 3-D printed box that mounts to the back of the motor, enabling the LIM and GND cables to be connected to limit switches.

The system is designed for limit switches to use normally open circuits, so if multiple limit switches are used, they will have to be wired in parallel as shown in the picture to the right.

  • Build the Boot Drive for LinuxCNC

Part 2 - Build the Boot Drive for LinuxCNC

There are several distinct paths for setting up LinuxCNC on REB. You may have access to a system that is already completely set up. Or you may install a pre-configured REB installation onto an SD card. This document currently focus on the most bare option which begins with a standard LinuxCNC image and then customizes it for REB.

  • Get the Raspberry Pi Imager

2.1 Get the Raspberry Pi Imager

Download and install the latest Raspberry Pi Imager (version 2.0.1 or later). This is available at

The Raspberry Pi Imager is used to create the boot disk for the Raspberry Pi using the image downloaded in the next step.

  • Download the LinuxCNC image file

2.2 Download the LinuxCNC Image File

Download this file

This is possibly not the same as the one available at http://linuxcnc.org/downloads.

Be sure to get the one for the Raspberry Pi 5. It is probably not the 1st one on the list.

KEY NOTE: When the system gets upgraded in a later step, it will upgrade the LinuxCNC to the latest version.

  • Create the boot disk for the Raspberry Pi

2.3 Create the Boot Disk for the Raspberry Pi

Use the Raspberry Pi Imager downloaded onto the computer from step 1 above.

  1. Insert the microSD card into the computer, and ensure the computer sees it. The card will be completely overwritten. A 16G card is the smallest acceptable. Larger is desirable.
  2. Start the Raspberry Pi Imager. For the settings, use:
Device Raspberry Pi 5
OS Use custom (the bottom selection). Select the file you just downloaded in the prior step.
Storage This is for the microSD card you just added in step a, above.

Be sure to not select your computer’s main hard drive.

Writing This will show a summary.
  1. Click WRITE

An alternative is to use usbimager to copy an existing SD card.

  • Configure Linux on the Raspberry Pi

Part 3 - Configure Linux on the Raspberry Pi

A Word about Network Connections
The Raspberry Pi supports both wired and wireless Ethernet connections. For best performance, LinuxCNC prefers to have a direct wired Ethernet connection to the Mesa CNC card. Once the system is setup, the Raspberry Pi may certainly be operated without any wireless network connections. While setting up REB we assume that you connect the wired Ethernet of the Raspberry Pi to a live connection. We use this to set up the system to the point where we can switch the wired connection to access the Mesa card directly. This point is clearly delineated in the setup scripts with decisions described.

3.1 Start the Raspberry Pi

Install the microSD card into the Raspberry Pi and start the Raspberry Pi. When presented with the boot-up screen, continue.

3.2 Set System Defaults

(Note: The modern Trixie install will start the first-boot-wizard automatically)
After the system starts, a screen will popup. Before doing anything else, open a terminal emulator, and enter this command:

sudo passwd rpi-first-boot-wizard

Set the password to something simple like your name. You may not need this, but if the screen locks before everything is changed over to the new username, you may need this.

In the pop-up window which came at start-up, select the values as outlined below:

Country United States
Language American English
Timezone (whatever you wish)
Use English Language             Use US keyboard

Click Next, and then enter this information

Username reuben
Password (your password of choice)
Confirm Password (your password of choice)

Click Next.

Make no changes on that page. Click Next.

Select the WiFi to use, and enter your WiFi password. Click Next.

Click Next to take the option to update the software.

Click Launch. The system will reboot at the end.

3.3 Set Wired Network Connection & Test Network Connections

Open a terminal emulator, and enter this command (it is a single command line).

nmcli con add type ethernet con-name 'Wired Ethernet' ipv4.method manual ipv4.address 192.168.1.120/24

Test that everything works.

3.3.1 Test 1
Open a web browser and ensure you can open some web page, e.g., Google.com. If the wired connection is set up incorrectly, this will not work.

Close the web browser.

3.3.2 Test 2
Open a terminal emulator, and ping the Mesa 7i92TH FPGA board by entering this command:

ping 192.168.1.121

Close the terminal emulator.

3.4 Set Rest of System Options

Open a terminal emulator, and enter this command:

sudo raspi-config

Select

1 System Options
S4 Hostname
Enter roseenginebutler
S6 Auto Login
Select Yes for the question, “Would you like to automatically login to the console?”
Select OK
Select OK for the question, “Would you like to automatically login to the desktop?”
Select OK

Select

2 Display Options
D2 Screen Blanking
Select No for the question, “Would you like to enable screen blanking?”
Select OK

Select

Finish

For the question, “Would you like to reboot now?”, select Yes.

3.5 Download the Files Needed

Open a terminal session, and enter these commands:

mkdir linuxcnc
cd linuxcnc
mkdir configs
cd configs
git clone https://github.com/RoseEngineButler/RoseEngineButler

Once the files have been downloaded, they will be in

/home/reuben/linuxcnc/configs/RoseEngineButler

In the terminal session, enter these commands (be sure to add the period at the end of the second command):

cd /home/reuben
sudo cp /home/reuben/linuxcnc/configs/RoseEngineButler/.axisrc .

3.6 Clean Up the Desktop

Right-click on the desktop. Select Desktop Settings …

Select the Desktop Icons tab
Set the icon size to 100
Select font size, and set it to 18
Select the File/Launcher Icons tab
Deselect all the default icons.
  • Setup LinuxCNCi

Part 4 - Setup LinuxCNC

4.1 Run the Automated Install

Ensure the Mesa 7i92TH board is

  1. powered on
  2. connected via Ethernet to the Raspberry Pi
    1. via an Ethernet switch or
    2. via an Ethernet crossover cable

Open a terminal emulator, and enter these commands:

cd /home/reuben/linuxcnc/configs/RoseEngineButler/REB_Setup
sudo bash REB_Install_Trixie.sh

Note: If the Mesa card has a different IP address than 192.168.1.121, replace the value used in this command with the one on your card.

cd /usr/lib/firmware/hm2/hostmot2
mesaflash --device 7i92t --addr 192.168.1.121 --write 7i92t_REB.bin --reload

4.2 Set the Icon on the Desktop

Right-click on the desktop and select Create Launcher…. For the entries, enter:

Name Rose Engine Butler
Comment Desktop launcher for Rose Engine Butler
Command linuxcnc /home/reuben/linuxcnc/configs/RoseEngineButler/REB.ini
Working Directory /home/reuben/linuxcnc/configs/RoseEngineButler
Icon

Click the No icon button, then
Select icon from image files
Select /home/reuben/linuxcnc/configs/RoseEngineButler/REB_Setup/Images/ReubenHead.png

Click Create.

Note: I was not able to make the pre-defined launchers executable.

4.3 Set the Wallpaper

Open the file manager. From the folder

/home/reuben/linuxcnc/configs/RoseEngineButler/REB_Setup/Images

right-click on

REBWallpaper.png

then select Set as wallpaper.

4.4 Set Rose Engine Butler to Auto-start When Starting up the System

This is an optional step.

Click on Applications, then Settings, and then Session and Startup.

Click on the Application Autostart tab.

Click +Add.

For the entries, enter:

Name Rose Engine Butler
Description  
Command linuxcnc /home/reuben/linuxcnc/configs/REB/REB.ini
Trigger on login

Click OK

4.5 Install Antivirus Application

This is a good practice in case the user decides to keep the system connected to their Wi-Fi.

4.5.1 Install the ClamAV Application

This should have been done by the Install script. If not, these are the steps.

Open a terminal emulator, and enter these commands:

sudo apt install clamav

cd /home/reuben
mkdir ClamAv
cd ClamAv
mkdir SuspiciousFiles

sudo freshclam

4.5.2 Schedule the ClamAV Application to Run at Startup

Click on Applications, then Settings, and then Session and Startup.

Click on the Application Autostart tab.

Click +Add.

For the entries, enter:

Name ClamAV
Description Antivirus software
Command sudo clamscan -r -i / --move=/home/reuben/ClamAV/SuspiciousFiles --log=/home/reuben/ClamAV/ScanLog.txt
Trigger on login

Click OK

4.5.3 Schedule the ClamAV Application to Run Weekly

This will schedule the virus scan to run each Sunday morning at 03:00. This will take place if the user does not shutdown and leaves the system running.

Open a terminal emulator, and enter this command:

crontab -e

Choose option 1. On the bottom of the file, enter these 2 lines (each is a single line):

0 1 * * 1 sudo freshclam
0 3 * * 1 sudo clamscan -r -i / --move=/home/reuben/ClamAV/SuspiciousFiles --log=/home/reuben/ClamAV/ScanLog.txt

Click Cntrl-O to save the file, and then Cntrl-X to exit.

4.6 Install menulibre and Configure the Menus

MenuLibre is a graphical editor for your desktop's application menu — it lets you control what shows up when you click the "Applications" or "Start" menu, and how.

4.6.1 Install the menulibre Application

This program is used to manipulate the XFCE Applications menu

Open a terminal emulator, and enter this command:

sudo apt install menulibre

4.6.2 Run the menulibre Application

Open a terminal emulator, and enter this command (no sudo is required):

menulibre

4.6.3 Add a Rose Engine Butler Menu

  1. Click the large + on the upper left part of the screen.
  2. Select Add Directory.
  3. Change “New Directory” to “Rose Engine Butler”
  4. Change “A small descriptive blurb about this directory” to “This is for the Rose Engine Butler programs.”
  5. Click on the folder icon, and replace it with ReubenHead.png from the directory, /home/reuben/linuxcnc/configs/RoseEngineButler/REB_Setup/Images/.
  6. Click on the save button (the one beside the large + on the upper left part of the screen).
  7. Using the Up arrow at the bottom of the screen on the left, and move this menu to be above Terminal Emulator.

4.6.4 Add the Rose Engine Butler Update Program

  1. Click the large + on the upper left part of the screen.
  2. Select Add Launcher.
  3. Change “New Launcher” to “Update Rose Engine Butler”
  4. Change “A small descriptive blurb about this application” to “Run this when notified to do so”.
  5. Click on the icon, and replace it with an up arrow icon.
  6. For Command, enter “bash /home/reuben/linuxcnc/configs/REB_Update.sh”
  7. For Working Directory, enter “/home/reuben/linuxcnc/configs/RoseEngineButler/”
  8. Under Options, enable these two options:
    1. Run in terminal
    2. Use startup notification
  9. In the Categories box, delete X-Xfce-Toplevel.
  10. Click on the save button (the one beside the large + on the upper left part of the screen).

4.6.5 Add the Rose Engine Butler Program

  1. Click the large + on the upper left part of the screen.
  2. Select Add Launcher.
  3. Change “New Launcher” to “Rose Engine Butler”
  4. Change “A small descriptive blurb about this application” to “Desktop launcher for the Rose Engine Butler”
  5. Click on the icon, and replace it with ReubenHead.png from the directory, /home/reuben/linuxcnc/configs/RoseEngineButler/REB_Setup/Images/.
  6. For Command, enter “linuxcnc /home/reuben/linuxcnc/configs/RoseEngineButler/REB.ini”
  7. For Working Directory, enter “/home/reuben/linuxcnc/configs/RoseEngineButler/”
  8. In the Categories box, delete X-Xfce-Toplevel.
  9. Click on the save button (the one beside the large + on the upper left part of the screen).

4.6.6 Hide Some Unnecessary Programs & Program Menus

  1. For each of these applications, under Options, enable the option Hide from menus, saving each after the change
    1. Games
    2. Mail Reader
    3. Office
    4. Science
  2. Click on the save button (the one beside the large + on the upper left part of the screen).

The resulting MenuLibre screen should look like the picture below:


MenuLibre Screen

Which results in the Applications menu shown below.


Applications Menu

4.7 Install galculator

galculator is a graphical calculator application which will be useful for the user.

Open a terminal emulator, and enter this command:

sudo apt install galculator

  • Install Development System Applications

Part 5 - Install Development System Applications

Install these applications on a development system. They are not needed on production systems, but can be installed if desired.

5.1 Glade

Glade is used to develop the display panels used with GladeVCP.

Open a terminal emulator, and enter these commands:

sudo apt install glade

5.2 xfce4-screenschooter

xfce4-screenshooter is used for screen captures. It is quite useful for documentation purposes.

Open a terminal emulator, and enter these commands:

sudo apt install xfce4-screenshooter

To use it, press the PrtScn button, and then follow the prompts. The images are stored in the Pictures directory.

5.3 GIMP

The GNU Image Manipulation Program is useful for editing image files.

Open a terminal emulator, and enter these commands:

sudo apt install gimp

5.4 Claude Code

Claude is Anthropic’s powerful AI tool that is quite good at writing things like G-code as well as fixing Linux scripts. You can access Claude or ChatGPT from a web page, but a native install lets you use Claude Code to access files directly on the machine. In case this is interesting, here are the basic instructions.

Open a terminal emulator, and enter these commands. As some of them take a while, you might want to enter them separately.

# Install Node 20 if you don't have it (Node 18+ required)
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs

# Set up a user-level npm prefix (avoids sudo/permission mess)
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

# Install Claude Code
npm install -g @anthropic-ai/claude-code

claude --version

A note about running Claude Code on the LinuxCNC Pi
Realtime LinuxCNC on Pi is already CPU-hungry. If this is your active CNC controller, I'd think twice before running heavy Claude sessions on it while the machine is cutting — you want that realtime headroom preserved. Editing G-code between cuts is fine; agentic work during a job, less so. We suggest you exit Claude with /exit before cutting.

5.5 Chromium

To install the Chromium browser:

echo "deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware" | sudo tee /etc/apt/sources.list.d/debian.list
sudo apt update
sudo apt install chromium -y

  • Other Notes

Part 6 - Other Notes

6.1 To SSH In

To connect to the machine using SSH, use the command below. Replace 192.168.1.12 with the IP address of your Raspberry Pi.

ssh reuben@192.168.1.12 (use the IP address of your Pi)

6.2 To Unzip

sudo apt update
sudo apt install file-roller

  • Needed Notes?

Part 7 - Needed Notes?

 
Not sure if these items are needed.
 

7.1 WiFi

LinuxCNC takes over the Ethernet port when it runs, so it’s best to use a crossover cable and not rely on this for external access. Bring up WiFi if you want to have an Ethernet connecton. It took me a bit of effort to get WiFi working using 6.12.11.

sudo apt install network-manager
sudo nmcli connection add type wifi ifname wlan0 con-name MyWiFi ssid "yellowcat"
sudo nmcli connection modify MyWiFi wifi-sec.key-mgmt wpa-psk
sudo nmcli connection modify MyWiFi wifi-sec.psk "home4349"
sudo nmcli connection up MyWiFi
nmcli device status
nmcli connection modify wlan0 ipv4.route-metric 100
nmcli connection modify eth0 ipv4.route-metric 200
sudo nmcli device set wlan0 managed yes
sudo systemctl restart NetworkManager
sudo systemctl status wpa_supplicant
sudo rm /run/wpa_supplicant/wlan0
sudo nmcli device set wlan0 managed yes
sudo systemctl restart NetworkManager

########## Standard Footer for all pages ##########
 

About the Rose Engine Butler System
Terms of Use

eMail comments to
ColvinTools @ Gmail [period] com -> mailto:ColvinTools [snail] Gmail [period] com