I recently picked up an Alinco DJ-296T. It's a single-band handheld FM transceiver for the 1.25m amateur bands- frequencies between 222 and 225 MHz. Orlando doesn't seem to have a lot of activity in this band, but there are a few repeaters out there, and I have heard people talking on them in the past (one of my other radios is a Yaesu VX-7R, which also works but is limited to 300mw of output on this band.)
One of the features I was interested in was the ability to program the radio using a PC. Alinco's literature specifies that programming software exists from a third party. So, when I bought the radio, I also purchased the ERW-4C programming cable, and planned to download the software from home.
My past experience with radios has been that programming software is usually free, and is either supplied by the manufacturer (as is the case with Kenwood) or by a third party (like the line of Yaesu HT programming software by Jim Mitchell, KC8UNJ.
However, the only program I could find for the Alinco DJ-296 has been a commercial program written by somebody who sells it through eBay.
Those of you who know me personally, know that I am a proponent of open-source software, and barring that, I'm like anybody else and prefer software which is free over software which has a pricetag. I'm also a computer programmer, and can't see paying for a program which is simple enough for me to write by myself.
So, being the hacker that I am, I started playing with the radio's cloning feature, with the cable connected to the computer. After one evening, I have figured out the mechanics of how cloning is done and written programs for my computer to send and receive cloning commands to and from the radio, which allows me to save the radio's settings to the disk. It's actually rather simple- the cloning process consists of the sending radio transmiting a sequence of commands which contain the data, and the receiving radio processes those commands. Simply saving the commands and then playing them back to the radio is enough to save and restore all of the radio's settings.
I have also analyzed the commands- the whole sequence looks like a memory dump, with each line preceded by a command which I believe means "write these bytes to memory". I don't have any official information from Alinco (they don't seem to want to even answer their telephone number in California) but assuming that the commands are indeed a memory dump, I believe I have found the location where every setting mentioned in the manual is stored.
This text file is what I believe to be a full "memory map" of the unit. All that remains is to write a nice-looking program to allow the user to manually enter and edit the settings.
These are the programs I am using to read and write the settings to and from the radio. They are written in Perl and have been tested so far with Mac OS X and with Linux. At the top of each program is a line which looks like:
my $device = "/dev/cu.USA19QWb232P1.1" ;
Before using the program, you should change this to point to the serial port device where you have the radio attached. (And yes, this is the actual name of my serial port on the iMac... it's actually a serial port adapter plugged into a USB port on the back of my keyboard.)
There is also a line which looks like this:
my $do_debug = 0 ;
If you change the 0 to a 1, the program will show you the contents of each line sent to, or received from, the radio.
clone-receive is the program which reads the configuration from a radio. To use it, you should run it with a filename on the command line. This filename is where it will store the config file. Once the program is running, put the radio in CLONE mode (i.e. hold down MON while you press PTT three times, then release MON) and then press PTT to make the radio start sending data.
On the face of the radio you should see "SD" and some numbers which are counting upwards... and if you turned on debug mode as shown above, you will see the raw data scrolling by on your screen. If you see "SD 000" on the radio and the number is not changing, press FUNC/SET to stop sending, and then PTT to start it again.
When the process is done, the radio will say "PASS" and the computer will return to a command prompt. Turn the radio off and then back on to exit CLONE mode and use the radio again.
clone-send is the program which reads a saved config file created by clone-receive, and plays it back into the radio. Before using it, you should put the radio into CLONE mode, but once the display says "CLONE", do not hit any other keys. Run this program with a filename on the command line, and the commands in the file will be played back into the radio.
On the face of the radio you should see "LD" and some numbers which are counting upwards... and if you turned on debug mode as shown above, you will see the commands and responses to and from the radio scrolling by on the screen. If you see "LD 000" on the radio and the number is not changing, or if nothing starts after about ten seconds, press CONTROL-C to stop the program and try it again.
When the process is done, the radio will say "PASS" and the computer will return to a command prompt. Turn the radio off and then back on to use the radio with the new settings.
Serial.pm is a library which contains the serial port control functions used by both programs. This file should be in the same directory with the programs, or in a directory listed in your Perl "@INC" list (you can see the list by running "perl -V".)