Hi all, I would like to create a tool in vb.net in order to decode only in LTE all BCCH:SCH:SystemInformation that there are during PS call in a trace or to extract a single IE like referenceSignalPower. Is it possible? How can I link to wireshark dissector? Example in vb.net: import ....? thank in advanced gio asked 01 Aug '16, 08:13 giodep |
2 Answers:
You can follow the explanations found in this thread. For LTE RRC BCCH DL-SCH messages, the dissector string will be "lte-rrc.bcch.dl.sch" answered 01 Aug '16, 10:02 Pascal Quantin |
The Wireshark dissection engine isn't built to be usable outside Wireshark although it has been managed by some folks. There's a lot of setup required before the dissection function can be called. You might be better off using tshark to dissect the packets and output the fields you require which can then be processed by your application. answered 01 Aug '16, 08:38 grahamb ♦ thanks for your reply. How can I decode several HEX messagelike this one 00010327638DDAA40526D0739019000080481755A2A82F6235F5060C using wireshark command prompt? Protol is always same BCCH:SCH (01 Aug '16, 09:00) giodep Presumably that's output from some tool or utility, and it would have to massaged into a form (pcap) that's a valid input for Wireshark. There's text2pcap (part of the Wireshark suite) that converts hex to pcap files, but the hex must still have all the right encapsulation to allow Wireshark to dissect it, which is where my knowledge of LTE stops unfortunately. (01 Aug '16, 09:34) grahamb ♦ hi grahamb, yes you are right. This output of NQDI (SwissQual tool) and my goal is to use text2pcap+tshark in order to visualize output with my tool as I have so many hex messages like one reported before. Anymore I tried to convert to pcap HEX string reported above without success. Any Suggestion? (02 Aug '16, 00:28) giodep 1 My suggestion is:
All that is valid if the following dissection of your example hex string (truncated as a Comment has a limited size) is correct:
(02 Aug '16, 01:12) sindy hi Sindy, it's exactly I want to do. But I need still your help :) I created in Preference User0 (DLT=147) with Payload protocol lte-rrc.bcch.dl.sch. Afterwards I created example.txt as follow: 000000 00 01 03 27 63 8D DA A4 05 26 D0 73 90 19 00 00 80 48 17 55 A2 A8 2F 62 35 F5 06 0C 000000 Then I launched command: text2pcap example.txt -l USER0 example.pcap and this is output: Input from: example.txt Output to: example.pcap Output format: PCAP Wrote packet of 28 bytes. Read 1 potential packet, wrote 1 packet (68 bytes). Then I launched: tshark -r example.pcap but I cannot see wht you posted: C:\Program Files\Wireshark>tshark -r example.pcap 1 0.000000 N/A -> N/A N/A 28 Null/Loopback What is my error? Can I append more HEX in same file in order to obtain a single pcap file and read more BCCH System Information? Thank in advanced Gio (03 Aug '16, 00:46) giodep Did you look at the links I gave? https://ask.wireshark.org/questions/28735/decode-sms-bearer-data-hex-string and https://ask.wireshark.org/questions/24474/user_dlt-option-in-tshark are explaining you how to achieve this with the command-line. (03 Aug '16, 00:55) Pascal Quantin Hi Pascal, now I converted example pcap corretly and I can see all IEs with Wireshark. I use your input as follow:
But I obtained error:
Why? Thank in advanced (03 Aug ‘16, 01:32) giodep that would be because you haven’t specified a (03 Aug ‘16, 01:38) sindy Sorry but I’m really a newbie!! with command:
Output is: 1 0.000000 -> 28 SystemInformation [ SIB2 ] But I wolud like to see all IEs (03 Aug ‘16, 01:45) giodep This would have been my answer had Pascal not overtaken me ;-) You need another option, (03 Aug ‘16, 01:50) sindy And to answer your sub-question,
Sure you can - you convert each frame exactly the same way as described earlier, one frame per line, and put the But I haven’t mentioned this initially as I’ve obtained an impression that you wanted to use text2pcap and tshark in a chain as an external dissector you would call from your application. And with So if it is enough for you to record a test run, convert it to pcap as a whole, and use Wireshark for analysis, creation of a single hex dump file is the best approach; if you want to browse the dissected packets using your own application (losing all the power of Wireshark filters), then a single file per frame is better. (03 Aug ‘16, 02:00) sindy using line command
(03 Aug ‘16, 02:02) giodep 1 After you read this, please have a look at tshark man page. The The And it is a capital V - the small v has a different meaning. (03 Aug ‘16, 02:06) sindy Yes, You are right. I want to save into file txt or xml output obtained by tshark in prompts. So I can select two options: first is to visualize all SIB2 or better extract a single IE like ReferenceSignalPower (03 Aug ‘16, 02:09) giodep GREAT!!! Work fine!!! thanks to all!!! (03 Aug ‘16, 02:14) giodep Well, if you can go for xml, then the right way is to replace (03 Aug ‘16, 02:15) sindy while if it is really enough for you to extract a single protocol field (in Wireshark vernacular) or a single IE (in SS7 vernacular) per frame, then (03 Aug ‘16, 02:17) sindy Wow, is it possible to extract directly a single IE? I tried to extract referenceSignalPower without success :(
(03 Aug ‘16, 02:33) giodep 1 yes, because the complete name of the protocol field is In general, whenever you select a field in the packet dissection pane in Wireshark, the field name gets displayed in the left bottom corner of the window, or you can right-click on the field and choose (03 Aug ‘16, 02:43) sindy Sorry Sindi, when I use command line -e lte.rrc.t300 output of tshark is 1 but reading from wireshark t300 is ms200 (1) So I’m wondering if it is possible to visualize directly ms200 and not 1. Thanks in advanced gio (04 Aug ‘16, 02:40) giodep This is more a question for either the author of the particular dissector or the author of the common output wrappers. A similar difference between Wireshark and tshark output can be observed now and then for various fields of various protocols. As I am just a power user, not a developer, I am not deep enough into the subject to be able to explain why this happens for some fields and doesn’t for others. So I’d recommend you to file a bug at Wireshark bugzilla. The workaround for you is to translate the encoded values into time units yourself (1 = 200 ms, 2 = ?, …) (04 Aug ‘16, 02:52) sindy showing 5 of 21 show 16 more comments |
thanks for your reply. I read your comment of thread on Jan 15 but link https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob;f=asn1/lte-rrc/EUTRA-RRC-Definitions.asn;hb=refs/heads/master is not anymore valid. Can you help me?
The new link is now https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob;f=epan/dissectors/asn1/lte-rrc/EUTRA-RRC-Definitions.asn;hb=refs/heads/master
But you do not care about it: it's jsut the ASN.1 extract of 3GPP 36.331 specification, while you already know you want to dissect LTE RRC DL-SCH messages.