REB_Change_Network.sh - Mesa Card and Network Setup

Rose Engine Butler’s Key Programs: Overview · REB_Launch.sh · REB_Settings.sh · REB_Backup.sh · REB_Update.sh · REB_Change_Network.sh · REB_Install_Debian_13_Trixie.sh


Purpose

REB_Change_Network.sh sets up the private wired network between the Raspberry Pi and the Mesa 7i92 card(s) for the two-box hardware:

Device Address
Base box Mesa card 10.10.10.10
Expansion box Mesa card 10.10.10.11
Raspberry Pi wired connection ("Wired Ethernet") 10.10.10.100 - no gateway or DNS (the Pi's internet stays on Wi-Fi)

It can also write the Rose Engine Butler firmware to a new card, put the Raspberry Pi back on the old 192.168.1.120 address, and check which cards answer. See Mesa 7i92 for the cards and their W5/W6 jumpers.

How it is run

From a terminal (there is no desktop icon). Close LinuxCNC first - the script stops if it's running.

/home/reuben/linuxcnc/configs/RoseEngineButler/REB_Change_Network.sh [choice] [--dry-run] [--no-shutdown]

With no choice it shows a menu. It asks before every change and asks for the reuben password when it needs sudo.

Parameters

Parameter What it does
base Sets up the connected card as the base card (10.10.10.10): checks it answers at its factory address, 192.168.1.121; offers to write the firmware; stores the new address on the card; moves the Pi to 10.10.10.100; then walks through shutting down and moving the card's jumpers.
expansion The same for the expansion card (10.10.10.11).
pi Moves only the Pi's wired connection to 10.10.10.100, then reports which cards answer. Use it if the Pi restarted part way through, or when the cards are already set up.
back Puts the Pi's wired connection back on 192.168.1.120 - to reach a card at its factory address, or to run software from before the two-box design.
check Changes nothing. Shows the Pi's wired address and which cards answer. Start here for any card-connection problem.
--dry-run Shows every command without running any of them (cards are assumed to answer).
--no-shutdown Used by the installer: stops once the address is stored and the Pi moved, without the shutdown and jumper steps (the installer gives those at its end).

Menu: 1 = base, 2 = expansion, 3 = pi, 4 = back, 5 = check.

Setting up a card (base or expansion)

  1. Run it with the Pi still on 192.168.1.x and only the card being set up connected - two cards at the factory address would clash. W5/W6 at the factory setting, card powered on.
  2. It checks the card answers at 192.168.1.121. If not, it stops and changes nothing.
  3. Write the firmware? - yes for a new card.
  4. Store the new address on the card? - yes.
  5. Move the Pi to 10.10.10.100? - yes.
  6. Shut the Pi down? - yes, then: switch the machine off, move the card's W5/W6 jumpers to the setting the 7i92 manual calls EEPROM, reconnect any card that was unplugged, and switch on.
  7. Once the Pi has started, run REB_Change_Network.sh check - the card should answer at its new address.

The whole machine is switched off for the jumper change because the Pi and card share one 5V supply: switching the card on while the Pi is running restarts the Pi without a proper shutdown.

Programs it calls

Program What for
mesaflash --readhmid (does a card answer?), --write ... --reload (firmware), --set ip= (store the address)
nmcli Changing, starting and deleting the Pi's "Wired Ethernet" connection
ip, pgrep Reading the Pi's address; checking LinuxCNC isn't running
sudo poweroff Shutting down for the jumper change (only when you answer yes)

Files it references

  • REB_Setup/MesaCard/7i92t_REB.bin - the firmware written to a new card

What it changes

It creates no files. It changes:

  • The Mesa card's stored address (in the card's EEPROM), and its firmware if asked.
  • The Pi's "Wired Ethernet" network connection (stored by NetworkManager, so it survives a restart), with autoconnect priority 10 so the Pi uses that one. If the Pi has spare connections with the same name (from running the installer more than once), it offers to delete them.

Notes for support

  • Undo a card: put its W5/W6 jumpers back to the factory setting and it answers at 192.168.1.121 again. Undo the Pi with back.
  • Which address the software uses: at each launch, REB_Generate_Local_Ini.py uses 192.168.1.121 for the base card while the Pi is on 192.168.1.x, and 10.10.10.10 otherwise - so a machine works before and after the move. Expansion Box - Connected needs the 10.10.10.x network; with it ticked on 192.168.1.x, Rose Engine Butler refuses to start and says why.
  • "No card answered at 192.168.1.121": check the cable, the card's power, that W5/W6 are at the factory setting, and that the Pi is on 192.168.1.x (check).
  • "Changing the 'Wired Ethernet' connection failed": list the connections with nmcli con show.
  • Try --dry-run first when unsure - it shows exactly what would be run.

Related pages

########## 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