Thursday, November 17, 2005

RS232 Serial Communications In Java

How to use Java (javax.comm) for rs232 serial communications with Eclipse on WinXP

Download the package from: http://java.sun.com/products/javacomm/downloads/index.html

The zip contains a folder named commapi. Put this folder in eclipseplugins. In your project properties > add external jars, add comm.jar from eclipsepluginscommapi. The folder also contains a dll, you'll need to point to in the RUN setup. You can put the dll anywhere you like.

The important part is that [comm.jar] and [javax.comm.properties] are both in [eclipsepluginscommapi]. If they are anywhere else it will not work, and you will get the following errors: "Cannot find any ports", "No ports available", "No available ports".

{ "loggedin": false, "owner": false, "avatar": "", "render": "nothing", "trackingID": "UA-36983794-1", "description": "", "page": { "blogIds": [ 348 ] }, "domain": "holtstrom.com", "base": "\/michael", "url": "https:\/\/holtstrom.com\/michael\/", "frameworkFiles": "https:\/\/holtstrom.com\/michael\/_framework\/_files.4\/", "commonFiles": "https:\/\/holtstrom.com\/michael\/_common\/_files.3\/", "mediaFiles": "https:\/\/holtstrom.com\/michael\/media\/_files.3\/", "tmdbUrl": "http:\/\/www.themoviedb.org\/", "tmdbPoster": "http:\/\/image.tmdb.org\/t\/p\/w342" }