fgsect / scat

SCAT: Signaling Collection and Analysis Tool
GNU General Public License v2.0
344 stars 93 forks source link

Error while reading from dump file #22

Closed Awaisryk closed 4 years ago

Awaisryk commented 4 years ago

I am getting the following error when I try to read from dump file. struct.error: 'H' format requires 0 <= number <= 65535. In my understanding, ARFCN value should be between 0 - 65535 but it was 81370 when I debugged it with breakpoints. It crashes in create_gsmtap_header() method in util.py file. I replaced arfcn value with 0 and it ran successfully and I could see packets on wireshark too. attached is the qmdl file.

peremen commented 4 years ago

Later release of LTE standards have allowed EARFCNs larger than 65536 but 81370 seems weird. There is also another limitation of GSMTAP, as its ARFCN field is limited to 16 bits so numbers larger than 65536 could not be properly stored. (Wireshark dissector also reserves upper 2 bits which further limits usable bits for EARFCN) Newer version of GSMTAP to address the ground reason is yet to be implemented.

See also: http://lists.osmocom.org/pipermail/openbsc/2017-November/011493.html

handymenny commented 4 years ago

I've checked with other tools, the earfcn is 66786

peremen commented 4 years ago

The commit 3fc02e5 will address this issue. Although the EARFCN will be stored as zero in this case, but it will not crash.