Skip to content

Replacement for the official RetroFlag GPiCASE2 script.

License

Notifications You must be signed in to change notification settings

Cacodaimon/CacosGPiCASE2Script

Repository files navigation

CacosGPiCASE2Script

A replacement for the official GPiCase2-Script, for use with Recalbox 8.0.x only. Please do not forget to install the Display Patch

I had too much trouble with the original script. Therefore, I wrote this more robust and simpler to use/install replacement. It still performs a full reboot after connecting to or disconnecting from the docking station.

Tested with Recalbox 8.0.2 and a Raspberry PI CM4104032 (4GB RAM, 32GB Flash, WLAN + BT).

Installation instructions

  1. Connect your GPiCase2 to your Wi-Fi
  2. Login via SSH (The default password is recalboxroot)
ssh root@recalbox
  1. Download the script as ZIP container via wget:
wget -O /tmp/CacosGPiCASE2_Script.zip https://github.com/Cacodaimon/CacosGPiCASE2Script/blob/main/CacosGPiCASE2_Script.zip?raw=true
  1. Install the script using the self installation function
python /tmp/CacosGPiCASE2_Script.zip --setup
  1. Reboot your GPiCase2
shutdown -r now

Other useful commands

Install display config files

This script comes with the both modified Display Patch files (config_lcd.txt and config_hdmi.txt) from RetroFlag, you can install them using the following command:

python /tmp/CacosGPiCASE2_Script.zip --create_config_files

Use the --force option for overwriting exiting files.

python /tmp/CacosGPiCASE2_Script.zip --create_config_files --force

Testing without installation

Once downloaded via wget you can test the script without installation, you might download it again after reboot. For a dry run omit the --reboot flag.

python /tmp/CacosGPiCASE2_Script.zip --wait_for_changes --reboot

Force HDMI or LCD

python /tmp/CacosGPiCASE2_Script.zip --set_lcd|--set_hdmi

Logging

You should find all infos in the recalbox's syslog.

tail -f /var/log/messages
Jan  1 02:00:15 RECALBOX user.info INFO     copy_config_files Check all config files already exist.
Jan  1 02:00:15 RECALBOX user.info INFO     safe_shutdown Configuring GPIO pin "26" and "27".
Jan  1 02:00:15 RECALBOX user.info INFO     safe_shutdown GPIO pin "26" and 27 are configured now, waiting for "26" fall.
Jan  1 02:00:16 RECALBOX user.info INFO     switch_display Currently connected to LCD, pin "18" is LOW.
Jan  1 02:00:16 RECALBOX user.info INFO     switch_display Waiting for HDMI connect now.

Uninstall

  1. Login via SSH (The default passwort is recalboxroot)
ssh root@recalbox
  1. Delete the both files:
rm /etc/init.d/S99CacosGPiCase2Script
rm /opt/cacos_gpicase2_script.zip
  1. Reboot your GPiCase2
shutdown -r now

Known issues

Here are some other issues I ran into during my GPiCase2 installation nightmare.

The LCD is blank

You must hear two clicking sounds, one for each connector row, when placing the CM4 in the GPiCase2. My CM4 booted, was reachable via WiFi, even the HDMI out worked, but the LCD kept blank until I mounted the CM4 correctly.

How can I flash a CM4 with eMMC memory?

You can use the build in micro USB port (above the GPiCase2's CM4 slot) to mount the eMMC memory as a storage!

Follow these instructions How to flash Raspberry Pi OS onto the Compute Module 4 eMMC with usbboot, an IO Board is not needed, go directly to section "Using usbboot to mount the eMMC storage". You will find a recent version of Recalbox when using the Raspberry Pi Imager in the Emulation and game OS section!

You won't be able to use the microSD slot, but do not blame RetroFlag this time. A CM4 with eMMC can not use the microSD card.

I hear no sound when connected to HDMI

Please go to the settings menu and check if sound output device is HDMI:

Main menu Sound settings Output device

HDMI settings

If you have issues with your HDMI display, you might need to fiddle around with your PI's HDMI settings like hdmi_group, hdmi_mode, disable_overscan etc.. Add the settings to the recalbox-user-config.txt according the Recalbox WIKI.

About

Replacement for the official RetroFlag GPiCASE2 script.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published