Commit Graph

47 Commits

Author SHA1 Message Date
Will Greenberg
38f8a78b60 Refactor QMDL and DiagReader for better testing
For the QMDL code, this mostly rewrites the structs to accept generic
types that implement Read and Write, which allows for better unit
testing. Also adds a bunch of unit tests.
2024-01-03 11:29:58 -08:00
Will Greenberg
ef42dfe99f diag_reader: raise parsing/hdlc error handling to caller
This'll let us unit test the reader more easily
2024-01-03 11:29:58 -08:00
Will Greenberg
0f2e4676e5 Refactor error types and add config file parsing
1. Main binary now parses a config toml and uses its paths for the
   output pcap and qmdl files
2. Previously we were relying on DiagDeviceError for several things
   that aren't a diag device. This modularizes that error in a way
   that both improves the error descriptions, and also allows for
   better separation of concerns.
2024-01-03 11:29:58 -08:00
Will Greenberg
59c0a9d944 Use QMDL instead of our custom debug file format
This might be a bit premature, but since we don't seem to be
experiencing any more parsing errors when reading MessagesContainers,
let's switch to outputting a standard QMDL (Qualcomm Mobile
Diagnostic Log) file. This file format is more widely used by tools
like scat, and the only data we lose out on is the container metadata
and non-UserData messages (which we weren't using anyway).
2024-01-03 11:29:58 -08:00
Will Greenberg
06efa2c114 diag_device: minor fixup 2024-01-02 16:14:10 -08:00
Will Greenberg
20c6e9bf09 diag: slightly improve logs 2023-12-22 12:13:57 -08:00
Will Greenberg
73ed01de62 gstmtap_parser: Add support for NAS messages 2023-12-22 12:13:57 -08:00
Will Greenberg
9fa8284343 Add integration tests for LTE RRC parsing 2023-12-22 12:13:57 -08:00
Will Greenberg
5128f468cf diag_reader: move error handling outside of trait 2023-12-22 12:13:57 -08:00
Will Greenberg
eed983daae diag_device: rm 0 byte read warning 2023-12-22 12:13:51 -08:00
Cooper Quintin
0f6020cc2d updating files to push to /data/wavehunter directory 2023-12-15 16:40:02 -08:00
Cooper Quintin
b91f4af0a7 Merge branch 'main' into gsmtap 2023-12-15 14:34:03 -08:00
Will Greenberg
85d8526829 diag_device: handle 0 byte reads 2023-12-15 13:21:40 -08:00
Will Greenberg
d1bb29f6c2 some minor cleanups, comments 2023-12-14 12:29:06 -08:00
Will Greenberg
f99d0897eb wavehunter and wavehunter-reader now output pcap files 2023-12-14 11:48:30 -08:00
Will Greenberg
fd5d01ad1f Switch to using log crate macros 2023-12-14 11:48:30 -08:00
Will Greenberg
d6266db1b9 Add GSMTAP parsing and PcapNg file writing 2023-12-14 11:48:30 -08:00
Will Greenberg
557de415d7 More reorganization, renamed to Wave Hunter 2023-12-13 16:51:55 -08:00
Will Greenberg
69d40a766a some renaming, reorganization 2023-12-13 16:51:55 -08:00
Will Greenberg
0187fa51e8 rename failsafe mode to debug mode 2023-12-13 16:51:55 -08:00
Will Greenberg
6cc22c3863 exit failsafe_reader if incorrect args are supplied 2023-12-13 16:51:55 -08:00
Will Greenberg
2504a1da2e add failsafe writer and reader 2023-12-13 16:51:55 -08:00
Will Greenberg
dffa76792e yet more read loop fixes 2023-12-12 15:03:12 -08:00
Will Greenberg
2e4d54928d maybe fix read loop? 2023-12-12 13:59:03 -08:00
Will Greenberg
e3e50b95e5 simplify packet reading a bit 2023-12-08 17:51:13 -08:00
Will Greenberg
978901b233 fix packet reading and leftover bytes checks 2023-12-08 16:38:23 -08:00
Will Greenberg
10bafc3faa fix hdlc ops 2023-12-07 18:49:39 -08:00
Will Greenberg
76555fe68c make hdlc operations work on slices 2023-12-07 17:20:22 -08:00
Will Greenberg
470a263593 better log parsing 2023-12-07 16:29:17 -08:00
Will Greenberg
9617ec3023 add logging crates 2023-12-07 16:29:05 -08:00
Will Greenberg
196eeba520 Parse log bodies 2023-12-06 15:19:52 -08:00
Will Greenberg
bdb12aba9e fixed log config stage, now getting actual logs 2023-12-05 18:41:35 -08:00
Will Greenberg
9dda8eb952 wip 2023-12-05 18:26:17 -08:00
Will Greenberg
be058507f1 wip 2023-12-05 18:11:17 -08:00
Will Greenberg
ccd9dfa2a7 appease clippy 2023-12-04 16:54:46 -08:00
Will Greenberg
e6fab5c27d log parsing 2023-12-04 16:47:42 -08:00
Will Greenberg
db18abae6f Mostly working now, except for log parsing and random checksum failures 2023-12-04 15:38:01 -08:00
Will Greenberg
7d55716104 logging enabled without qcsuper 2023-12-02 23:43:02 -08:00
Will Greenberg
0f534a0d11 slightly clearer server comment 2023-12-02 10:56:57 -08:00
Will Greenberg
f319ee8d70 add more comments 2023-11-15 11:07:08 -08:00
Will Greenberg
5bd2c3f653 various cleanups, fix client disconnect flow 2023-11-14 20:22:39 -08:00
Will Greenberg
3fc1b4d686 fix server 2023-11-14 19:20:58 -08:00
Will Greenberg
c02393a192 appease clippy 2023-11-09 22:37:09 -08:00
Will Greenberg
508b882d45 implement server 2023-11-09 18:50:16 -08:00
Will Greenberg
5da9aad0a8 refactor into a struct to prepare for tcp server 2023-11-09 15:06:21 -08:00
Will Greenberg
102fe8d10e minor nitpicks 2023-11-08 17:15:13 -08:00
Cooper Quintin
52c715f5f2 first commit 2023-11-08 15:19:47 -08:00