Primitive Flex Radio TCP programming

  • 3
  • Idea
  • Updated 4 years ago
I am struggling with programming the radio.  I do not have a C# development environment and I couldn't even successfully download a free one.  I don't much like C# anyway.

But, I want to at least have the possibility of doing some simple programming.  You might, too.

Here's some very important first steps that anyone could do.  No coding required to get this far.

1.  Find out your radio's TCP/IP address.  (The API site talks about a "discovery protocol" but didn't seem to document it).  So, that requires a bit of a search.  In my case, it was easy because I know how to deal with my router.  Better, I already instructed my router to give the Flex radio the same TCP/IP address.  If you don't know, find out what your router knows.  Usually, if you use the web interface on a modern router, you can figure it out. Otherwise, you'll have to "ping" and investigate the addresses that ping back I suppose.  It does respond to "ping".

2.  Using PUTTY or some similar terminal emulator, configure and open the TCP/IP port of your radio.  This is a bit tricky.  Any old terminal emulator may not have enough function.  Putty, a "freeware" terminal emulator I've used for years, does.    For Putty, use "raw" mode (not Telnet), port 4992, the TCP/IP address from step 1.  Then set the "terminal" for "force on" local echo and "implicity LF in every CR.  These are the combinations I got to work.

3.  If you succeeded, you will get something like V1.2.0.0 on one line and then Hxxxxxxxx (where 'x' is any old hex digit) on the next line.

4.  Enter an experimental command from the Flex SmartSDR TCP API.  Try:  C01|info and press return.  You should get back a semi-formatted string that includes a lot of basic information about your radio (usually visible on the first panel of the SmartSDR software).

If you get this far, you got a long way.  Now, try a special command that isn't really documented.  There is a command called "meter" that is used to create and destroy new "meters" for the radio.  It also notes in passing, it is supposed to list them, but doesn't say how.  I tried this obvious command:

C02|meter list

. . .and it worked.  Cut-and-paste of it followed by a little Linux magic and I even got a reasonably well formatted output.  Now I know what meters are already defined.  Among other things, I could easily calculate SWR if I could be read two Cof the metes quickly enough.  Next idea is to look at some of the meter outputs, but that requires UDP and I'm not sure how that works, even in "raw" mode of PuTTY.  I may have to write a little code for that.

5.  Heading toward other languages.  Now that you have gotten this far, you've "rehearsed" a lot of what it would take to make C++, Python, Perl, and whatever other language you like work with the Flex.  You would just do a standard TCP/IP connection and then try the commands you rehearsed.  UDP could be experimented with, though I haven't yet.

These are the first baby steps.  If the protocol I found hinted at exists; the one that implements Kenwoold's command set in TCP is available, I could get a long, long way in a short period of time from this point.

I would welcome contributions from others.
Photo of Larry Loen  WO7R

Larry Loen WO7R

  • 231 Posts
  • 37 Reply Likes

Posted 4 years ago

  • 3
Photo of Bob- W5TX

Bob- W5TX

  • 129 Posts
  • 22 Reply Likes
Larry, long time since fortran etc here and old brain doesn't work quite as well. Thanks for the baby steps and keep us informed of your progress