Troubleshooting

Solutions for common issues with the web UI, GPIO, USB HID, and networking.

Common Issues

The web UI won't load

  1. Check the service is running: sudo systemctl status morse-pi
  2. Check the logs: sudo journalctl -u morse-pi -n 50
  3. Make sure you're using the right IP and port (default 5000)
  4. If ufw is active, verify port 5000 is open: sudo ufw status

Updated code, but the UI still looks old

  1. Hard-refresh your browser (Ctrl+Shift+R) or clear cache.
  2. For Rust installs, run the updater again: curl -sSL https://raw.githubusercontent.com/Nerd-or-Geek/Morse-Pi/main/update-rust.sh | sudo bash
  3. If you updated manually, rebuild and sync templates:
    cd /opt/morse-pi/morse-translator-rust
    cargo build --release --features gpio
    sudo cp target/release/morse-pi /opt/morse-pi/morse-translator/morse-pi
    sudo mkdir -p /opt/morse-pi/morse-translator/templates
    sudo cp -r templates/. /opt/morse-pi/morse-translator/templates/
    sudo systemctl restart morse-pi
  4. Open the dedicated radio page directly to verify route updates: http://<pi-ip>:5000/network (legacy /radio also works).

Service won't start

  1. Check logs: sudo journalctl -u morse-pi -n 50
  2. Try running manually:
    • Rust: cd /opt/morse-pi/morse-translator && ./morse-pi
    • Python: cd /opt/morse-pi/morse-translator && python3 app.py
  3. Check file permissions: ls -la /opt/morse-pi/morse-translator/
  4. Re-run the installer to fix the service configuration

Rust Backend

Build fails with "out of memory"

Pi Zero has only 512 MB RAM. The Rust compiler can exhaust memory during linking.

Build fails with "linker cc not found"

Build fails with "pigpiod_if2.h not found"

Rust binary crashes on startup

Cargo / rustup not found after install

Settings aren't saving

GPIO Errors

GPIO indicator shows red / "GPIO unavailable"

No sound from speaker

Key presses not detected

Connection Errors

"Connection to Pi lost" message

This appears when the browser can't reach the Pi's web server. Common causes:

ℹ Auto-reconnect
The UI will automatically reconnect when the Pi becomes reachable again. The connection indicator dot in the header turns green when connected and red when disconnected.

Slow or laggy UI

USB HID Errors

"USB HID not available" in KB tab

g_ether blocking HID (most common)

The Pi Zero has only one USB controller. If g_ether (USB Ethernet for SSH-over-USB) loads before the HID gadget, it monopolises the port. Run lsmod | grep g_ether to check.

"Permission denied" writing to /dev/hidg0

Wrong characters being typed

See the USB HID Keyboard page for more setup details and manual configuration steps.

Network Errors

No peers discovered

Messages not arriving