serial configuration and 9 bit, mark, space and timming

22 views
Skip to first unread message

Aaron Lager

unread,
Feb 15, 2017, 6:02:08 PM2/15/17
to Pi4J
I've got a few questions about the serial interface that I couldn't figure out from the code and a request:

I'm trying to do 9 bit serial for industrial communications, m2m in some parlance's.
I see that 9 bit serial is not supported natively in pi4j (although it is in WiringPi), so I'm looking at using MARK and SPACE on the parity bit to set the 9th bit for the protocol I'm using.
The basics of the protocol are to set the 9th bit high (mark), for the first byte, to indicate an address and then set it low(space) for the rest of the payload bytes.

My questions are
1) If I'm going to attempt to toggle the MARK/SPACE bit, how will I know when the first  byte (or more generally, any byte) has been fully TXed before I re-config the SerialConfig object?  Or does it even matter?
2) The comments in the code state that not all *nixes support MARK/SPACE.  Does it work in raspberian jessie?
3) There is talk about high latency in the serial code:
     and 
     But these are about 4 years old, have these changes been incorporated?  The release notes do not indicate anything about this, so I'm assuming no.

Thanks for any light you can shed on this!
Aaron
Reply all
Reply to author
Forward
0 new messages