|Re: RS232 [message #1791622 is a reply to message #1791581]
||Tue, 03 July 2018 06:19
| Jose Maria Jesus Cabral Lassalle
Registered: February 2016
The PARAMS data input is not only the name of the interface, but an array of strings like this:
raw.ser[INTERFACE_NAME, BAUD_RATE, BYTE_SIZE, STOP_BITS, PARITY]
INTERFACE_NAME: is the name of the file that will be use.
BAUD_RATE: Just a number according to the connection
BYTE_SIZE: Byte size of the connection
STOP_BITS: 1 for one bit, 2 for two bits, 3 for one comma five bits
PARITY: 0 for no parity, 1 for odd parity, 2 for even parity, 3 for mark parity (only windows), 4 for space parity (only windows)
So, an example could be:
raw.ser[/dev/ttyS0, 115200, 8, 1, 1]
which will use the /dev/ttyS0 inteface, 115200 as baud rate, 8 bits byte, 1 stop bit and odd parity.
Powered by FUDForum
. Page generated in 0.02284 seconds