Read / Write Icom CI-V Serial Data from Terminal?

Status
Not open for further replies.

blantonl

Founder and CEO
Staff member
Super Moderator
Joined
Dec 9, 2000
Messages
11,116
Location
San Antonio, Whitefish, New Orleans
Does anyone know how to read/write serial data from a terminal to an Icom Radio?

In testing with my Icom R8500 - I configure the serial port and open it in a terminal, but all I get is gibberish back when changing channels on the radio.

Any ideas?
 

blantonl

Founder and CEO
Staff member
Super Moderator
Joined
Dec 9, 2000
Messages
11,116
Location
San Antonio, Whitefish, New Orleans
I know the command reference - I'm just wondering if there is any special conversion that needs to be done considering I'm just getting gibberish back in the terminal instead of the proper expected return commands.
 

blantonl

Founder and CEO
Staff member
Super Moderator
Joined
Dec 9, 2000
Messages
11,116
Location
San Antonio, Whitefish, New Orleans
Baud rate is correct. (19200 8N1) and verified in the radio's configuration. I can also control the radio just fine using other software packages.

Just looking for how to write my own interfaces to the radio - however it doesn't operate quite like a Uniden / GRE scanner serial port where everything is in plain text.
 

n0vza

Member
Joined
Dec 27, 2003
Messages
64
Location
Plymouth, MN
In the Icom reference manual, it looks like you have to build/decode a "packet structure".

Packets begin with a FE FE sequence (preamble code) and terminate with a FD (end of message code). The actual commands are between these two sequences and are 8-bit hex codes.

None of this looks like it would display, as you might expect TTY mode.

What "language" are you using for programming? I did write a bunch of stuff (a long time ago) using (cough, cough) Borland Turbo Pascal. I can look around and see if I have any code snippets.
 

n0vza

Member
Joined
Dec 27, 2003
Messages
64
Location
Plymouth, MN
If you do PERL, there is a CPAN module that may help.

Which OS do you want to do this from Mac, Linux, or Windows?

Info at: https://metacpan.org/pod/HAM::Device::IcomCIV

DESCRIPTION

This module is an OO approach to use Icom radios attached to a serial port.
HAM::Device::IcomCIV is not an abstract class, but one you can use directly.

It allows for the most basic form of remote control of practically any Icom radio equipped with a CI-V port, namely set & get of the displayed frequency, set & get the mode and filter, read the band edges, switch to VFO or Memory (if radio has a VFO), select a memory channel, write VFO data to memory and clear a memory.

It supports multiple radios on the same serial port, differentiated by their CI-V adress. Note: If you have two or more identical models on the same bus, they must use different CI-V adresses.

This class can be used in a procedural manner or with an event callback mechanism (or both at the same time). When used without callbacks you just use the provided methods for setting or getting radio settings (Frequency, Mode etc.). If you use the callback mechanism you will receive a callback to your sub (set with set_callback) which tells you what happened, i.e. which data was received (see event and status constants).
 

blantonl

Founder and CEO
Staff member
Super Moderator
Joined
Dec 9, 2000
Messages
11,116
Location
San Antonio, Whitefish, New Orleans
OK, I'm on the right track now.

The Framing data is in Hex format. The Frequency data is encoded BCD format.
 

Attachments

  • Screenshot 2018-09-10 16.56.17.jpg
    Screenshot 2018-09-10 16.56.17.jpg
    56.6 KB · Views: 181

majoco

Stirrer
Joined
Dec 25, 2008
Messages
4,283
Location
New Zealand
This programme...

Commander

...is very flexible and allows you to read/write to a whole load of equipment - works fine on my R7000 and should work on the R8500 as it's mentioned in the drop-down screens. You can read/wriet in hex too.
 

EricCottrell

Member
Premium Subscriber
Joined
Nov 8, 2002
Messages
2,413
Location
Boston, Ma
Interestingly enough, the R8500 sends updated serial data whenever the radio's frequency changes. The Icom R9500 doesn't do this....
Hello,

It is controlled by the CI-V Transceive function (Page 11-14 in the R9500 manual).

73 Eric
 

JSTARS03

Monitor
Premium Subscriber
Joined
Jun 10, 2003
Messages
159
Location
Sunny Florida
Very Cool

That sounds very cool, I would love to see it.
Especially if you are using PHP, never used
PHP for that usually just forms and database
access

Thanks
JSTARS03
 
Status
Not open for further replies.
Top