[Twisted-Python] Question : Combining wokel XMPP and twisted.internet.serial

bino oetomo bino at indoakses-online.com
Wed Dec 21 23:52:32 EST 2011


Dear All ..

A year ago, I need send some defined message to a jabber conference.
The message content will depend on a "button-press".
My trick is to use ttyctrl (http://ttyctrl.sourceforge.net/).

So basicaly my "system" is builded from several parts:
1. TTYCTRL : I made some small python XMLRPC client script, that will 
send a msg to my local twisted server
2. Twisted server, contain :
a. an XMLRPC server
b. XMPP Client ... use to send msg to remote jabber conference room

I made a pastebin of that twisted script at : http://pastebin.com/iSRVZNwS

With that script the flow alway one-way only :
serial====>Twisted_XMLRPC--->Twisted_XMPP=====>Jaber

Now I need to do something different, since it's hard to find a Board 
with RS232 onboard.
I Need to replace TTYCTRL with Arduino MCU.
Arduino will Send serial data to my PC.
So I'll need my twisted to able to receive data via serial
There will also incoming XMPP msg from Jabber that will need to be send 
to arduino via Serial port.

so the flow will be like :
serial<====>Twisted_Serial<--->Twisted_XMPP<=====>Jaber


My question is, How to make :
1. twisted.internet.serial to send data via an instance of XMPP client ? and
2. my EchobotProtocol.onMessage (see pastebin), to write data to the 
same serial port used by Point#1 above.



Sincerely
-bino-





More information about the Twisted-Python mailing list