I am communicating with a protocol thats uses 1 start bit, 8 data bit, 1 address/data bit and 1 stop bit (No parity). The address/data bit is used to identify the start of a frame In the first byte, in each frame the address/data is 1. The rest of the bytes in the frame is 0.
In the protocol specification, it says: “A great number of single chip micro processors from various manufactures are able to detect this address/data bit”
How/can I detect this address/data bit in Linux?
Linux dosnt support 9 data bit as standard. I have tryied pretending that the address/data bit is a parity bit instead. To make this work i would have to use Mark or Space parity. Im having a really hard time making space and mark parity work in my program. I know that Linux have implementet the command CMSPAR (termios.h), but it dosnt work very well with me.
It could really help if someone posted a code example, using space/mark parity. Also a list of what files and what there should be in them so I can use this parity.
// make sure port is closed
CloseAdrPort();
// make sure RTS is low
dropRTS();
com1 = open(com1navn, O_RDWR | O_NOCTTY | O_NDELAY);//| O_NONBLOCK |
if (com1 < 0)
{
printf("Open error com %d %s