This is a static, read-only archive of Wireshark Q&A. Older questions and answers from October 2017 and earlier can be found at osqa-ask.wireshark.org.
0

How to dissect 5G RRC L3 messsages from L1 packets Tx_Data.request (FAPI logs) in wireshark using a custom dissector DLL?

asked Sep 09 '25

updated Sep 09 '25

I am working at the PHY (L1) layer in a 5G NR stack implementation. At this layer, I receive Tx_Data.request messages from MAC (as per Small Cell Forum FAPI interface). These contain transport blocks that L1 needs to transmit.

My goal is to:

  • Export these Tx_Data.request payloads into a pcap.

  • Open the pcap in Wireshark.

  • Decode the actual RRC messages (e.g., RRCSetup, RRCReconfiguration) contained in SRB PDUs.

What I tried so far

  • I can already capture and dump the Tx_Data.request into a pcap file.

  • Wireshark correctly shows my custom protocol dissector for FAPI messages.

  • However, if I try to directly call the RRC dissector on the payload, it fails.

If I modify my custom Wireshark plugin DLL (generated using C, nmake), can I just strip headers and call the RRC dissector directly, or do I need to implement the whole MAC → RLC → PDCP chain first?

Comments

I suspect you're following an old recipe by using "nmake", Wireshark hasn't used that in a long time, instead the Wireshark build is configured using CMake to generate a VS solution.

What version of Wireshark are you using?

User 98587 ( Sep 09 '25 )

Custom plugin generated using C,nmake is working fine. I'm able to dissect L1 FAPI packets without any issues. I'm using Wireshark 4.4.0

User 32089 ( Sep 10 '25 )

1 Answer

0

answered Sep 11 '25

Is this a different flavour from https://gitlab.com/wireshark/wireshar... ? That one doesn't seem to call any MAC or RRC dissectors for any payloads it finds..

I implemented a version of this for 4G (TI), and the payloads were MAC PDUs. My dissector would have inferred the direction, RNTI, RNTI-Type, size, and attached the equivalent of a filled-in mac_nr_info structure, then called the MAC-NR dissector for a tvb containing the payload. You should hopefully get good decodes all the way up the stack to IP or RRC (if PDCP keys are available, if used) - assuming the MAC/RLC/PDCP dissector preferences are appropriately set to let RRC configure them.

Notice that for RRC, you would need to call for the right dissector depending upon channel and direction, e.g. "nr-rrc.dl.dcch or nr-rrc.ul.dcch. But if you call mac-nr, it can work this out for you.

My preference was just to apply display filters for the traffic I wanted to see (but obviously these files can quickly become big/slow).

Comments

I tried calling "mac-nr" dissector with my PDU. But I keep getting

MAC-NR Can't dissect NR MAC frame because no per-frame info was attached!

Even though I'm filling necessary per-frame context before calling.

User 32089 ( Sep 12 '25 )

One example of attaching the info and calling the dissector is in packet-catapult-dct2000.c

You prepare the struct then call set_mac_nr_proto_data(). packet-catapult-dct2000.c does this in 2 places, the 2nd one is more general.

User 55008 ( Sep 12 '25 )

Has this worked for you?

User 55008 ( Sep 15 '25 )

For SI_RNTI, I'm able to get MAC NR BCCH PDU. However it is not parsing further RRC messages.

User 32089 ( Sep 16 '25 )

You need to set rnti, rntitype, direction - but also check the dissector preferences for mac-nr. You need to check the box to treat low LCID values as SRB. After that you might need to check rlc-nr and pdcp-nr settings too.

User 55008 ( Sep 16 '25 )

I've set all the fields you mentioned. "Call PDCP dissector for SRB PDUs" is checked and set to "Use signalled values". Still RRC messages are not getting parsed.

User 32089 ( Sep 17 '25 )

After some debugging, I'm able to see MAC, PDCP, RRC & NAS messages for most of my packets. Some of them appearing as malformed, may be because of encryption & missing PDCP keys. Thanks for your time.

User 32089 ( Oct 29 '25 )
cc-by-sa Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.