Computer interface programming

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Computer interface programming

Tom Zeltwanger
Can anybody recommend a source of any open source software or libraries
(preferably "C" language) for talking to my K2? I just build the KIO2 and am
looking at doing some custom interface programming.

I would also be interested in seeing what complete software packages are out
there, but my main interest is in something I can use to start my own program,
or source code I can really customize. This will run on a small embedded
processor with a hex heyboard, so I am not really looking for a fancy GUI.

Also - is there a problem with the list? Or is everyone all talked out? I only
received 2 messages since yesterday aftenoon - very unusual.


73,

Tom KG3V





_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com

Reply | Threaded
Open this post in threaded view
|

RE: Computer interface programming

Darwin, Keith
 
I haven't looked at the set of commands to control the K2 over serial.
I seem to recall they're somewhere, right?  Is it just a simple command
/ response protocol?  Does the K2 send any spontaneous messages to the
controller?  It is probably simple enough that I'd be inclined to write
my own rather than looking for one, but that's just me.

- Keith N1AS -
- K2 5411.ssb.100 -
 
-----Original Message-----
From: Tom Zeltwanger

Can anybody recommend a source of any open source software or libraries
(preferably "C" language) for talking to my K2? I just build the KIO2
and am looking at doing some custom interface programming.

_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com

Reply | Threaded
Open this post in threaded view
|

Re: Computer interface programming

chris-489
I think there is the code on the Elecraft web page to control the K2
----- Original Message -----
From: "Darwin, Keith" <[hidden email]>
To: <[hidden email]>
Sent: Friday, April 20, 2007 1:51 PM
Subject: RE: [Elecraft] Computer interface programming



I haven't looked at the set of commands to control the K2 over serial.
I seem to recall they're somewhere, right?  Is it just a simple command
/ response protocol?  Does the K2 send any spontaneous messages to the
controller?  It is probably simple enough that I'd be inclined to write
my own rather than looking for one, but that's just me.

- Keith N1AS -
- K2 5411.ssb.100 -

-----Original Message-----
From: Tom Zeltwanger

Can anybody recommend a source of any open source software or libraries
(preferably "C" language) for talking to my K2? I just build the KIO2
and am looking at doing some custom interface programming.

_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.5.5/769 - Release Date: 19/04/2007
17:56



_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com

Reply | Threaded
Open this post in threaded view
|

Re: Computer interface programming

Mike Markowski
In reply to this post by Tom Zeltwanger
Tom,

Tom Zeltwanger wrote:
> Can anybody recommend a source of any open source software or libraries
> (preferably "C" language) for talking to my K2? I just build the KIO2 and am
> looking at doing some custom interface programming.

It's easy enough that you might not even need any other libraries.  The real
work is to get the serial link going.  After that, all k2 commands and responses
are plain ascii with one exception.  The "DS" command that returns the state of
the display uses binary data.

You might want to check out http://hamlib.org and its open source C code.  Since
it's designed to talk to many rig types, though, there's probably more
abstraction than you're interested in, but it might be useful.  Also, the K2 is
only partially supported by hamlib.

I recently wrote some Java code (http://udel.edu/~mm/ham/elecraft/) for the K2
and W1 using the rxtx.org serial link support library and using rxtx and writing
the graphical portions were the hardest parts.  K2 control is mostly nice and
easy.  Since it wasn't designed to be 100% software controlled, the only thing I
find cumbersome is dealing with rig functions that don't have dedicated
commands.  For instance, take a look at what you need to do to turn on or off
the power amp.  :-)  All in all, though, I think you'll find it easy enough.

73,
Mike ab3ap
_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com

Reply | Threaded
Open this post in threaded view
|

Re: Computer interface programming

Don Wilhelm-3
In reply to this post by Tom Zeltwanger
Tom,

The K2/KIO2 Programmers Reference is available for download from the
Elecraft website >
http://www.elecraft.com/manual/KIO2%20Pgmrs%20Ref%20rev%20E.pdf

It contains all the commands and their formats.  If you create a piece
of software that can send and receive these commands over an RS-232
port, you will have the software that you desire.

The commands can even be sent manually or from a script using a terminal
program such as HyperTerm.

That is about as open source as you can get. Pick your programming
language from assembler through the most exotic and control your
display/input presentation and the resulting serial port commands.

73,
Don W3FPR

73,
Don W3FPR

Tom Zeltwanger wrote:

> Can anybody recommend a source of any open source software or libraries
> (preferably "C" language) for talking to my K2? I just build the KIO2 and am
> looking at doing some custom interface programming.
>
> I would also be interested in seeing what complete software packages are out
> there, but my main interest is in something I can use to start my own program,
> or source code I can really customize. This will run on a small embedded
> processor with a hex heyboard, so I am not really looking for a fancy GUI.
>
> Also - is there a problem with the list? Or is everyone all talked out? I only
> received 2 messages since yesterday aftenoon - very unusual.
>
>
> 73,
>
> Tom KG3V
>
>
>
>
>
> _______________________________________________
> Elecraft mailing list
> Post to: [hidden email]
> You must be a subscriber to post to the list.
> Subscriber Info (Addr. Change, sub, unsub etc.):
>  http://mailman.qth.net/mailman/listinfo/elecraft   
>
> Help: http://mailman.qth.net/subscribers.htm
> Elecraft web page: http://www.elecraft.com
>
_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com

Reply | Threaded
Open this post in threaded view
|

Re: Computer interface programming

Jack Smith-6
In reply to this post by Darwin, Keith
Keith is correct in that the command syntax is simple enough to roll
your own routines.

There is a "universal" library that gives common function calls for a
variety of transceivers, Omnirig, available at
http://www.dxatlas.com/omnirig/

I looked at this when writing Z90 Control version 2 to allow the Z90/91
panadapter to interface with other than K2 transceivers, but decided
that my Z90 customer base was so heavily weighted to the K2 that the
extra effort required to use Omnirig was not justified. Instead, I just
wrote a few simple Delphi routines to read and write the necessary commands.

Jack K8ZOA


Darwin, Keith wrote:

>  
> I haven't looked at the set of commands to control the K2 over serial.
> I seem to recall they're somewhere, right?  Is it just a simple command
> / response protocol?  Does the K2 send any spontaneous messages to the
> controller?  It is probably simple enough that I'd be inclined to write
> my own rather than looking for one, but that's just me.
>
> - Keith N1AS -
> - K2 5411.ssb.100 -
>  
> -----Original Message-----
> From: Tom Zeltwanger
>
> Can anybody recommend a source of any open source software or libraries
> (preferably "C" language) for talking to my K2? I just build the KIO2
> and am looking at doing some custom interface programming.
>
> _______________________________________________
> Elecraft mailing list
> Post to: [hidden email]
> You must be a subscriber to post to the list.
> Subscriber Info (Addr. Change, sub, unsub etc.):
>  http://mailman.qth.net/mailman/listinfo/elecraft   
>
> Help: http://mailman.qth.net/subscribers.htm
> Elecraft web page: http://www.elecraft.com
>
>  

_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com

Reply | Threaded
Open this post in threaded view
|

RE: Computer interface programming

Tom Zeltwanger
In reply to this post by Darwin, Keith
Keith,

Yes it is a very straight-forward command set. I will write my own application,
just trying not to reinvent the wheel. I would think someone has done some
basic API work with open source by now. If not, maybe I can help get the ball
rolling.
73,

Tom KG3V



Quoting "Darwin, Keith" <[hidden email]>:

>  
> I haven't looked at the set of commands to control the K2 over serial.
> I seem to recall they're somewhere, right?  Is it just a simple command
> / response protocol?  Does the K2 send any spontaneous messages to the
> controller?  It is probably simple enough that I'd be inclined to write
> my own rather than looking for one, but that's just me.
>
> - Keith N1AS -
> - K2 5411.ssb.100 -
>  
> -----Original Message-----
> From: Tom Zeltwanger
>
> Can anybody recommend a source of any open source software or libraries
> (preferably "C" language) for talking to my K2? I just build the KIO2
> and am looking at doing some custom interface programming.
>
> _______________________________________________
> Elecraft mailing list
> Post to: [hidden email]
> You must be a subscriber to post to the list.
> Subscriber Info (Addr. Change, sub, unsub etc.):
>  http://mailman.qth.net/mailman/listinfo/elecraft
>
> Help: http://mailman.qth.net/subscribers.htm
> Elecraft web page: http://www.elecraft.com
>





_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com

Reply | Threaded
Open this post in threaded view
|

Re: Computer interface programming

Tom Zeltwanger
In reply to this post by Mike Markowski
Mike,

Thanks for these suggestions. This is what I was looking for. I just want a
jump start. I am not going to concentrate on a fancy GUI - several nice GUI
based applications already exist. I just want some basic functionality that can
run on a small embedded processor (using LINUX, most likely). Main application
is contesting (primarily CW but starting to do more SSB).


73,

Tom KG3V



Quoting Mike Markowski <[hidden email]>:

> Tom,
>
> Tom Zeltwanger wrote:
> > Can anybody recommend a source of any open source software or libraries
> > (preferably "C" language) for talking to my K2? I just build the KIO2 and
> am
> > looking at doing some custom interface programming.
>
> It's easy enough that you might not even need any other libraries.  The real
> work is to get the serial link going.  After that, all k2 commands and
> responses
> are plain ascii with one exception.  The "DS" command that returns the state
> of
> the display uses binary data.
>
> You might want to check out http://hamlib.org and its open source C code.
> Since
> it's designed to talk to many rig types, though, there's probably more
> abstraction than you're interested in, but it might be useful.  Also, the K2
> is
> only partially supported by hamlib.
>
> I recently wrote some Java code (http://udel.edu/~mm/ham/elecraft/) for the
> K2
> and W1 using the rxtx.org serial link support library and using rxtx and
> writing
> the graphical portions were the hardest parts.  K2 control is mostly nice
> and
> easy.  Since it wasn't designed to be 100% software controlled, the only
> thing I
> find cumbersome is dealing with rig functions that don't have dedicated
> commands.  For instance, take a look at what you need to do to turn on or
> off
> the power amp.  :-)  All in all, though, I think you'll find it easy enough.
>
> 73,
> Mike ab3ap
> _______________________________________________
> Elecraft mailing list
> Post to: [hidden email]
> You must be a subscriber to post to the list.
> Subscriber Info (Addr. Change, sub, unsub etc.):
>  http://mailman.qth.net/mailman/listinfo/elecraft   
>
> Help: http://mailman.qth.net/subscribers.htm
> Elecraft web page: http://www.elecraft.com
>





_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com

Reply | Threaded
Open this post in threaded view
|

Re: Computer interface programming

Leigh L. Klotz Jr WA5ZNU
Administrator
In reply to this post by Tom Zeltwanger
I have some python command-line routines that I should publish for K2
and SteppIR control.  They won't add much more to your understanding if
you already have other code, but if you are considering a Linux UI, you
might want to try writing it in Python instead of C.  It may be quicker
and easier to maintain, and can be ported to Windows as well.  (WSJT for
example is done this way).

Also, Dave W1HKJ wrote a configurable rig interface for fldigi that uses
an XML-based config file format.  I contributed the K2 file and help a
small amount on the XML design.  One idle project for me is a second
implementation of the rig control interpreter outside of fldigi, perhaps
in Python or Java.  The hope is that this rig control format can be
shared among many programs.

Hamlib is OK for many purposes, but the infrastructure in it is complex,
and the difficulty of adding new features is high.  Plus, given its
monolithic nature, it is hard for individuals to make small
contributions.

The configurable approach Dave has taken has the advantage here, though
it remains to be seen how it will be extended to deal with rigs that
require some computation that it can't currently express.

73,
Leigh/WA5ZNU
_______________________________________________
Elecraft mailing list
Post to: [hidden email]
You must be a subscriber to post to the list.
Subscriber Info (Addr. Change, sub, unsub etc.):
 http://mailman.qth.net/mailman/listinfo/elecraft   

Help: http://mailman.qth.net/subscribers.htm
Elecraft web page: http://www.elecraft.com