Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

WinSDR on Raspberry Pi

Run WinSDR seismograph software on a Raspberry Pi 4 using Box86 (x86 emulator) and Wine (Windows compatibility layer).

Hardware Requirements

  • Raspberry Pi 4 (tested on Model B Rev 1.2, 4GB RAM)
  • OS: Raspbian GNU/Linux 13 (trixie), 32-bit userspace (armhf), 64-bit kernel (aarch64)
  • Digitizer: PSN-ADC-SERIAL Version III (USB) or compatible WinSDR hardware
  • USB-to-serial adapter (FTDI-based recommended)

Software Stack

WinSDR (Windows x86 app)
    └── Wine 9.0 (Windows API layer, x86 build)
            └── Box86 0.3.9 (x86→ARM emulator, via binfmt)
                    └── Raspberry Pi OS (armhf)

Important version notes:

  • Wine 9.0 (Kron4ek portable build) is required. Wine 11.x does not work:
    • Wine 11.4 (Pi-Apps): wineserver crashes — Box86 missing __epoll_pwait2_time64@GLIBC_2.35
    • Wine 11.6 (Kron4ek): deadlocks during wineboot bootstrap on ARM
  • Wine Mono is auto-downloaded by Wine on first run (do not pre-install)
  • Wine Gecko 2.47.4 should be pre-installed

Automated Installation

curl -fsSL https://raw.githubusercontent.com/psfleming/WinSDRPi4/main/install.sh | bash

Or clone and run:

git clone https://github.com/psfleming/WinSDRPi4.git
cd WinSDRPi4
chmod +x install.sh
./install.sh

The installer will prompt you to complete the WinSDR install wizard via VNC/desktop at the end.

Manual Installation

1. Install Box86

wget -qO- https://ryanfortner.github.io/box86-debs/KEY.gpg | sudo gpg --dearmor -o /usr/share/keyrings/box86-debs-archive-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/box86-debs-archive-keyring.gpg] https://ryanfortner.github.io/box86-debs/debian ./' | sudo tee /etc/apt/sources.list.d/box86.list
sudo apt update
sudo apt install -y box86-rpi4arm64

Verify: box86 --version

2. Install Wine 9.0 (Kron4ek portable build)

sudo wget -q https://github.com/Kron4ek/Wine-Builds/releases/download/9.0/wine-9.0-x86.tar.xz \
    -O /tmp/wine-9.0-x86.tar.xz
sudo tar -xf /tmp/wine-9.0-x86.tar.xz -C /opt
sudo mv /opt/wine-9.0-x86 /opt/wine-9.0
sudo rm /tmp/wine-9.0-x86.tar.xz

3. Install Wine Gecko

sudo mkdir -p /opt/wine-9.0/share/wine/gecko
sudo wget -q 'https://dl.winehq.org/wine/wine-gecko/2.47.4/wine-gecko-2.47.4-x86.tar.xz' \
    -O /tmp/wine-gecko.tar.xz
sudo tar -xf /tmp/wine-gecko.tar.xz -C /opt/wine-9.0/share/wine/gecko
sudo rm /tmp/wine-gecko.tar.xz

4. Patch wine.inf (disable file associations)

sudo sed -i 's/winemenubuilder.exe -a -r/winemenubuilder.exe -r/' \
    /opt/wine-9.0/share/wine/wine.inf

5. Create Wine wrapper and command symlinks

sudo tee /usr/local/bin/wine > /dev/null << 'EOF'
#!/bin/bash
BOX86_NOBANNER=1 WINEDEBUG=err /opt/wine-9.0/bin/wine "$@"
EOF
sudo chmod +x /usr/local/bin/wine

sudo ln -sf /opt/wine-9.0/bin/wineboot   /usr/local/bin/wineboot
sudo ln -sf /opt/wine-9.0/bin/wineserver /usr/local/bin/wineserver
sudo ln -sf /opt/wine-9.0/bin/winecfg    /usr/local/bin/winecfg

6. Fix X11 authorization (hostname mismatch workaround)

Raspbian may store the X11 cookie under hostname raspberrypi even if you've renamed the machine. Add the cookie for the current hostname:

COOKIE=$(xauth list | grep 'unix:0' | awk '{print $3}')
HOSTNAME=$(hostname)
xauth add ${HOSTNAME}/unix:0 MIT-MAGIC-COOKIE-1 ${COOKIE}

Also allow local X11 connections:

xhost +local:

7. Initialize Wine prefix

Run from the desktop terminal (with DISPLAY=:0):

WINEARCH=win32 BOX86_NOBANNER=1 wineboot -u

This runs in the background and may take 5–15 minutes. Wine will show a dialog to download Wine Mono — click OK and let it download. This installs .NET support.

8. Download and install WinSDR

mkdir -p ~/winsdr
wget -q http://www.seismicnet.com/software/winsdr478b6_32bit.exe -O ~/winsdr/winsdr478b6_32bit.exe

Run the installer from the desktop terminal:

wine ~/winsdr/winsdr478b6_32bit.exe

Click through the install wizard: Next → I Agree → Install → Finish. Default install path C:\WinSDR is recommended.

9. Apply WinSDR compatibility fixes

# Windows XP compatibility (fixes some dialog issues)
DISPLAY=:0 XAUTHORITY=~/.Xauthority wine reg add \
    'HKEY_CURRENT_USER\Software\Wine\AppDefaults\winsdr.exe' \
    /v Version /t REG_SZ /d 'winxp' /f

# comctl32 v5 manifest (prevents Setup menu crash)
cat > ~/.wine/drive_c/WinSDR/winsdr.exe.manifest << 'EOF'
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity version="1.0.0.0" processorArchitecture="X86"
    name="winsdr" type="win32"/>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls"
        version="5.82.0.0" processorArchitecture="X86"
        publicKeyToken="6595b64144ccf1df" language="*"/>
    </dependentAssembly>
  </dependency>
</assembly>
EOF

10. Set up serial port (USB digitizer)

Plug in your USB-to-serial adapter, then:

# Map USB serial to Wine's COM1
ln -sf /dev/ttyUSB0 ~/.wine/dosdevices/com1

# Add user to dialout group for permanent serial access
sudo usermod -a -G dialout $USER

# Apply group change without rebooting
newgrp dialout

WinSDR's winsdr.ini should already have CommPort=1 and CommSpeed=38400. Verify in ~/.wine/drive_c/WinSDR/winsdr.ini.

Running WinSDR

From the desktop terminal (via VNC or directly):

xhost +local:
BOX86_NOBANNER=1 WINEDEBUG=err /opt/wine-9.0/bin/wine ~/.wine/drive_c/WinSDR/winsdr.exe

Autostart on Boot

Create a desktop autostart entry:

mkdir -p ~/.config/autostart
cat > ~/.config/autostart/winsdr.desktop << 'EOF'
[Desktop Entry]
Type=Application
Name=WinSDR
Exec=bash -c 'xhost +local:; BOX86_NOBANNER=1 WINEDEBUG=err /opt/wine-9.0/bin/wine $HOME/.wine/drive_c/WinSDR/winsdr.exe'
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
EOF

WinQuake

WinQuake should work on the same Box86 + Wine 9.0 stack used for WinSDR. Full installation instructions will be added once tested on this hardware.

Checking Data

WinSDR logs to ~/.wine/drive_c/WinSDR/WinSDR.log and records data to ~/.wine/drive_c/WinSDR/data/.

cat ~/.wine/drive_c/WinSDR/WinSDR.log
ls -lt ~/.wine/drive_c/WinSDR/data/ | head -10

Troubleshooting

Problem Fix
Authorization required X11 error Run xhost +local: first; check xauth hostname with xauth list
WinSDR not finding serial port Check ls /dev/ttyUSB*; re-run ln -sf /dev/ttyUSB0 ~/.wine/dosdevices/com1
/dev/ttyUSB0 permission denied sudo usermod -a -G dialout $USER then log out/in
Wine processes stuck/hung `kill -9 $(ps aux
Setup menu crashes Ensure winsdr.exe.manifest exists and wineboot -u has been run
Wine Mono popup Click OK and let it download — required for .NET support

Hardware Config Reference (PSN-ADC-SERIAL Version III)

Setting Value
Baud rate 38400 (SW1=Off, SW2=On — default)
COM port COM1 → /dev/ttyUSB0
AdBoardType 4
Sample rate 50 SPS (default, configurable)
Channels 1–8 (single-ended, ±5V or ±10V jumper selectable)

About

Run WinSDR on a Raspberry Pi 4

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages