Fazecast / jSerialComm

Platform-independent serial port access for Java
GNU Lesser General Public License v3.0
1.34k stars 287 forks source link

All baudrates become 9600 on Mac OSX for some devices #14

Closed svnhub closed 9 years ago

svnhub commented 9 years ago

We're in the process of switching one of the programs at my workplace from RXTX (because it is insane) to jSerialComm (because it seems nice) and so far it works beautifully in both Windows and Linux. However, it seems that no matter what we set the baudrate to on Mac it remains at 9600. Reading and writing to a 9600 baudrate device works fine regardless of what we ask jSerialComm to use, so it looks like everything else apart from setting the baudrate is fine.

A bit of Google-fu turns up this related chrome issue: http://code.google.com/p/chromium/issues/detail?id=337482 It is a very similar setup (we're also using a USB<->serial chip, in this case the Arduino Uno r2) and it looks like IOSSIOSPEED could be resetting the speed to 9600 because it may be unsupported with the driver used for this board.

hedgecrw commented 9 years ago

Thanks so much for the bug report (and the background research!)...I will definitely check into this. I usually try to get these things taken care of as quickly as possible once I'm alerted to them; unfortunately, I'm in the middle of a huge workload at the moment, so it may take a couple of days. Sorry for the delay, but thanks for your patience.

svnhub commented 9 years ago

No worries at all! There is no hurry

hedgecrw commented 9 years ago

Alright, thanks to the Google bug report you attached, I was able to go ahead and implement the same fix they did (namely, try to set the baud rate using a Mac rate code, and if that fails, try to pass the baud rate directly to the underlying driver). Please test the following library version, and report back if it appears to be working for your problem:

https://dl.dropboxusercontent.com/u/3274122/jSerialComm-1.3.7.jar

If so, I'll close the bug. Thanks!

svnhub commented 9 years ago

Works like a charm - Awesome!

hedgecrw commented 9 years ago

Fixed in Version 1.3.7.