Commit Graph

15 Commits

Author SHA1 Message Date
Vadim Yanitskiy cb24ec5a2d Rename sedbgmux.py to sedbgmux-shell.py 2023-01-14 02:52:00 +06:00
Vadim Yanitskiy 569e5d3e9c SEDbgMuxApp: use cmd2.Fg instead of deprecated cmd2.fg
In v2.3.0 both cmd2.{fg,bg} have been deprecated in favour of cmd2.{Fg,Bg}.
In v2.4.0 both cmd2.{fg,bg} have been removed.

See https://github.com/python-cmd2/cmd2/blob/master/CHANGELOG.md
2022-07-14 18:25:45 +07:00
Vadim Yanitskiy 530975eff2 SEDbgMuxApp: properly handle peer.recv() returning None
In 2990cc14b8 I introduced a regression,
which affects the 'establish' command: if no data is received from a
Data Provider during 500 ms, the application crashes:

    File "sedbgmux.py", line 151, in do_establish
      if f['MsgType'] != DbgMuxFrame.MsgType.ConnData:
  TypeError: 'NoneType' object is not subscriptable

This is happening because peer.recv() is returning None.
2022-07-14 17:55:29 +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 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 45788b2783 cosmetic: switch to consistent four-spaces indent (using autopep8) 2022-03-27 22:50:30 +03: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 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