Jump to content

serial comms between Java app and MSP430

Recommended Posts

Hi everyone and a happy new year to you all,


I am pretty much a beginner at this so bare with me. I want to write a GUI user interface running on a host computer which will gather parameters, validate them and pass them to the MSP430 which will then use them to control a DDS chip. I'll be programming the MSP430 in Energia and I was hoping to use Java on the host computer, in this case a Mac Mini running OS/X and do the programming in the Netbeans IDE. The reason I chose Java is that it seems to be cross platform and it's not overly complex. 


However there does not seem to be a standard serial comms library in the Netbeans package. Most people seem to use a plug in called RXTX but I can't seem to find a way to install it that works. 


Now I am sure that other people must be doing this sort of thing every day. I am quite happy to abandon Java if there is something more suitable. Any suggestions...?





Link to post
Share on other sites

If you are familiar with Java, I'd recommend that you use Griffon - it uses the JVM and Groovy to make a nice IDE development environment. If you use Jetbrain's free IDEA community edition, you get the latest Groovy support as well, Netbeans appears to have been back-burnered by Oracle. 


The libraries are easy to get and use - if you just download the Arduino IDE, install it, right click on the Arduino IDE and choose Show Package Contents, in Contents/Resources/Java you'll find the library you need - librxtxSerial.jnilib and the necessary JAR file - RXTXcomm.jar 


You can check the architectures supported under Mac OS by typing


file librxtxSerial.jnilib


into the terminal window when in that directory. 


The examples on how to actually use the RXTX library are here:



Link to post
Share on other sites

Here's my project directory,


C code for msp430:


See serial.c


Python code for GUI:


See bldc_booster_api.py for serial comms portion

See bldc_booster_app.py for the GUI code


The bldc_booster.ui file is the design file from QT designer which is the run through a script to automatically create bldc_booster_ui.py


Link to post
Share on other sites

Possibly C# and Mono. I say possibly because since I do not use OSX, I am unsure of the support for mono on a Mac. Last I read however, Mono seemed to be very well supported in most (all?) Linux variants  Under windows however the .NET base class library has very easy to use communication classes. With all kinds of useful information all over the web.. There is no reason why mono should be any different( although I must admit to not having used mono).

Link to post
Share on other sites
  • 2 weeks later...

OTcom is QT-based logger & commander that is particularly designed to use the NDEF data formatting, as well as OpenTag filesystem & logger messages.  You can download the code from sourceforge, if you want to try a QT-based tool.


Personally, I think QT is alright.  If you are familiar with C/C++ development, it's probably better than any of the other options mentioned here, although there is still some learning curve.  If you don't care about Windows, you can just use POSIX & Std C (or C++), and then make the GUI in QT.  That will cover Linux, Mac, and even many devices (e.g. iOS, Android).

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...