![]() ![]() Correlate the information received on command port for ttyUSB0 & ttyUSB1 for modem1, and similarly for the other pair for modem2 ? Note that each modem has it's own state-machine (device-state and connection-state).How/where do I accept CLI input from user, that then triggers sending a set of AT command to the modems ?. ![]() However, I am at loss, as to how do I do the following: Here is a rough skeletal program of what I understand as the potential approach (based on single port examples): class CommandProtocol(LineOnlyReceiver):Ĭlass DiagnosticProtocol(LineOnlyReceiver):ĬmdPort = SerialPort(CommandProtocol, "/dev/ttyUSB0", reactor, 115200)ĭiagPort = SerialPort(DiagnosticProtocol, "/dev/ttyUSB1", reactor, 115200)ĬmdPort = SerialPort(CommandProtocol, "/dev/ttyUSB3", reactor, 115200)ĭiagPort = SerialPort(DiagnosticProtocol, "/dev/ttyUSB4", reactor, 115200) The diagnostic information should lead to a state-machine (device-state, connection-state) to be modified. While most of the command/response exchanges with modem is via the command-port, there are few diagnostic information that are available only via the diagnostic-port, for each modem. Communication with modems is using Hayes AT command set. What I am trying to do is open 2 pairs (i.e. However, I can't (yet) write a twisted program that can read & write from multiple serial ports, especially where the protocol involves reading single or multiple lines, and writing back to the device accordingly. Going through the twisted finger tutorial and seen the SO questions: ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |