Menu

#20 How change the parity after crating a com2tcp

v1.0 (example)
open
nobody
3
2019-12-01
2017-02-27
alex
No

Hi everyone,Im programming in python and pyserial,and I' m using com2tcp to connecte 2 serial machines in a local network.
My data format is 11 bits as follow :1 start bit+8 data bit+ a "9th" bit (used for wake up) +1stop bit.
In my program ,i change parity value (space or mark) to set the 9th bit value.
On my serial device i must send a message with the 9th bit set at 1 to inform that next message will be a command message,then i must send a command with 9th bit set at 0.
on same machine,using local host,all is ok,but when i try on 2 different PC dosen't work.When I created the com2tcp redirection .I tried severals parity setting unsuccessfully.
1/after creating the virtual port connection,can i change the parity later?
2/Actually my programme can change the parity setting of physical com port.on virtual com,should it change virtual com parity in same way?
3/i have a pair COM10<->COM11 whan i change parity on COM10 (via my program),COM11 should change autolmaticly following COM10 setting?

thans for you help.

Discussion

  • alex

    alex - 2017-03-01

    or simply how use 9bits data format .

     
  • brian

    brian - 2019-12-01

    hey i'm not the dev, but i found out a way you can change com settings in windows by using the mode command. https://www.computerhope.com/modehlp.htm

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.