samedi 28 février 2015

Simple java serial port library for windows

For a while I am trying to get serial(com) ports working in java on windows. I got it working on the raspberry pi with the pi4j no problem, but windows is a bit more difficult. I found stuff like javax.comm and RxTx, but in both cases they require for me to paste files in places like system32 or java installation folder which is messy. As for the example of javax.comm not working (where I have yet to determine why) I really dislike the way those libraries work. I need to write some code for some friends, and I can't have them go around paste files in system folders. Is there a simple jar+native dll solution for this problem?


P.S. I managed to write to serial ports in windows by just opening the file "com1" but that works only when writing, and when the com port is 1-9, com10 doesn't work anymore. Also reading blocks the program indefinitely.


Aucun commentaire:

Enregistrer un commentaire