AOR Plot

spectrum plotting software for AOR 8200/8600 receivers

AOR_PLOT running on a Jornada 720. More screenshots

BACKGROUND

This utility has been written as a first step in replacing my AOR CE tools, who unfortunately don't work on the Jornada 720.

The hardest part was picking a suitable language, as PocketC was now out of the game. Being my programming skills limited to some Perl and CBM BASIC 8-)=, some learning wasin the cards and I wanted to optimize the effort by choosing a low-cost tool allowing GUI support and good portability. These are the options I considered and discarded:

While considering Perl/CE and Tk as a companion, I stumbled in its original scripting layer: Tcl. This looked more like what I had in mind: very high level, flexible, portable and with its GUI scripting. I had seen it in use before (check radio software from Bob Parnass) and liked the result.

CROSS PLATFORM NOTES

AOR_PLOT has been developed as a Jornada 720 application and code still shows it, from rough workarounds for bad floating point handling to the small plotting area size.
However the incredible portability of TCL means that it should work on different platforms just changing a serial port name. That is good as most radio related software is Wintel only.
Please note that you need TCL/TK version 8.4 or later. Earlier versions will give a number of apparently inexplicable errors because of unsupported features.
Please let me know if you get it running on systems so far unlisted here.
OSTcl ver.statusnotes
WinCE 20008.4a2workingsee bug section
WinXP Home8.4.12working2.4 GHZ bug, see below
8.5.0b6working2.4 GHZ bug, see below
Debian Linux8.4.13workingwarning: Sarge stable only provides 8.3
8.5a4workingthis allows operation above 2.4GHz (see bug section, below)
Fedora Code 5 Linux8.4.13-1.1workingtks Luis Casinhas for reporting

I was surprised to see that on WinXP AOR_PLOT is much faster than on the Jornada, as I expected low speed in radio replies to be the bottleneck. This means that fine tuning of the delay parameter can yield significant differences in plotting speed.

INSTALLATION

Install Tcl/Tk on your system.
Windows CE info can be found here, including links for download (courtesy of Rainer Keuchel) and setup instructions (Yakumo Alpha page). If you can't ActiveSync, a manual installation is possible but you'll have to change manually several registry entries using a suitable editor.
Desktop Windows (XP and older) the smoothest solution is to download and install the latest version from Activestate.
Linux if you're using Linux, you don't need me telling you.

Download AOR_PLOT and save it into your directory of choice.

Set your receiver to communicate at 19200 bps from CONF menu. You can use different speeds by changing this row:
fconfigure $serial -mode "19200,n,8,2"
Not that I see why you should do that, as radio operation in remote control is already slow enough.

AOR_PLOT comes configured to work on the first serial port of a Linux device. Should you want to test on other systems, change accordingly.
#serial port
# Windows CE format "com1:"
# Windows "desktop" editions (XP and older) "COM1"
# Linux "/dev/ttyS0"
set comport "/dev/ttyS0"

CABLING
Check my old AORCE page for some info. I know some links are broken.
I'm successfully using this interface (mod.A232DBA) with the 8200, drawing power directly from the radio. So far I haven't tried to run the whole system just on their internal batteries, but it should work.
If you are working on a recent laptop chances are that you don't have a serial port. So you end up with something like:
[PC USB]---[TTL to 232 adapter]---[232 to TTL adapter]---[radio]
This is really twisted. Has anybody tried straighter alternatives like this? Please mail me if you know more.

OPERATION
Operation is pretty straightforward: just set the frequency range you want to sweep, adequate step and press "START".
Keep in mind that typical operation is around 1.5 channels/second, so be careful not to start century long sweeps.

Frequency and signal reading, with a timestamp, are returned in the scrollbox at the left (if enabled).
By changing this part in the script you can output some debugging info:
# debugging messages: 0 = disabled
set debug 1 ;

Unfortunately both 8200 and 8600 are awfully slow in getting commands and answering back. If you send a new command too short after the previous one, an error message is generated. By checking the number of error messages in the scrollbox you can fine tune this parameter in the script:
# delay between sending a command and reading the reply or issuing the following one
# optimal value can be set by enabling debug messages (set debug 1) and checking that very few "ERROR" messages
# occur, minimizing retries
set delay 160 ;

Pushing "CLEAR" will wipe the plotting area.

From the "SETUP" menu some options can be selected:

A progress bar is drawn on each sweep, crossing markers at the top of the screen, to show that something is really moving, as that is not obvious when you have multiple sweeps on the screen.

LOOPthe same range will be swept until unchecked. After unchecking, the sweep in progress will complete.
LOGwill log readings in a comma separated file in local directory. Filenames are automatically generated with a timestamp. Hopefully I'll manage to write some traffic analysis postprocessor for these files.
TXT OUTwhen unchecked sweep details are not written in the scrollbox

Sweeps will be performed in single vfo, retaining existing MODE and ATTenuator settings.

KNOWN BUGS
6-Jan-07 thanks to xBr for reporting the following: trying to plot above 2GHz causes the program to go bonkers in what looks like a string overflow.
First investigation points to a problem Tcl 8.4 has performing the expr function on large integers. To preserve calculations on WinCE devices (no good with floating points), all calculations are made in Hertz. This means 2.5 GHz looks like 2500000000 which is in fact in the region where the bug appears (see on the right).
Options for fixing:
  • adopt a workaround to the "expr" problem. I've tried a couple of things with no luck;
  • make the app detect what system is running on, limit range on WinCE and use floating point on the others;
Linux users: bug has been fixed in Tcl 8.5. Just upgrade to get around the problem. It also looks better 8-)=
Unfortunately for Windows users ActiveState 8.5.0 won't make a difference to 8.4 in this regard.
Tcl bug discussion. To test the limit frequency for your system issue the following command in Wish:
expr 0x7[string range [format %X -1] 1 end]
On all my Tcl 8.4 systems + ActiveTcl 8.5 I get a limit of 2147483647
On the Jornada, in loop mode there is a quick degradation in perfomance. Enabling or not the scrollbox has almost no impact on speed, but none on degradation. Same goes for logging.
WinXP and Linux don't seem affected by the problem.
Test performed on a 3 MHz range @ 12.5kHz steps:
ch/secsilent+logTXT+logTXT onlyWin XPLinux
sweep 11,791,731,742,862,76
sweep 21,331,301,322,932,79
sweep 31,061,041,062,892,82
sweep 40,880,890,892,792,79
sweep 52,822,73
Progress bar and plot don't line up with reference markers towards the end of the sweep.
Probably due to error collection in rounding up screen units per step.
Under WinCE the "checked" mark in options menu isn't shown.

LICENSE
AOR_PLOT is released under GNU/GPL.

SCREENSHOTS
11-nov06 release 0.91
  • Moved some functions into the "SETUP" menu, allowing a wider plotting area
  • Added STOP and QUIT buttons
  • Added magnifyer to change vertical scale on weak signals
  • TXT OUT scrollbox is now in a separate window
  • grid lines now stretch to the bottom of the screen, to allow better referencing
Image refers to Windows environment
Some satellite transponders as plotted by AOR_PLOT (v0.91, under Linux) compared to a SDR14 spectrum analysis.
The SDR14 is fed from the IF out on the same Aor8600.
Not bad for the low-cost option!
AOR_PLOT running on Linux (Fluxbox X windows manager).

Contact:address shown as image to cut on spam


Published: 30Oct06
Last update: 07Jan06
Home