Dear Lucas I realy appreciate your pastebin On 12/22/2011 01:12 PM, Lucas Taylor wrote: > > > ...and an update to your pastebin that may be helpful for context: > http://pastebin.com/2EJ22wXa > When I first try to adapt your script, there is error complaining about that "serial" have no "setParent" attribute/methode. Next I found your enlightment at http://www.mentby.com/lucas-taylor/serialport-protocol-as-a-service.html
So here is my adaptation at http://pastebin.com/79qi3TfK currently I just commented the line that send xmpp, I just want to make sure that the serial communication is working well. When there ls line comming via serial line, the script just work as told : ---from the log file ---- 2011-12-23 09:31:29+0700 [-] Line Received from Arduino: This is arduino 2011-12-23 09:31:31+0700 [-] Line Received from Arduino: This is arduino 2011-12-23 09:31:33+0700 [-] Line Received from Arduino: This is arduino 2011-12-23 09:31:35+0700 [-] Line Received from Arduino: This is arduino 2011-12-23 09:31:37+0700 [-] Line Received from Arduino: This is arduino 2011-12-23 09:31:39+0700 [-] Line Received from Arduino: This is arduino 2011-12-23 09:31:41+0700 [-] Line Received from Arduino: This is arduino ----------------------------- The problem is when there is msg coming from XMPP part It's received by the xmpp client part, but script complaining about 'SerialPort' object has no attribute 'transport' I tried to send text from another xmppclient (pidgin) ---from the log file ---- 2011-12-23 09:31:29+0700 [XmlStream,client] <<<<>>>>>>> 2011-12-23 09:31:29+0700 [XmlStream,client] 2011-12-23 09:31:29+0700 [XmlStream,client] DDDDooooooohhhhh 2011-12-23 09:31:29+0700 [XmlStream,client] 2011-12-23 09:31:29+0700 [XmlStream,client] <<<<>>>>>>> 2011-12-23 09:31:29+0700 [XmlStream,client] 2011-12-23 09:31:29+0700 [XmlStream,client] Unhandled Error ------------------------------ ----And the traceback is------- File "./mytac01.tac", line 42, in onMessage self.serial.transport.write('some message\n') exceptions.AttributeError: 'SerialPort' object has no attribute 'transport' -------------------------------------- ----Line 42 is ---- self.serial.transport.write('some message\n') --------------------- I tried to google with the error msg as keyword ... mostly about Serial port loosing connection. In my case , the serial port still have it's connection ..... since the arduino msg still coming Sincerely -bino- _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python