GUI for Serial Device

USF-Nealio

Limp Gawd
Joined
Jan 18, 2012
Messages
373
I recently purchased a HDMI switch that is controllable via an RS232 interface. I've connected to the unit with Putty, and the controlling the device is extremely simple. I'd like to build a windows program for controlling this device. but eventually I'd like to make this application run cross-platform (Primarily Linux).

The control messages are extremely simple, 2 or 3 characters followed by a carriage return. Also, there is an ability to Query the current connections (ie: What inputs and outputs are available, as well as the current connections.) I'd like to be able to implement that information into the program as well so that changes that are made by users directly controlling the switch will be displayed within the program, as well as preventing the user from switching to a non-existent input.

What would [H] suggest for language and resources to guide me through this endeavor?
 
I'm primarily a .NET developer, but since you want it to run cross platform, have a gui, and it doesn't need any mind blowing calculations and number crunching, I would suggest Java.

Java should give you a simple to use serial port interface, it is cross platform, it has reasonably good documentation, and it is not too difficult to create a GUI.

If you do not know any Java, you may want to pick up a book, or google a tutorial with basic examples. Once you have a general idea, I'm sure you can find some serial port examples. Throw together a basic command line menu at first if you aren't familiar with GUI, or jump straight into a GUI.
 
Pick a language that you're familiar, and is capable of communicating over a serial port, and write it up. Prove to yourself that it works, and that the documentation on the various switch codes is correct. This is a trivial number of lines of code in .NET, Java, etc.

Once you have a working version, then worry about creating a shared lib (from scratch) that works across operating systems, is COM-exposed, memory safe, etc.
 
I'm primarily a .NET developer, but since you want it to run cross platform, have a gui, and it doesn't need any mind blowing calculations and number crunching, I would suggest Java.

Java should give you a simple to use serial port interface, it is cross platform, it has reasonably good documentation, and it is not too difficult to create a GUI.

If you do not know any Java, you may want to pick up a book, or google a tutorial with basic examples. Once you have a general idea, I'm sure you can find some serial port examples. Throw together a basic command line menu at first if you aren't familiar with GUI, or jump straight into a GUI.

I was contemplating that. I generally dislike anything JAVA, but it may just be the best thing for me. I need to find a good place to pick up on Java coding I suppose.

Pick a language that you're familiar, and is capable of communicating over a serial port, and write it up. Prove to yourself that it works, and that the documentation on the various switch codes is correct. This is a trivial number of lines of code in .NET, Java, etc.

Once you have a working version, then worry about creating a shared lib (from scratch) that works across operating systems, is COM-exposed, memory safe, etc.

That's the thing, I'm not familiar with any languages. Considering the simplicity of the commands, I figured this project would be a good starting point to learn one or more.

Where would a good place to find information on scripting serial commands for non-java languages?
 
I don't necessarily like Java either, but sometimes it can be the right tool for the job. I'm sure there are other cross platform tools as well. but as far as a widely used language with easy guis etc.. java isn't a bad choice.

I try to consider what language is the right choice for the task at hand and use it within reason.
 
That's the thing, I'm not familiar with any languages. Considering the simplicity of the commands, I figured this project would be a good starting point to learn one or more.

Where would a good place to find information on scripting serial commands for non-java languages?
The serial port communication app could be a very good intro project, but you should consider first working through various "hello world" and other simpler applications. That way you'll be familiar with general syntax, the IDE, compiling, debugging and stepping through code at runtime, etc. Plus, it makes things much easier for you to post questions on what you've accomplished and having problems with, so others can view and offer suggestions.
 
This is a very simple project. Pick the one you're best with, it'll work.

Edit: I'm partial to Python for simple tasks because it's multi-platform and RIDICULOUSLY easy to drop and pick up on a dime if you're at all familiar with scripting. http://pyserial.sourceforge.net/

Obviously not a good choice for you if you don't know Python and don't want to learn it. :)
 
Python's serial support is pretty easy to use.
 
Ok, I don't know python that well but how do you write a gui in python easily?
 
I myself would do something like bash on cygwin for windows and do it there. You really didn't specify how fancy of a GUI you are going for here.
 
I myself would do something like bash on cygwin for windows and do it there. You really didn't specify how fancy of a GUI you are going for here.
How does one write a GUI with bash?
 
Looks like sin dipped in misery. Why would you prefer and recommend that solution, Vashypooh?
 
Looks like sin dipped in misery. Why would you prefer and recommend that solution, Vashypooh?

Just because bash would be quicker for me to write.

You could make an on screen menu and pick #'s and such to do just about anything you wanted it to do.

I write a lot of unix/windows scripts, so its just quicker for me personally. Was just listing an alternative is all :)
 
Back
Top