Vadim Yanitskiy
23b560197f
DbgMuxConnHandler: new abstract class for connection handlers
2023-01-22 22:34:42 +06:00
Vadim Yanitskiy
2b0342d29b
DbgMuxPeer: spawn two threads for handling Rx/Tx messages
2023-01-18 01:44:38 +06:00
Vadim Yanitskiy
cf22e4a697
sedbgmux-shell.py: print all logging messages with CR
...
Let the logging messages overwrite the cmd2 prompt!
2023-01-18 01:44:35 +06:00
Vadim Yanitskiy
55665460b8
sedbgmux-shell.py: enable cmd2.debug if -v is passed
2023-01-17 03:15:28 +06:00
Vadim Yanitskiy
1269ebc098
sedbgmux-shell.py: do not employ ArgumentDefaultsHelpFormatter
2023-01-17 02:53:23 +06:00
Vadim Yanitskiy
efaaaa1a7d
sedbgmux-shell.py: cosmetic: use lowercase in help strings
2023-01-17 02:29:53 +06:00
Vadim Yanitskiy
2557e130f6
sedbgmux-shell.py: remove unneeded import of enum
2023-01-17 02:22:11 +06:00
Vadim Yanitskiy
b8b4f4838d
DbgMuxPeer: fix recv(): Ack shall not increment Nr counter
...
I was aware that sending an Ack shall not increment the Ns counter,
but somehow didn't take into account that the Nr counter shall not
be incremented on receipt of an Ack either.
2023-01-16 22:12:03 +06:00
Vadim Yanitskiy
7eb8444912
sedbgmux-shell.py: add -v/--verbose for debug logging
2023-01-16 22:10:34 +06:00
Vadim Yanitskiy
d0ba77eb00
Add dump samples for F3607gw, F5521gw, and SE K800i
2023-01-16 13:53:53 +06:00
Vadim Yanitskiy
e0538ea1c3
sedbgmux-dump.py: automatic dump format detection
2023-01-16 13:53:53 +06:00
Vadim Yanitskiy
a378018178
sedbgmux-dump.py: add support for parsing socat hexdumps
2023-01-16 13:53:53 +06:00
Vadim Yanitskiy
4c8c1a1734
sedbgmux-dump.py: new tool for managing DebugMux dumps
2023-01-16 13:53:53 +06:00
Vadim Yanitskiy
56b0ad8e6e
Implement optional dumping of DebugMux frames to file
2023-01-16 13:53:25 +06:00
Vadim Yanitskiy
5b2c57422d
DbgMuxIO: separate modem I/O into its own file
2023-01-16 13:53:25 +06:00
Vadim Yanitskiy
ca57d7c6c5
Rework project hierarchy: group core files into a module
2023-01-14 21:58:19 +06:00
Vadim Yanitskiy
a806eea9ad
DbgMuxIO: drop unused 'opts' argument of connect()
2023-01-14 02:59:57 +06:00
Vadim Yanitskiy
f9d571ee70
Rename Transport[Modem,IOError] to DbgMuxIO[Modem,Error]
2023-01-14 02:59:17 +06:00
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
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