Click here to Skip to main content
15,889,651 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Below is code snippet from program I got from ex-coworker. It's to do serial port tx/rx for verifying serial port. Now, I've got a request to add cts/rts control on the test. What are the parameter(s) I should add to control string "9600,n,8,1,n"?
JavaScript
this.serialService = GREUtils.XPCOM.getService("@firich.com.tw/serial_port_control_win;1", "nsISerialPortControlWin");
// ......
  rv = serialService.openPort(comport, "9600,n,8,1,n");
Posted

 
Share this answer
 
Comments
Stan Huang 9-Feb-15 1:33am    
It seems not fitting my question.
I changed "9600,n,8,1,n" to "9600,n,8,1,h" and it works fine, able to test cts/rts & dtr/dsr. The last character of "9600,n,8,1,n" is used to turn on/off H/W flow controls, including cts/rts & dtr/dsr. 'n' means no control, 'h' means HW controls ON.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900