PDA

View Full Version : COM ports, HRD, Kenwood software....



W1GUH
12-26-2011, 06:29 PM
I HATE COMPuTERS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

So I bought this USB to COM port i/f a while ago, bought it home...hooked up...installed just fine....plugged in my FT-817...started HRD..and...

SUCCESS!!!

Big, beautiful freq. display...can control everything. Super! Looks good..works good. I'm happy.

So then I get Kenwood software for my 'F6A a few months later.

Got the i/f cable..plugged everything in, set the menu, start Kenwood software. GRONK!!!! Can't communicate.

OK...does HRD still work?

NO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

(blood pressure going up)

Check all the COM settings on both ends (Well, Kenwood doesn't let you do that. You get to guess what rate)

Nope....nope...nope....


Meanwhile...

I find out at work that once you configure a COM port on the USB, ya gotta use the same USB hole...OK...cool.

Juet tried THAT.

NOPENOPE. Kenwood refuses read the HT, HRD refuses to "read the frequency."

Of course, there are no really informal error message....nothing to give me a clue what's hapenning.

Shit.

OK....enough IT BS for one day. Don't want HRD anyway.

PISSANDMOANPISSANDMOANPISSANDMOANPISSANDMOANPISSAN DMOANPISSANDMOANPISSANDMOANPISSANDMOAN

NQ6U
12-26-2011, 08:19 PM
If it makes you feel any better, after two years (with no changes other than normal Windows updates) my copy of HRD decided to start throwing up continual Javascript errors. It wouldn't be so bad if I could figure out why but the error messages give no real information.

WØTKX
12-26-2011, 08:41 PM
Kenwood does funny shit for comports. Never cared for the comms with HRD and the TS-850SAT.
It works, but chokes above 4800 baud. For some reason, it works great with the N4PY software. :dunno:

n2ize
12-26-2011, 10:10 PM
Sounds like some compatability/driver issue. Google it. You can't be alone.

N1LAF
12-27-2011, 12:02 AM
How about testing the port with a terminal program. Connect pins 2 and 3 of the DB9 connector together, and see if the what you send to the port, comes back from the port. Forget Hyper terminal, its junk.

W1GUH
12-27-2011, 04:49 AM
How about testing the port with a terminal program. Connect pins 2 and 3 of the DB9 connector together, and see if the what you send to the port, comes back from the port. Forget Hyper terminal, its junk.

GMTA! Yep....will be writing C# COM port test program -- something that'll get me down into the guts and show me what the heck's going on! Should be a fun little project! Had a custom i/f program started...can draw from that.

WØTKX
12-27-2011, 07:30 PM
PuTTY will do it too.

N8YX
12-27-2011, 08:02 PM
Which chipset in the USB/Serial converter?

There were a couple of threads on the HRD forum that described a problem similar to yours. Some of the drivers for certain converters are prone to funny behavior, as 'IZE alluded to.

WØTKX
12-27-2011, 08:30 PM
That's why I like the Keyspan units. Work as advertised, no flakiness.

W1GUH
12-28-2011, 07:04 AM
Thanks for all the info. Yep....glad I'm not alone. Just about ready to test the tester with the radio. I'm done with the part that opens the port and sets the paraeters. Now, to see it the radio can hear it!

W1GUH
12-28-2011, 10:11 PM
Might be something funky going on.....

A few years ago, I started a control program for my '8x7's. That computer had a real COM: port, and it was simple getting the C# Serial Port Class Write function to work using the function definition and Yaesu's documentation. The '817 "heard" and reacted to every commend I programmed.

Not so with this Prolific USB to Serial Port adapter.

I've got a GUI that can change the parameters of the Write command on the fly* & the radio doesn't hear the commands. Comparing the two experiences, it's time go pull out the old machine and try it. (With any luck, I've still got this C# project over there.) If not, I can always import the new project. One thing that make me very suspicious here is I didn't have to mess with "Encoding" before....pretty much used the default. Think I only wrote an array of bytes. ???

But first...a little google-fu!

BTW....I really, really, really love Visual C#! (YMMV, of course! And I'm sure they will!) ;)


* And then query the port to confirm they actually got changed.

W1GUH
12-28-2011, 10:19 PM
Just found the "Tx" light on the adapter...it flashes.


thinkthinkthinkthinkthink

Maybe one of those test cables is in order. Going back to see what to get.

W1GUH
12-28-2011, 10:20 PM
How about testing the port with a terminal program. Connect pins 2 and 3 of the DB9 connector together, and see if the what you send to the port, comes back from the port. Forget Hyper terminal, its junk.

There it is. Thanks, Paul.

W1GUH
12-28-2011, 10:26 PM
Looks like an alligator clip can to that job.

N1LAF
12-28-2011, 10:34 PM
You can get a DB9 connector and backshell from R-Shack. Tie pins 2 and 3 together, and with a 1K resistor from pin 2 and 3 junction, to a LED, then to ground. This way you get indication of serial traffic, and have a test plug rolled into one.

Pin 5 is ground

W1GUH
12-28-2011, 10:51 PM
Yea, it did. Getting back same bytes as written. Look like it's OK....could be the radio is FU'd.

W1GUH
12-28-2011, 10:52 PM
You can get a DB9 connector and backshell from R-Shack. Tie pins 2 and 3 together, and with a 1K resistor from pin 2 and 3 junction, to a LED, then to ground. This way you get indication of serial traffic, and have a test plug rolled into one.

Pin 5 is ground

LED's built into the adapter. Both Rx and Txflash.

But enough of the shit that I do at work (shudder. Time for something fun!

W1GUH
12-28-2011, 11:39 PM
Well, THAT was a fun waste of time! Hey, 'GUH DUH....the cable goes in the ACC socket. All's wonderful, now, at least with the Yaesu's.

WØTKX
12-29-2011, 01:46 AM
OIC, Whoopsie! Yaesu Engrish.

Accy jack is for (CAT) Data, and Data jack is for Audio. :wtf:

I hope you didn't bend pins on a plug like I did a long time ago.

W1GUH
12-29-2011, 02:04 AM
OIC, Whoopsie! Yaesu Engrish.

Accy jack is for (CAT) Data, and Data jack is for Audio. :wtf:

I hope you didn't bend pins on a plug like I did a long time ago.

Sure did -- just like the last time I did this. Cheech! But hey, I'm a software dude -- quit being a hardware jock 20 years ago! Hmmm....so how come I blamed the software? Must be a vestigal habit left over from those bygone days!

But....only half the problem. The other is why doesn't it work with the Kenwood? Google-fu to the rescue? Gonna try it.

WØTKX
12-29-2011, 03:48 AM
Ummm, if that is an older Kenwood, it needs the "IF-232" or equivalent to actually do serial comms to a PC.

I use a cool plug in DB9 (they have USB too) cable from http://www.g4zlp.co.uk/unified/KenwoodCAT.shtml

W1GUH
12-29-2011, 07:40 AM
No...it's there little tri-band HT.

N1LAF
12-29-2011, 08:30 AM
On the TH-F6A, I had to put a pull-up resistor on the input line, to 3.3 VDC. The Kenwood may use this as a 'turn-on" mechanism. I used diodes, resistor, capacitor (10 uf), and a 3.3 VDC zener to accomplish this. Pull up with 5VDC flakes out the radio, so the zener was necessary.

Here is my serial interface I used for both ICOM and Kenwood.
http://paulfelgate.com/hamradio/serial/index.html

W1GUH
12-29-2011, 09:36 AM
Thanks, Paul

W1GUH
12-29-2011, 06:30 PM
Here's where the GUI wound up....

Proved that the USB/COM i/f I've got is golden. Presented no problems or "unexpectacies" at all. Was solid that way.

Another plug for Visual C#...

All those widgets on the screen are very, very intuitive to place on the GUI and to implement. The IDE writes almost all of the "boilerplate" for the programmer. All that's left to do is add the custom code for what you want to do. A COM port is easy, too. The 817 port was a "drag and drop" in the GUI editor....then it's all coded, with its own class.

C# classes are well-documented on the web.

Well worth switching from Java, if you can. IMHO, C# is "Java done right."

No, I don't work for MS....just credit where it's due! Oh, and there's a free and supported version for C#. Google-fu will find it for you.

Will probably not be able to resist making a custom i/f for my '8x7's. HRD is a little over-the-top for me. It's gorgeous and all, and I LOVE how it does the tuning dials...but I just want a simple i/f to bypass the menus. What I gotta do now is find a full spec of all the CAT codes. I'm SURE there's a lot more than what's in the Owner's Manual!

Opening screen:
5069

After the port's been opened:

5070

N8YX
12-29-2011, 06:42 PM
Someone needs to write a replacement for HRD.

W1GUH
12-29-2011, 06:51 PM
I've heard the expression, "He or she who suggests, does." ;)

WØTKX
12-29-2011, 07:02 PM
There is a freeware CAT program you might like... http://www.g4hfq.co.uk/ftbcathelp/ftbcathelp.htm
(http://www.g4hfq.co.uk/ftbcathelp/ftbcathelp.htm)
And flrig from the W1HJK (fldigi) folks is clean and simple... http://www.w1hkj.com/flrig-help/index.html

W1GUH
12-29-2011, 07:26 PM
Thanks...but I gotta admit that that tester was so much fun that I probably won't be able to resist the urge to roll-my-own, especially since Visual C# makes programming GUI"s so easy and intuitive. That way I can fix what doesn't work; I can dig around with the debugger to fix all the annoying and irritating things I don't like instead of wearing out my google-fu.

KC2UGV
01-04-2012, 07:54 AM
If it makes you feel any better, after two years (with no changes other than normal Windows updates) my copy of HRD decided to start throwing up continual Javascript errors. It wouldn't be so bad if I could figure out why but the error messages give no real information.

A console app that throws JS errors...

shudder.

And who said XSS Attacks were limited to website kekeke

W1GUH
01-04-2012, 08:14 AM
IMHO, Java is an unmitigated disaster from the git-go. Yea, the concept of "write once, execute everywhere" was noble, but the implementation is a disaster, at least from a c/c++ fanatic's point of view. But...somehow...they conned the world into doing so much in Java, so we're stuck with it.

I call c# "Java done correctly!".

KC2UGV
01-04-2012, 09:04 AM
IMHO, Java is an unmitigated disaster from the git-go. Yea, the concept of "write once, execute everywhere" was noble, but the implementation is a disaster, at least from a c/c++ fanatic's point of view. But...somehow...they conned the world into doing so much in Java, so we're stuck with it.

I call c# "Java done correctly!".

You've never seen a well written Java application, is what I'm thinking.

Check out the following applications (Done in Java):
* I2P
* Maximo
* Documentum
* Blu-Ray players
* ThinkFree
* Jetty

Just a few there.

NQ6U
01-04-2012, 09:55 AM
IMHO, Java is an unmitigated disaster from the git-go. Yea, the concept of "write once, execute everywhere" was noble, but the implementation is a disaster, at least from a c/c++ fanatic's point of view. But...somehow...they conned the world into doing so much in Java, so we're stuck with it.

I call c# "Java done correctly!".

There's a big difference between Java and Javascript. In fact, the two were developed entirely separately and are not even remotely related, the "Java" in Javascript being nothing more than a marketing gimmick from the early days of Web browsers.

And I call C# Microsoft's attempt to obtain the advantages of Java without actually paying the licensing fee.

W1GUH
01-04-2012, 10:02 AM
Well...whatever floats your boat.

Corey....what percentage of Java code is "well written?" 1%? 0.5%

Besides....it just sucks when run under Windows....unless one likes the "deck of cards" look when you move a window.

The GUI designs stuff (at least in '04 when I learned it) was very cumbersome and awkward. Guess they never heard of "pick and place?" Or has that gotten better?


'BSO:


And I call C# Microsoft's attempt to obtain the advantages of Java without actually paying the licensing fee.

Ever use it?

KC2UGV
01-04-2012, 10:08 AM
Well...whatever floats your boat.

Corey....what percentage of Java code is "well written?" 1%? 0.5%


What percentage of .NET applications are "well written"? Yet, I don't judge .NET based on the apps people wrote, but yet the language itself.



Besides....it just sucks when run under Windows....unless one likes the "deck of cards" look when you move a window.


I think you have other issues than Java. I don't get the "deck of cards" look with a well written Java application.



The GUI designs stuff (at least in '04 when I learned it) was very cumbersome and awkward. Guess they never heard of "pick and place?" Or has that gotten better?


The GUI design stuff in all languages was cumbersome and awkward in '04. And yes, it's gotten better across the spectrum in all languages.

W1GUH
01-04-2012, 11:18 AM
Thanks, Corey. Before this turns into a GW or Nuke discussion...they are both "what is."

Re: cumbersom GUI design.

I cut my teeth on in the mid-90's on something called "Guide Tool." Anyone remember that? It was the best I've used til Visual C#. The GUI design was a pick and place editor & the IDE wrote the callbacks for you, exactly like what Visual C# does.

Then Guide Tool disappeared..dunno where it went, but the GUI designer in Matlab is very much like it...if fact, I got the impression that Matlab had bought Guide Tool for its GUI's.

Then there was Visual C++. Nice pick and place GUI editor...but making those widgets work was a disaster...at least for a beginner. 'Nuff said there.

Then there was Java. Nice, powerful IDE's. Used Eclipse and something else from some Scandinavian country for a course I took. The IDE was powerful with all the modern aids...but, at least back then, JAVA didn't let you use "pick and place" for a GUI. Huh? And it was a bitch getting things to look right. I'll bet that's better now. But, more than that, it's that "byte code" BS that I never really understood "why?" about. Java was basically an interpreter -- never actually ran native code, but those silly byte codes. Sun claimed that's what enables "write once, execute everywhere", but that was BS. You had to have the Java package to interpret those byte codes. My reaction to that was, why not just put a real compiler and linker into that Java package & do a "just in time" compile? (What C# does.)

Beyond that, Jave was always (is still? dunno.) "deprecating." You never knew what functions, classes, etc. were about to be "deprecated". And public deprecation should be frowned upon! Add to all this the tendancey for Sun and MS to not play together very well, and....

But Java IS a fact of life. Somehow it got itself embedded in everything from PC's to Toaster's to everything else & that's the way it is.

OK....just a rant, reallly, except to put in another plug....Visual C# is free, intuitive, powerful, and made for the wintel platform. A good choice for quick and dirty GUI development on PC's. Obviously, doesn't apply to open system stuff!

Cheers!

n2ize
01-04-2012, 12:30 PM
That is why you should be using FORTRAN and running your programs from the CLI.

NQ6U
01-04-2012, 12:51 PM
That is why you should be using FORTRAN and running your programs from the CLI.

FORTRAN?? None o' them new-fangled languages for me. I'm stickin' with COBOL.

KC2UGV
01-04-2012, 12:55 PM
Thanks, Corey. Before this turns into a GW or Nuke discussion...they are both "what is."

Re: cumbersom GUI design.

I cut my teeth on in the mid-90's on something called "Guide Tool." Anyone remember that? It was the best I've used til Visual C#. The GUI design was a pick and place editor & the IDE wrote the callbacks for you, exactly like what Visual C# does.

Then Guide Tool disappeared..dunno where it went, but the GUI designer in Matlab is very much like it...if fact, I got the impression that Matlab had bought Guide Tool for its GUI's.

Then there was Visual C++. Nice pick and place GUI editor...but making those widgets work was a disaster...at least for a beginner. 'Nuff said there.

Then there was Java. Nice, powerful IDE's. Used Eclipse and something else from some Scandinavian country for a course I took. The IDE was powerful with all the modern aids...but, at least back then, JAVA didn't let you use "pick and place" for a GUI. Huh? And it was a bitch getting things to look right. I'll bet that's better now. But, more than that, it's that "byte code" BS that I never really understood "why?" about. Java was basically an interpreter -- never actually ran native code, but those silly byte codes. Sun claimed that's what enables "write once, execute everywhere", but that was BS. You had to have the Java package to interpret those byte codes. My reaction to that was, why not just put a real compiler and linker into that Java package & do a "just in time" compile? (What C# does.)


c# (And, all .Net languages) do the same thing. Only difference? The runtime isn't available for all platforms with .Net. With Java, it is...



Beyond that, Jave was always (is still? dunno.) "deprecating." You never knew what functions, classes, etc. were about to be "deprecated". And public deprecation should be frowned upon! Add to all this the tendancey for Sun and MS to not play together very well, and....


Every language is deprecating. The differences between VisualBasic.Net 2003 and 2008 are worlds apart. Same with C#, J#, and all of the other .Net languages.



But Java IS a fact of life. Somehow it got itself embedded in everything from PC's to Toaster's to everything else & that's the way it is.

OK....just a rant, reallly, except to put in another plug....Visual C# is free, intuitive, powerful, and made for the wintel platform. A good choice for quick and dirty GUI development on PC's. Obviously, doesn't apply to open system stuff!

Cheers!

.Net is only good if you never intend for your software to run on anything but the OS it was written on. Don't expect a .Net application written for XP to run on Win 7.

n2ize
01-04-2012, 02:27 PM
I cut my teeth on in the mid-90's on something called "Guide Tool." Anyone remember that? It was the best I've used til Visual C#. The GUI design was a pick and place editor & the IDE wrote the callbacks for you, exactly like what Visual C# does.



Okay, so it sounds like you like to do programming involving GUI's & visual interfaces and thus you gauge the quality of the langauge by the type of interactive GUI developer tool.. Nothing wrong with that philosophy, after all the purpose of any programming language is to get work done. Most of my programming involves "number crunching" and just runs in the background or from the CLI so I rarely get involved with GUi development.

In the event I need to build GUI's I have had very good luck using the GUI designer that comes bundles with the Qt development package. Basically it is programming in C++ + the added libraries and function calls used to build and run the GUI's. The "visual developer" bundles with Qt works very well IMHO. You basically drop the various widgets onto the GUI, add the connections and functionality and the designer generates the code and the "signals and slots" needed to connect the various widgets with the appropriate actions. Modifying or changing a GUI is about as simple as a drag and drop operation. Took me about an hour to learn to use it.

W1GUH
01-04-2012, 03:39 PM
Not really....just want a quick and dirty tool do do what I want to do when I want to do it. Don't need to mess with compatibility issues...don't need any high-power stuff. Just wanna get in, get out and use what I've got.

C# beats any of 'em for doing that on a window machine. Won't work on Windows 7 'cuz I did it with Vista? How cares? I'll get the .net for Vista and port it. Not doing heavy-duty commercial develpment with it. Not caring about all the nook and crannys of what all it can do. Just wanna make a GUI that'll do a specific task, i.e., transparently playing with a COM port. That's all. Not really someone to get into all the hair under the hood of a development system. Could care less about THAT!

Fave used to be command line *nix; vi editor, cc, a.out. THAT was very efficient. But C# beats that....it writes all the boiler plate & I don't have to mess with text IO formatted in a readable format.

OTOH.... how's about APL with a selectric?

kf0rt
01-04-2012, 03:58 PM
.Net is only good if you never intend for your software to run on anything but the OS it was written on. Don't expect a .Net application written for XP to run on Win 7.

I don't believe that.

W3WN
01-04-2012, 04:09 PM
< snip >
.Net is only good if you never intend for your software to run on anything but the OS it was written on. Don't expect a .Net application written for XP to run on Win 7.With respect Corey, I disagree.

We're running a .NET app at work right now, and it works equally well on Windows XP SP3, Windows Vista SP2, and Windows 7.

[OK, you can make the crack about "equally poorly" but that has more to do with the software itself than with .NET]

KC2UGV
01-04-2012, 07:12 PM
With respect Corey, I disagree.

We're running a .NET app at work right now, and it works equally well on Windows XP SP3, Windows Vista SP2, and Windows 7.

[OK, you can make the crack about "equally poorly" but that has more to do with the software itself than with .NET]

Really? A .Net application making calls to the XP kernel will somehow work with the Win 7 kernel?

The point is, with Java, you can not hook into anything but the API in Java; by design. So, Java apps run on any Java interpreter of the same version.

N1LAF
01-04-2012, 09:50 PM
IF you really want to get serious with GUI interfaces, plus fast and easy Windows programming, look to LabVIEW by National Instruments
www.ni.com

Sample controls, indicators

http://www.ni.com/images/labview/2010/neutral/ui_standard_lv_controls.jpg

http://www.ni.com/images/labview/2010/neutral/ui_eng_windows_controls.jpg

N1LAF
01-04-2012, 09:55 PM
Also...

http://www.ni.com/images/labview/2010/neutral/ui_3d_picture_control.jpg

n2ize
01-04-2012, 11:41 PM
Not really....just want a quick and dirty tool do do what I want to do when I want to do it. Don't need to mess with compatibility issues...don't need any high-power stuff. Just wanna get in, get out and use what I've got.

C# beats any of 'em for doing that on a window machine. Won't work on Windows 7 'cuz I did it with Vista? How cares? I'll get the .net for Vista and port it. Not doing heavy-duty commercial develpment with it. Not caring about all the nook and crannys of what all it can do. Just wanna make a GUI that'll do a specific task, i.e., transparently playing with a COM port. That's all. Not really someone to get into all the hair under the hood of a development system. Could care less about THAT!

Fave used to be command line *nix; vi editor, cc, a.out. THAT was very efficient. But C# beats that....it writes all the boiler plate & I don't have to mess with text IO formatted in a readable format.

OTOH.... how's about APL with a selectric?

It all boils down to what exactly you are trying to do. For what you are doing C# is fine.

In general I try to avoid proprietary software products and i prefer to use free software (free as in beer) products whenever possible. I prefer to support the free software community rather than the englobulators. I try to avoid Microsoft products at all costs due to the extremely hostile attitude that Microsoft has taken towards the free software community over the years.

W1GUH
01-05-2012, 08:01 AM
It all boils down to what exactly you are trying to do. For what you are doing C# is fine.

In general I try to avoid proprietary software products and i prefer to use free software (free as in beer) products whenever possible. I prefer to support the free software community rather than the englobulators. I try to avoid Microsoft products at all costs due to the extremely hostile attitude that Microsoft has taken towards the free software community over the years.

I can really dig that, John, and bless you for supporting the indys out there. If I had more time....

n2ize
01-05-2012, 01:53 PM
I can really dig that, John, and bless you for supporting the indys out there. If I had more time....

Well, you can do a little at a time. There is free software written for Windows. What I try to do is see if there is a free software alternative. If I find one and it works well I use it. If not I might have to jump into a proprietary product. One of the problems I do have with some free software is that the software is extremely powerful, featured, and robust but the documentation is poor. Case and point, I am using a program right now called Asymptote. It's an extendable, C-like vector graphics langauge used for creating simple or complex graphs, 3D renderings, modeling flowcharts, animations, 2 and 3D vector fields, fractals, abstractions, geometrics, etc. It has some extremely powerful features. Unfortunately its documentation is somewhat sparse making the learning curve somewhat steep. Nonetheless, I have managed to learn it well enough to create some very superb renderings with it. better and clearer documentation along with a improved and more robust GUI designer and it could be a top class project.

W1GUH
01-07-2012, 06:28 AM
With respect Corey, I disagree.

We're running a .NET app at work right now, and it works equally well on Windows XP SP3, Windows Vista SP2, and Windows 7.

[OK, you can make the crack about "equally poorly" but that has more to do with the software itself than with .NET]

Can back you up on that. I developed an application at work on XP and with a different version of Visual C#, and it installed and ran just fine on my home machine with Vista.

kf0rt
01-07-2012, 09:28 AM
Really? A .Net application making calls to the XP kernel will somehow work with the Win 7 kernel?

The point is, with Java, you can not hook into anything but the API in Java; by design. So, Java apps run on any Java interpreter of the same version.

.Net apps call the .Net framework which is installable on any version of Windows (XP or later). Typically, the only thing in a Windows environment with kernel access is device drivers. Apps all use the Windows API in one form or another. .Net is just an additional API layer. The point is, with Windows, you can not hook into anything but the API in Windows; by design. ;)

Hard to believe, but apps written for Win 95 run on Win 7.