Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create COM-port in python on windows

I'm trying to create a serial port in python. I'm going to use it to communicate with another program that is communicating via a serial port. the PySerial package seems fine but I can't get it working. I've looked eveywhere and every implementation is for linux. Can anyone help me create a COM port on windows and read/write to it?

like image 705
SnelleJelle Avatar asked Sep 20 '26 20:09

SnelleJelle


1 Answers

It is not possible to create a serial port in Python, because you need a special driver for this task. You can only call 3rd party utility (with the drivers) that will do it for you.

I would recommend to try the following utilities:

Com0Com: http://sourceforge.net/projects/com0com/

Virtual Null Modem: http://www.virtual-null-modem.com/

like image 162
Helen Downs Avatar answered Sep 22 '26 08:09

Helen Downs



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!