[Elecraft] Looking for an ASCII Elmer

Jack Brindle jackbrindle at me.com
Sun Feb 22 15:36:44 EST 2015


Excellent suggestions. For the K3, we have an even easier solution to start playing with rig commands and their effects.
We use the  Elecraft K3 Utility all the time for updating the K3, but clicking on the Command Tester / K3 Macros tab will
give most of us an excellent platform for playing with the K3 commands. Just grab the K3 and KX3 Programmer’s Reference,
pick out some commands to test, type them in using the appropriate information and see the results both on the radio and
in the serial response. Of course this same solution applies to the KPA500, KAT500 and the other remotely controllable
devices from Elecraft.

Sometimes we first think of a way-cool engineering solution that we can create (I’m certainly guilty), then we realize the simple
one that provides a better answer. Learning to program and control our rigs in Python, Swift, Objective-C or some other
programming language is a great experience and worth doing. It just may not be the most expedient for some things.

Now if someone wants to do just that - learn how to programmatically control the radio, Walt’s Phil’s or my suggestions are
an excellent starting point. There are more, I’m sure, with lots of help around to get you going rather quickly.

73!

Jack B, W6FB


> On Feb 22, 2015, at 12:10 PM, Walter Underwood <wunder at wunderwood.org> wrote:
> 
> Sorry to be negative, everyone. I need to take my own advice and be helpful.
> 
> I recommend starting with the rigcontrol package, written in Python. It is OK if you don’t know Python. This code is very straightforward, so you don’t need use any fancy Python features.
> 
> It comes with a number of command line scripts that use the package. For example, here is main part of the “qrg” script, which reports the current frequency.
> 
> if len(sys.argv) == 1:
>    rig = riglib.K3()
>    print(rig.qsyq())
>    rig.close()
> else:
>    print "usage: qrg"
> 
> I have some some unfinished additions to the library to add KX3 support and build an SWR sweeper (poor man’s antenna analyzer). It works most of the time, but the SWR can only be read off the display, so it occasionally reports “bypass” as the SWR, because the ATU needs to be in bypass mode to measure the SWR.
> 
> I sure wish there were commands to read the SWR directly from the KX3.
> 
> rigcontrol is here:
> 
> https://pypi.python.org/pypi/rigcontrol
> 
> You will also need the K3 programming reference. When I was working on the code, I had the reference open in Adobe Reader all the time, because I kept searching it for details. On top of that, I printed out key pages.
> 
> http://www.elecraft.com/manual/K3&KX3%20Pgmrs%20Ref,%20E11.pdf
> 
> Since my code doesn’t entirely work, I’m not sure how much help I can be, but I’ll give it a shot.
> 
> wunder
> K6WRU
> CM87wj
> http://observer.wunderwood.org/
> 
> On Feb 21, 2015, at 11:23 PM, Walter Underwood <wunder at wunderwood.org> wrote:
> 
>> I am pretty sure that the question about ASCII programming was about the ASCII protocol to Elecraft rigs. That truly is ASCII, complete with control characters.
>> 
>> And yes, I know about Unicode and UTF-8. I was doing multibyte character set programming before Unicode. 
>> 
>> I’ve done some Elecraft control programming and it isn’t easy. Yeah, you can fart out ASCII, but the radio takes time to respond, and some of the codes read the display rather than the data, so it is a highly stateful, ugly experience.
>> 
>> Instead of explaining how smart you are about UTF-8, be an Elmer.
>> 
>> wunder
>> K6WRU
>> CM87wj
>> http://observer.wunderwood.org/
>> 
>> On Feb 21, 2015, at 9:44 PM, Phil Hystad <phystad at mac.com> wrote:
>> 
>>> ASCII...
>>> 
>>> Well, the UTF-8 character set is indeed designed to be backward compatible with ASCII but it is far more than that -- and even these days many programmers do have trouble with UTF-8.  Why?  Because UTF-8 is a multi-byte, variable length character encoding system.  Sure, the backward compatible ASCII codes are single byte but you can literally encode any character defined by UNICODE via UTF-8.  Chinese characters defined in UNICODE take more than a single byte to define so they require the multi-byte features of UTF.8.
>>> 
>>> Now, I do agree that the programming for radio control is not likely to run into multi-byte characters but UTF-8 will include them if they are found elsewhere -- say a text file that has mixed English as other multi-byte characters.
>>> 
>>> I agree with the need to download Xcode and learn Objective-C but the new Swift language might be easier for someone who is just starting out to learn.  I am not sure which would be easier to learn, Objective-C or Swift but I think Swift, being more modern and also supporting scripting is easier.
>>> 
>>> 73, phil, K7PEH
>>> 
>>>> On Feb 21, 2015, at 9:30 PM, Jack Brindle <jackbrindle at me.com> wrote:
>>>> 
>>>> ASCII? That is a character set that is a subset of Unicode, which is now used on all modern computers. It isn’t something you program with, it simply represents characters. On the Mac we do not use ASCII coded characters, but rather Unicode characters, usually coded in UTF-8.
>>>> 
>>>> What is it that you are really trying to do? If that is to program the Mac, I highly recommend a tutorial on Objective-C and Cocoa, along with Aaron Hillegas’ excellent Mac programming tutorial “Cocoa Programming for Mac OS X” which is now in its fourth edition. I see that Aaron also has a book on Objective-C programming, which might be a good place to start. Both are produced by Big Nerd Ranch over in Atlanta, and are available from Barnes and Noble, amazon and other booksellers. Yu might also want to take a good look at programming the Mac in Swift. There are several good books available at the iBooks store, some free, others cost a bit. You might find Swift a bit easier than Cocoa to learn and get up to speed.
>>>> 
>>>> You can get the Mac tools directly from Apple for free at http://developer.apple.com. In particular, the Xcode development environment is what you want. It allows development in many languages for the Mac and iOS devices. For UI development, you will need to use either Objective-C or Swift
>>>> 
>>>> Good luck on you new journey. Programming the Mac is a fun and very enjoyable exercise, with lots to learn no matter how good you become at it.
>>>> 
>>>> 73,
>>>> 
>>>> Jack B, W6FB
>>>> 
>>>> 
>>>>> On Feb 21, 2015, at 6:12 PM, Dauer, Edward <edauer at law.du.edu> wrote:
>>>>> 
>>>>> Sometime soon I mean to program my K3's Pig Knob to do what I'd like, rather than the factory defaults.  If someone who is adept with using ASCII on the K3 is willing to help, I would appreciate meeting you off-list.
>>>>> 
>>>>> Requirements - the patience to put up with someone (me) who knows niente about computer programming, ASCII, computer rig control, and any other topic that might be germane.  Time frame would be any time in March that suits both our calendars; probably by e-mail.  In case it matters, I use Mac OS X (10.10).
>>>>> 
>>>>> Thanks in advance to whomever cares to take this project on . . . .
>>>>> 
>>>>> Ted, KN1CBR
> 
> ______________________________________________________________
> Elecraft mailing list
> Home: http://mailman.qth.net/mailman/listinfo/elecraft
> Help: http://mailman.qth.net/mmfaq.htm
> Post: mailto:Elecraft at mailman.qth.net
> 
> This list hosted by: http://www.qsl.net
> Please help support this email list: http://www.qsl.net/donate.html
> Message delivered to jackbrindle at me.com



More information about the Elecraft mailing list