Sunday, December 18, 2016

Windows Serial communication

http://forum.arduino.cc/index.php?topic=18371.0

"
You can bypass the DTR reset issue with the Arduino on PySerial by editing the serialWin32.py file in the python directory. It's usually located in lib\site-packages\serial.

Delete the compiled version of the file (serialWin32.pyc) and then edit the serialWin32.py file, changing the line that reads:
self._dtrState = win32.DTR_CONTROL_ENABLE
to:
self._dtrState = win32.DTR_CONTROL_DISABLE

This should now open the serial port without altering the DTR state.

I created a new module by copying the serial directory and renaming it serialArduino. That way, I could change my import serialArduino as serial without affecting other applications that might be expecting the serial module to operate with dtrState = DTR_CONTROL_ENABLE

"

No comments:

Post a Comment