Closed zxy243153431 closed 2 years ago
parameters can be changed with setParameters repeatedly when the connection is open, e.g. tested here. maybe you have to wait until old data is fully read/written
parameters can be changed with setParameters repeatedly when the connection is open, e.g. tested here. maybe you have to wait until old data is fully read/written
i tried and it runs success! thank you very much.
my project neet to change these two attribute when in data communication. For example : port.setParameters(9600, 8, UsbSerialPort.STOPBITS_1, UsbSerialPort.PARITY_EVEN); ...write some data port.setParameters(9600, 8, UsbSerialPort.STOPBITS_2, UsbSerialPort.PARITY_NONE); ...write some data ...read bytes port.setParameters(9600, 8, UsbSerialPort.STOPBITS_1, UsbSerialPort.PARITY_EVEN); .....write some data ....read bytes
i wrote code like this ,but the result not working as expected. i want to ask how can i do that stopbit and PARITY can be changed in data communication.