running on WinPC + comunication via USB

M

martin.nkm

Hello, I have two questions.
1/ If I want to use Python and let my WinPC communicate via RS-232
with external embedded computer I know there is a pyserial module,
which I can use it. But what will happen if I want to replace RS-232
by USB? I know I can have virtual COM port, but all the configuration
parameters basically refer to RS-232 parameters - baudrate, bits,
stopbits, parity. In case of USB that's a nonsense I think. Does
anybody know?
2/ Second is a basic question. Do I need also cygwin running on my
Windows PC to get running Python scripts? Or is that Python
interpreter (Win executable) self efficient? Thanks.
 
D

Diez B. Roggisch

Hello, I have two questions.
1/ If I want to use Python and let my WinPC communicate via RS-232
with external embedded computer I know there is a pyserial module,
which I can use it. But what will happen if I want to replace RS-232
by USB? I know I can have virtual COM port, but all the configuration
parameters basically refer to RS-232 parameters - baudrate, bits,
stopbits, parity. In case of USB that's a nonsense I think. Does
anybody know?

Depending on the setup - no, it's the exact same thing. If e.g. the
usb-device is a usb2serial converter or otherwise offers it's serveces
as a serial-like device, it should work.

Additionally, there is libusb + a python-wrapping for that.
2/ Second is a basic question. Do I need also cygwin running on my
Windows PC to get running Python scripts? Or is that Python
interpreter (Win executable) self efficient? Thanks.

No cygwin needed. In fact you need to be careful *not* to mix python and
cygwin-python. They can happily co-exist - but installing
3rd-party-packages for one doesn't imply they are available for the other.

Diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top