I am currently implementing Slot accounting system to interface with Slot machines using SAS602. This protocol uses non Standard 9-bit protocol for Serial communication. So the data is 1 start bit + 8 data bit+ 1 stop bit + 1 wake up bit( parity bit in my case)
The slot machine identifies the address byte and data byte based on wake up bit. If it is set then the byte is address and cleared then it is data byte.
It is also mentioned in the protocol where 9 bit support is not available it recommended to use Mark/space parity. I am on Java with jserialcom and managed to established connection with the slot machine and read data. However I am unable to differentiate between data and address byte because with jserialcomm library readbytes strips the raw data and provides me only the data byte. I have no access to parity bit state.
Is it possible to get the raw 11-bit data with Java? Is it even possible? If so how do I go about doing it?
I am open any library or Linux platform.
I ended by modifying the Jserialcomm library to ignore parity checking when receiving data and set the parity bits when transmitting data. The error checking on received data is based solely on CRC. This works fine so far.
Although the above could be achieved by setting NO_PARITY on received data. MARK and SPACE Parity when sending bytes. When switching parity with Jserialcomm library because there is a delay of 200ms when setting parity. This again results in loss of data. I am not entirely sure why there should be such a delay.
There is also option in the Linux to add 255 0 to every single byte received whenever there is an error after parity checking. This could be applied reversing the parity checking mechanism. But this method is also prone to error because adding extra bytes takes time and you might end up loosing a lot of data. This also requires modification to Jserialcomm library.