Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpitx appends to wrong config.txt file, causing broken transmissions when running scripts #337

Open
Ben-Does-Arcade opened this issue Oct 9, 2024 · 0 comments

Comments

@Ben-Does-Arcade
Copy link

Ben-Does-Arcade commented Oct 9, 2024

I'm using a Raspberry Pi 3A+ with rpitx.

Since the latest releases of the Raspberry Pi firmware, the config.txt file has been relocated to a different directory. The problem is that rpitx is still using the legacy config.txt file in newer installations, resulting in the rpitx-required settings being appended to the original file, ironically along with the "do not edit" notice:

/boot/config.txt

DO NOT EDIT THIS FILE

The file you are looking for has moved to /boot/firmware/config.txt
gpu_freq=250
force_turbo=1

As stated here, the file is now located in the firmware directory. The original config file is only there in the boot directory for backwards compatibility with older scripts, exactly what has happened here.

Result of these settings not being applied

Some things I've observed with missing configuration:

  • ./sendook rarely works correctly. Often, transmissions are cut off after only a few duty cycles, or don't transmit at all
  • ./easytest.sh carrier frequency and other tests broadcast an extremely weak signal that can barely be detected, but works correctly after reconfiguration
  • ./rpitx not working at all, no matter what

Fixing this issue

In install.sh, it appears the logic to check for this is present, but doesn't work:

if [ "$CONT" = "y" ]; then
  echo "Set GPU to 250Mhz in order to be stable"
   LINE='gpu_freq=250'
   if [ ! -f /boot/firmware/config.txt ]; then
   echo "Raspbian 11 or below detected using /boot/config.txt"
   FILE='/boot/config.txt'
   else
   echo "Raspbian 12 detected using /boot/firmware/config.txt"
   FILE='/boot/firmware/config.txt'
   fi
   grep -qF "$LINE" "$FILE"  || echo "$LINE" | sudo tee --append "$FILE"
   #PI4
   LINE='force_turbo=1'
   grep -qF "$LINE" "$FILE"  || echo "$LINE" | sudo tee --append "$FILE"
   echo "Installation completed !"
else
  echo "Warning : Rpitx should be instable and stop from transmitting !";
fi

When manually appending the same two settings as above in the correct /boot/firmware/config.txt file, everything works correctly and I've had absolutely no issues with getting any transmission scripts to work! 👍

This should be fixed such that new users will not have to spend hours to diagnose what was really a slightly broken installer script.

Edit: Seems like #329 did not solve the issue for the installation on my CLI-only installation of Raspberry Pi OS.

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

No branches or pull requests

1 participant