Got those baud rate blues
Pyrotom
Posts: 84
Why did I decide to work with the Javelin Stamp? Because I'm a Java guy, that's why! So I was understandably a little disappointed when all of the sample code for communicating with the Javelin through the JavelinIDE port was in C++ (and Pascal??). When I complained a little about this, Peter Verkaik posted a rough cut at a Java version of his terminal program (thanks, Peter!).
So I started from that - it looked easy enough - all I had to do was add the code to use the javax.comm package to open a serial port at 28.8K, 8 bits, 1 stop bit, no parity. I'd used the javax.comm package before and didn't expect any problems. Wrong! Attempting to open the serial port throws an UnsupportedCommOperationException with the message "Unsupported baud rate".
The serial port can clearly do 28800 baud rate, since the JavelinIDE does it, so I started poking around. Disassembling the Win32SerialPort class in javax.comm, I found that the check the requested baud rate against a table with 75, 110, 134, 150, 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200. Uh, oh.
So I go to the Sun website to see if there is maybe an update. Much to my surprise, I find that there is indeed a new 3.0 version of javax.comm, but not for Windows. As a matter of fact, there is now NO version of javax.comm available for windows!
So at the moment, I'm SOL. The Javelin chip does not support the MIDI baud rate of 31.25K needed for one of my projects, and the only baud rate it supports for the JavaIDE port is not supported by javax.comm, thus stopping my other project. Sigh. Just got them old baud rate blues...
So I started from that - it looked easy enough - all I had to do was add the code to use the javax.comm package to open a serial port at 28.8K, 8 bits, 1 stop bit, no parity. I'd used the javax.comm package before and didn't expect any problems. Wrong! Attempting to open the serial port throws an UnsupportedCommOperationException with the message "Unsupported baud rate".
The serial port can clearly do 28800 baud rate, since the JavelinIDE does it, so I started poking around. Disassembling the Win32SerialPort class in javax.comm, I found that the check the requested baud rate against a table with 75, 110, 134, 150, 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200. Uh, oh.
So I go to the Sun website to see if there is maybe an update. Much to my surprise, I find that there is indeed a new 3.0 version of javax.comm, but not for Windows. As a matter of fact, there is now NO version of javax.comm available for windows!
So at the moment, I'm SOL. The Javelin chip does not support the MIDI baud rate of 31.25K needed for one of my projects, and the only baud rate it supports for the JavaIDE port is not supported by javax.comm, thus stopping my other project. Sigh. Just got them old baud rate blues...
Comments
http://students.spsu.edu/gear/files/gear_javelin_experience.doc
regards peter
regards peter
Once you have the·baudrate you can filter out the metadata easily.
regards peter
javax 28800 baud
http://www.mit.edu/afs/net/dev/user/foley/share/java/commapi/samples/SerialDemo/SerialDemo.java
There were more results. Try it.
regards peter
regards peter
the attached code. Just replace the Javelin send and receive by your
API send and receive. To send bytes you must fill up the array cmdbuf
and when the array is filled with a command, make cmd true.
The receive state machine will send the bytes from cmdbuf to the javelin
once the javelin requests data. Once cmdbuf is emptied, cmd is set false.
regards peter