Re: [Twisted-Python] Reconnection to Serialport after connectionLost

2011-08-01 Thread Rene Klootwijk (klootwijk.org)
I will put some code on pastebin when I come home this evening. The Clientfactory class does not support serial port communication, does it? -- Rene Van: twisted-python-boun...@twistedmatrix.com [twisted-python-boun...@twistedmatrix.com] namens Laurens Van Houtve

Re: [Twisted-Python] Reconnection to Serialport after connectionLost

2011-08-01 Thread exarkun
On 08:06 am, r...@klootwijk.org wrote: >I will put some code on pastebin when I come home this evening. The >Clientfactory class does not support serial port communication, does >it? Rather, the serial port API does not support factories. Jean-Paul _

Re: [Twisted-Python] Reconnection to Serialport after connectionLost

2011-08-01 Thread Itamar Turner-Trauring
On Mon, 2011-08-01 at 01:37 +0200, Laurens Van Houtven wrote: > Have you tried ReconnectingClientFactory? The serial port API doesn't use factories, if I'm not mistaken. ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmat

Re: [Twisted-Python] Reconnection to Serialport after connectionLost

2011-08-01 Thread Laurens Van Houtven
Oh, right, serial. My mistake, sorry :) ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Reconnection to Serialport after connectionLost

2011-08-01 Thread Thorne, Stephen
Last I looked at this I had problems with the disconnection events not being propagated properly. I did, however, end up being able to write a system that would connect, disconnect and reconnect to usb serial devices that went away and came back again. So I'm sure it's possible. Can't access that

Re: [Twisted-Python] Reconnection to Serialport after connectionLost

2011-08-01 Thread Rene Klootwijk (klootwijk.org)
When I tried this more than a year ago (Twisted 10.x), the connectionLost event was not indeed propagated correctly. However, in version 11 the event is propagated correctly. -- Rene Van: twisted-python-boun...@twistedmatrix.com [twisted-python-boun...@t

Re: [Twisted-Python] Reconnection to Serialport after connectionLost

2011-08-01 Thread Thorne, Stephen
On Mon, Aug 1, 2011 at 13:21, Rene Klootwijk (klootwijk.org) wrote: > When I tried this more than a year ago (Twisted 10.x), the connectionLost > event was not indeed propagated correctly. However, in version 11 the event > is propagated correctly. Ah, good to hear. Thanks Stephen. __

Re: [Twisted-Python] Reconnection to Serialport after connectionLost

2011-08-01 Thread Rene Klootwijk
I have copied a code snippit to pastebin, http://pastebin.com/us4vL0bk This is what happens: When I break the connection, the connectionLost event is triggered and the connectionLost method of the protocol class is called. After a 5 second delay the serialport i

Re: [Twisted-Python] Reconnection to Serialport after connectionLost

2011-08-01 Thread Rene Klootwijk
I figured it out! I forget to set the speed of the serial port. Dumb , dumber, dumbest. From: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python-boun...@twistedmatrix.com] On Behalf Of Rene Klootwijk Sent: maandag 1 augustus 2011 18:21 To: 'Twisted general discussion' Subject: Re: