Commit Graph

88 Commits

Author SHA1 Message Date
Eric Wild acb80088b3 allow specifying gsmtap dest ip
This allows distinguishing multiple modems by specifying another
loopback ip i.e. -i 127.0.0.4
Linux has a default local route for 127.0.0.0/8 so it "just works".
2020-12-09 04:27:20 +01:00
Eric Wild 4846c50521 properly init logging, implicitly used by errors 2020-12-09 04:09:38 +01:00
Eric Wild 700ed13d11 fix build with clang 11
10 complains about different symbol sizes, 11 fails to build and link.
2020-12-09 03:07:09 +01:00
Eric Wild 58111310e6 add rat tracking so we don't get duplicate nas/rrc messages for != 2G 2020-05-12 17:03:50 +02:00
Eric Wild a8ea2dc983 v#1 2020-05-11 19:15:00 +02:00
Harald Welte cb5d8473d7 move variable declarations out of the 'for' loop
this fixes compilation with gcc-4.8
2017-01-24 17:36:39 +01:00
Harald Welte c17070464f add missing gprs_l1.c file 2017-01-24 17:09:26 +01:00
Harald Welte 7c5858ec43 diag_msg: Mark dispatch table as 'const' 2017-01-22 00:01:58 +01:00
Harald Welte 3710dcc1eb Add support for DIAG EVENT reporting 2017-01-21 23:53:15 +01:00
Harald Welte cf854caa9b diag_msg: Don't replace second character of every msg with 'p'
We want to replace all %s with %p, but not modify other parts of the
format string...
2017-01-21 11:22:44 +01:00
Harald Welte 70ff72d5f4 fix various compilation warnings all over the code 2017-01-21 11:20:07 +01:00
Harald Welte 1570b9f38b decode L2 channel type 2017-01-21 11:15:50 +01:00
Harald Welte 0512d9d266 decoder for RLC-EPDAN, MDSP-CMD, L2-STATE and L2-TRANSM-STATUS 2017-01-21 11:01:45 +01:00
Harald Welte 0442fead33 Enable + Interpret more GPRS related logging
Those logging groups are not present on all firmwares/devices.  Best
success for GPRS low-layer logging so far with an old Gobi2000 card from
Lenovo.
2017-01-20 12:04:10 +01:00
Harald Welte fe53544440 gprs: handle RLC uplink/downlink ack/nack params 2017-01-11 11:22:51 +01:00
Harald Welte 7b113a2d33 WIP: More WCDMA/RRC decoding 2017-01-09 21:34:03 +01:00
Harald Welte 280bb05a61 diag_log_gprs_rlc.h: More log message definitions 2017-01-09 16:00:10 +01:00
Harald Welte 5162dd59fa Add (E)GPRS MAC ACK/NACK log support 2017-01-09 15:15:54 +01:00
Harald Welte 65dd71cfa8 diag_log_gprs: Cosmetic change in re-ordering the log_dispatch_tbl 2017-01-09 15:15:46 +01:00
Harald Welte 00749515ef add LLC XID information decode 2017-01-09 14:58:41 +01:00
Harald Welte 35d5f5bf6e add missing diag_dpl.h to repo 2017-01-09 14:35:48 +01:00
Harald Welte 4e5338bc49 WIP: SIM Card logging
I'm getting related messages from the modem, but I somehow cannot decode
the traces so far at all :/
2017-01-08 16:04:47 +01:00
Harald Welte 9e02b556d7 fix diag_umts_rrc_chtype and add more diag_log_code_wcdma 2017-01-08 16:04:47 +01:00
Harald Welte 78b8bda6f6 fix gen_log_config_set_mask()
We were missing the last byte in the log config mask, resulting in
unintended behavior.
2017-01-08 16:04:47 +01:00
Harald Welte 7e6d71ea74 also log config request/response messages via GSMTAP 2017-01-08 16:04:47 +01:00
Harald Welte b8a70980b6 patch %s out of format strings received from phone
%s can obviously not work, as we have no access to the targets memory
space on the host PC.  I guess the programmers adding those log lines
have done so in error.  Let's replace %s with %p in the format string.
2017-01-08 16:04:01 +01:00
Harald Welte 5fa552cbd3 separate diag_log_umts to diag_log_wcdma
Qualcomm differentiates between WCDMA (the access stratum) and UMTS (the
non access stratum).  Let's reflect that here.  As an added bonus, we
get working NAS protocol traces.
2017-01-08 16:04:01 +01:00
Harald Welte a32c769bb7 Generate GSMTAP messages from raw received DIAG frames
This forwards the raw DIAG messages via GSMTAP, so the receiver (e.g.
wireshark) will have to do a full DIAG protocol decode.  I currently
prefer this idea to that of converting only the protocol payload to
"native" GSMTAP messages like GSMTAP_UM.

One of the problems is that the LAPDm headers are alrady stripped, and
we would have to re-add fake LAPDm headers to generate GSMTAP_UM.  So
let's rather forward all information we have and let wireshark deal with
it.

I'm not entirely sure if this is  the best strategy, but we can always
implement both modes and switch between them at runtime.
2017-01-08 16:04:01 +01:00
Harald Welte a115fbb1bb diag_read_msg(): Discard any messages shorter than 3 bytes
The 16bit CRC and the FLAG octet together are 3 bytes.  If a message is
shorter than that, something is going wrong, for sure.
2017-01-08 16:04:01 +01:00
Harald Welte 4ae0936123 WIP: Enable PCAP generation in modem 2017-01-07 16:01:42 +01:00
Harald Welte 6ec7abf157 Genreate GSMTAP messages from raw received DIAG frames 2017-01-07 16:01:42 +01:00
Harald Welte 651d4d8fbc replace old magic numbers with proper #defines 2017-01-02 00:53:11 +01:00
Harald Welte 02f7f3af76 diag_io.c: remove left-over 'rc=%d' print 2017-01-02 00:52:29 +01:00
Harald Welte 0eb2ef1a26 DPL: consequently use struct dpl_iid rather than uint32_t 2017-01-02 00:52:01 +01:00
Harald Welte 3b144a27fa DPL: add parsing of results from modem
we can now get a list of DPL interfaces and their links.
2017-01-01 19:51:50 +01:00
Harald Welte f727edcd7d diag_push_subsys_hdr(): subsystem code is 16bits 2017-01-01 19:51:50 +01:00
Harald Welte ddd6a0d249 diag_cmd: Print error messages for bad {command, length, parameter} 2017-01-01 19:51:50 +01:00
Harald Welte 89c159c873 add printing of DIAG_QSR_EXT_MSG_TERSE_F
Those are QSHRINK type messages where the format-string is not contained
in the message itself but would have to be provided from an external
source and looked up by a hash.
2017-01-01 19:51:50 +01:00
Harald Welte 022c45a263 register diag_msg via the diag_cmd dispatch table 2017-01-01 19:51:50 +01:00
Harald Welte 95fdb6e584 don't use magic numbers if we have #defines 2017-01-01 19:51:50 +01:00
Harald Welte 58185e6df5 fixup dpl 2017-01-01 19:51:50 +01:00
Harald Welte 7af93aacba diag_msg: endian fixes 2017-01-01 19:51:50 +01:00
Harald Welte f6bd58c7fb diag_msg: Include subsys_id in printed message 2017-01-01 19:51:50 +01:00
Harald Welte e4204631bc diag_log: rough verification if response matches request 2017-01-01 19:51:50 +01:00
Harald Welte c265c1206d remove Tx/Rx debugging from diag_io.c 2017-01-01 19:51:50 +01:00
Harald Welte f180199521 diag_msgc: Parse responses 2017-01-01 19:51:50 +01:00
Harald Welte efb3ecadd7 add ability to hexdump all received and transmitted messages 2017-01-01 19:51:50 +01:00
Harald Welte dc2cafcd97 restructuring: Introduce _transceive_ functions for Tx-then-Rx 2017-01-01 19:51:50 +01:00
Harald Welte 9a3cd09fed fixup dpl 2017-01-01 19:51:50 +01:00
Harald Welte 035e146029 fix DIAG timestamp conversion routines + add comments 2017-01-01 19:51:50 +01:00