views:

135

answers:

1

Does java's javax.comm library support "9-bit" serial communication? (use of parity bit or "address bit" as an out-of-band signaling mechanism for framing information)

Does the win32 communications API support it?

I'm guessing the answer is no on both counts, but figured someone has more experience with this than me.

+1  A: 

The win32 comm API does not support this as far as I can tell.

However, you can simulate it using the various parity modes.

Setting MARKPARITY will set the 9th bit to 1

Setting SPACEPARITY will set the 9th bit to 0

I can't say about the java version of the library, but I'm sure it supports setting parity modes so you can do the above and get your 9th bit.

karoberts
That's for sending -- what about receiving?
Jason S
(and i'd have to do it on a per byte basis... ugh... looks like it would be easier just to use base64 encoding to leave room for out of band information.)
Jason S
yeah, it isn't pretty if you have to change it for every byte. It should work for sending and receiving though
karoberts