Commit Graph

29 Commits

Author SHA1 Message Date
Vadim Yanitskiy dbb66828ef SEDbgMuxApp: add a command for terminating connections 2022-06-30 19:57:04 +07:00
Vadim Yanitskiy c81e0e2ad8 SEDbgMuxApp: employ DbgMuxFrameDisp, implement basic handlers 2022-06-30 19:57:04 +07:00
Vadim Yanitskiy 91abeb7220 DbgMuxConnHandler: implement DbgMuxConnInteractiveTerminal 2022-06-30 19:57:04 +07:00
Vadim Yanitskiy c58e7e3f07 DbgMuxConnHandler: implement DbgMuxConnUdpBridge 2022-06-26 00:27:56 +07:00
Vadim Yanitskiy af18b58e1f Implement the concept of the frame dispatcher and handlers 2022-06-26 00:27:56 +07:00
Vadim Yanitskiy 05c71259f6 DbgMuxPeer: spawn two threads for handling Rx/Tx messages 2022-06-24 20:02:07 +07:00
Vadim Yanitskiy 2990cc14b8 SEDbgMuxApp: use non-zero default serial port read timeout
This is required for a follow-up change moving DebugMux I/O handling
into separate threads.  We need to be able to stop a thread, which
is executing blocking self.io.read() call.
2022-06-20 22:36:17 +07:00
Vadim Yanitskiy f9759d1024 Transport: mark abstract methods with @abc.abstractmethod 2022-06-20 18:48:17 +07:00
Vadim Yanitskiy 138af0da7a DbgMuxPeer: calculate and check the FCS of Rx frames 2022-03-29 00:24:17 +03:00
Vadim Yanitskiy e71875aa12 DbgMuxPeer: get away from using construct's parse_stream() 2022-03-29 00:24:02 +03:00
Vadim Yanitskiy 45548e0a3e TransportModem: raise TransportIOError exception on I/O error 2022-03-28 04:44:31 +03:00
Vadim Yanitskiy ea6018b822 TransportModem: properly ignore the modem events like '*EMRDY'
Ericsson's mini-PCIe modems are known to send such events.
2022-03-28 02:26:50 +03:00
Vadim Yanitskiy 9034073630 SEDbgMuxApp: separate modem transport into its own module 2022-03-28 01:19:58 +03:00
Vadim Yanitskiy 37426267f4 SEDbgMuxApp: fix do_ping(): ACKnowledge Pong message 2022-03-28 01:03:37 +03:00
Vadim Yanitskiy 88553524a3 DbgMuxFrame: add tentative FlowControl message definition 2022-03-27 22:54:47 +03:00
Vadim Yanitskiy 7c2094dc44 DbgMuxPeer: use %03u for logging Rx/Tx counter values
This makes the header length consistent in logging messages.
2022-03-27 22:51:52 +03:00
Vadim Yanitskiy 45788b2783 cosmetic: switch to consistent four-spaces indent (using autopep8) 2022-03-27 22:50:30 +03:00
Vadim Yanitskiy 79c2124e0c Add requirements.txt listing all dependencies 2022-01-21 02:08:58 +06:00
Vadim Yanitskiy d1310b4628 Mark sedbgmux.py as executable 2022-01-21 01:48:30 +06:00
Vadim Yanitskiy 1f57d3dd4a SEDbgMuxApp: fix C0325: unnecessary parens after 'assert' keyword 2022-01-19 00:38:28 +06:00
Vadim Yanitskiy 712c2b79e5 DbgMuxPeer: encode/decode inner messages in send()/recv() 2022-01-18 16:22:54 +06:00
Vadim Yanitskiy ba66506052 DbgMuxFrame: add complete inner message definition 2022-01-18 16:22:54 +06:00
Vadim Yanitskiy 0f7605b189 SEDbgMuxApp: disable DebugMux commands while not connected 2022-01-18 16:22:54 +06:00
Vadim Yanitskiy 1c9a74c1e0 SEDbgMuxApp: group commands into cmd2 categories 2022-01-18 16:22:54 +06:00
Vadim Yanitskiy ee4731aad7 SEDbgMuxApp: add a command to show connection info 2022-01-18 16:22:54 +06:00
Vadim Yanitskiy e09c227661 SEDbgMuxApp: handle ConnEstablished with DPRef=0xffff
This format string found in firmware image of a modem:

  DebugMux[DL,HandleConnectReq] Could not find DPRef 0x%04X;
                                sending Connect Response with ConnRef=0xFFFF

gives us a hint on what happens when ConnEstablish message contains
an unknown DPRef that was not announced or has became inactive.
2022-01-18 16:22:54 +06:00
Vadim Yanitskiy 4d19f594c3 Initial DebugMux client application 2022-01-18 16:22:54 +06:00
Vadim Yanitskiy 97cd6fb4d3 Initial DebugMux protocol definition 2022-01-18 16:22:54 +06:00
Vadim Yanitskiy 3d37f3e261 Initial commit 2022-01-18 16:22:54 +06:00