Perseus PHP Kit

I've been experimenting with Perseus screen captures via PHP. The first tool is for offset spectrum analysis. It will load the Perseus main spectrum into the browser, shift it according to the calibration and give you a list of all peaks with the exact frequencies and dB values. It is also possible to calibrate remote receivers and analyze their spectrum.

The second main tool can read the HF spectrum data from RFSpan.

Download Perseus PHP Kit

current version: 27-Feb-2021 now updated for Windows 10

This is experimental. If you want to use it on your own PC you must install the Apache server with PHP.

Previous versions could only read XP fonts (reading out frequency from Perseus graphic). Since Nov-2014 it also works on Windows 7 (at least on my personal setup), in 2020 an improved recognition for Windows 10 has been added. It's still possible that problems occur with other systems/fonts or with other Perseus versions than 4.0, 4.1 and 5.0 The kit should at least be comatible with all versions from PHP4 to PHP7.

Calibration with the tool will be much more precise because now you can set the calibration as exact as 0,03 Hz while the Perseus software only allows 1 Hz steps. Put off the internal calibration by the Perseus software (press CalClr). For the best results go to a reference signal (like 5000 KHz), choose the most exact span, leave calibration fields empty and check the deviation. After that put in the values. Now you can start analyzing.

The scripts: Just start with the index file or access these files directly:

Please feel invited to use and adapt the PHP code to your needs. Here is what you might find helpful:

Frequency capture

In the current settings frequency will be read by font recognition. It just grabs a few distinctive pixels, some kind of OCR light. This will also work for the FM+ software which has no COM port support.

CI-V access with PHP

Unfortunately serial port access in PHP is limited and tricky. For write purposes, PHP allows access by fwrite using the ports COM1 to COM9. You can set frequency or omdes with that. pcontrol.php is preconfigured for COM7. So you can run the Perseus on COM10 and build a pair COM7-COM10 with com0com.
Reading data still requires a workaround. That's why I've written and compiled a univeral tool for serial port access that can be called by PHP via the shell extension. At least it's an approach. In case that it works, you can control the Perseus via any browser (remote or localhost with Apache running in the background). Until now, you can retrieve and set the frequency, the mode and read the S-Meter. The C++ executable is called comxs, the according Perseus fuctions can be found in pcontrol.php. Both are part of the download.
Here is a documentation that explains the commands for virtual serial port more comprehenseive than the provided pdf.

Automatic HWND detection

The whole spectrum analysis is based on the PHP imagegrabwindow function which requires the HWND Window handle (which is just a number identifying the window). Another C++ tool will detect this HWND automatically for your current Perseus window. More info here.

New: Now you can even read the frequency from the Perseus image with the readfreqbyim function in pcontrol.php.
Handewitt Perseus site main index Questions? Corrections? Ideas? Comments? PeerAxel@aol.com Disclaimer
This site is based at: radiovibrations.com/perseus/phpkit.htm