![]() ![]() Thing is, if you want to send stuff to a TCP-connected client in your serial-connected protocol, just pass to the protocol a reference to the factory, so you can use that reference to make the bridge. How do I make input on one connection result in output on another? ![]() Your problem is not about twisted, but about python. On our site contains the best Soviet drama movies Modern Russian Films in English. SerialPort(USBClient(), 'COM8', reactor, baudrate='19200') On you can watch The Island with English subtitles online. serial - the pyserial package to work with serial data. Reactor.listenTCP(8000, CommandRxFactory()) Twisted Mail Tutorial: Building an SMTP Client from Scratch. ![]() #Build command, if ok, send to serial port Print "outReceived! with %d bytes!" % len(data) #check & perhaps modify response and return to client Print "Data received! with %d bytes!" % len(data) I'm want to take dataReceived from client and send this to modem.I'm struggling to get this to work.Any help will be highly appreciated! the code: from twisted.internet import win32eventreactorįrom import SerialPortįrom import Protocol, FactoryĬlient_list = #TCP clients connecting to me I've managed to connect to usb modem and a client can connect via tcp to my reactor.listenTCP,the data received from modem will be send back to client. import serial ser serial.Serial (0) open first serial port print ser.portstr check which port was really used ser.write ('hello') write a string ser.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |