Skip to content

feat: add MediaTek NR trace log import (MNR)#605

Open
h3nnes wants to merge 4 commits intohandymenny:mainfrom
h3nnes:main
Open

feat: add MediaTek NR trace log import (MNR)#605
h3nnes wants to merge 4 commits intohandymenny:mainfrom
h3nnes:main

Conversation

@h3nnes
Copy link
Copy Markdown

@h3nnes h3nnes commented Mar 17, 2026

Parse MediaTek 5G modem trace messages to extract NR-CA, EN-DC, and NR-DC combos with MIMO, modulation, bandwidth, and SCS details.

Examples:

Henrik and others added 2 commits March 17, 2026 10:55
Parse MediaTek 5G modem trace messages to extract NR-CA, EN-DC, and
NR-DC combos with MIMO, modulation, bandwidth, and SCS details.
Supports both new and old trace formats, with per-component SCS
variant selection (SCS15 for FDD, SCS30 for TDD bands).
@h3nnes
Copy link
Copy Markdown
Author

h3nnes commented Apr 4, 2026

Also added new scat version tag to support S26 LTE & NR packet versions

@handymenny
Copy link
Copy Markdown
Owner

@h3nnes, could you please split the introduction of this new parser and the scat update into separate pull requests?

@h3nnes
Copy link
Copy Markdown
Author

h3nnes commented Apr 4, 2026

@handymenny sure, sorry!

}

/** Data class holding a parsed NR DL/UL per-CC feature. */
private data class NrFspcc(
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class looks like a duplicate of: FeaturePerCCNr

)

/** Data class holding a parsed EUTRA DL/UL per-CC feature. */
private data class EutraFspcc(val mimo: Int)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use FeaturePerCCLte instead of defining a new class

private data class MtkCombo(val components: List<MtkComponent>, val fscNum: Int)

/** Data class holding a parsed component from combo DL/UL strings. */
private data class MtkComponent(
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use ComponentLte and ComponentNr

private data class FscEntry(val variants: List<List<Pair<String, String>>>)

/** Data class holding a parsed combo. */
private data class MtkCombo(val components: List<MtkComponent>, val fscNum: Int)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely a duplicate of ComboNr and ComboEnDc

}

/** NR FDD band numbers — use SCS 15 kHz features for these. */
private val nrFddBands =
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use DuplexBandTable, you can update or extend it if needed

*
* Falls back to the first variant if only one variant exists.
*/
private fun selectFscPairs(
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure why we’re discarding some FSCs; they’re all correctly listed in the final ue capability information. Even if some are "unrealistic", we shouldn't correct the baseband errors unless what they're reporting is completely invalid

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was because the parser displayed 30kHz SCS in the combo table for many FDD bands. In the bands table, displaying multiple possible scs is fine for me. I am not sure, how to determine the correct scs for combos.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are all valid. Essentially, for each input combo, you get multiple ComboNr/ComboEndc instances. Also keep in mind that not all components are present in every "final" combo

QLTE("0xB0CD hexdump"),
QNR("0xB826 hexdump"),
M("MEDIATEK CA_COMB_INFO"),
MNR("MEDIATEK NR Trace Log"),
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new LogType must be added in this list, otherwise server tests will fail:

private val logTypes =
listOf(
"H",
"W",
"N",
"C",
"CNR",
"E",
"Q",
"QLTE",
"QNR",
"M",

@h3nnes
Copy link
Copy Markdown
Author

h3nnes commented Apr 4, 2026

@handymenny I tried to go over all your requested changes. Could you check again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants