Serial & reset of the device

yorick yorick.brunet at gmail.com
Thu Jul 7 15:34:39 EDT 2011


Hello,

I'm trying to access a hardware board of my company through a serial
connection using a Python script and the pyserial module.

I use Python 2.7.1 with Ubuntu 11.04 (pyserial is the package python-
serial with version 2.5.2, http://pyserial.sourceforge.net/pyserial_api.html).

The board to which I'm trying to connect works correctly with serial
as some other guys did some TCL scripts to manage it.
My problem is that every time I open a new connection, the device is
reset. I'd like to not have the device reset.

The code is the following :

handler = serial.Serial(port=self.portname, baudrate=9600,
bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stHello,

I'm trying to access a hardware board of my company through a serial
connection using a Python script and the pyserial module.

I use Python 2.7.1 with Ubuntu 11.04 (pyserial is the package python-
serial with version 2.5.2, http://pyserial.sourceforge.net/pyserial_api.html).

The board to which I'm trying to connect works correctly with serial
as some other guys did some TCL scripts to manage it.
My problem is that every time I open a new connection, the device is
reset. I'd like to not have the device reset.

The code is the following :

handler = serial.Serial(port=self.portname, baudrate=9600,
bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE, timeout=None, dsrdtr=False)
# here the device is reset ...

handler.close()


I found the following post http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274205532
but I haven't tested it yet as I don't like the idea to change files
managed by the system (and it is for Windows).

Is there any possibility to not reset the device when opening the
connection ?

Thanks,
Yorickopbits=serial.STOPBITS_ONE, timeout=None, dsrdtr=False)
# here the device is reset ...

handler.close()


I found the following post http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274205532
but I haven't tested it yet as I don't like the idea to change files
managed by the system (and it is for Windows).

Is there any possibility to not reset the device when opening the
connection ?

Thanks,
Yorick



More information about the Python-list mailing list