Skip to content

[codex] Fix Pi audio, DHD detection, and WiFi setup#128

Draft
matelv-x wants to merge 2 commits into
jonnerd154:masterfrom
matelv-x:codex/fix-pi3-audio-dhd-wifi
Draft

[codex] Fix Pi audio, DHD detection, and WiFi setup#128
matelv-x wants to merge 2 commits into
jonnerd154:masterfrom
matelv-x:codex/fix-pi3-audio-dhd-wifi

Conversation

@matelv-x
Copy link
Copy Markdown

@matelv-x matelv-x commented May 31, 2026

Problem observed after installing the Raspberry Pi image

On an original SG-1 gate running on a Raspberry Pi 3 B+, a fresh image installation can leave three hardware setup problems:

  1. USB audio setup can target the wrong Raspberry Pi OS boot configuration path. Older images use /boot/config.txt, while newer images use /boot/firmware/config.txt. This can prevent the onboard audio adapter from being disabled and interfere with USB audio output.
  2. The default DHD serial path points to an Adafruit ItsyBitsy device, but the original SG-1 DHD is exposed as /dev/serial/by-id/usb-SparkFun_SparkFun_Pro_Micro_HIDPC-if00. Users can therefore end up in keyboard fallback mode even though the DHD is connected.
  3. WiFi power-saving setup invokes iw with an invalid command path and syntax, while the installer does not install iw. The boot-time command should never prevent startup or make WiFi unavailable after installation.

What changed

  • use the Raspberry Pi OS boot config path that actually exists when disabling onboard audio: /boot/config.txt or /boot/firmware/config.txt
  • make ALSA card replacement portable and keep USB audio card selection working
  • use /dev/serial/by-id/usb-SparkFun_SparkFun_Pro_Micro_HIDPC-if00 as the default DHD path
  • auto-detect SparkFun Pro Micro DHD paths at runtime, while retaining legacy ItsyBitsy and /dev/ttyACM* fallbacks
  • install iw and disable only WiFi power saving with a non-blocking rc.local command; WiFi itself remains enabled

Validation

  • bash -n install/functions.sh install/install.sh install/bootstrap.sh
  • python3 -m py_compile classes/StargateMilkyWay/dialers.py classes/stargate_audio.py
  • python3 -m json.tool config/defaults-milkyway/config.json.dist
  • git diff --check
  • simulated /etc/rc.local migration from the old WiFi command
  • simulated ALSA defaults.ctl.card and defaults.pcm.card replacement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant