Closed aveer28 closed 3 years ago
Your buffer 062c
seems not to be a valid GSM RR message. Such a Handover Complete requires an additional byte indicating the RRCause
: https://github.com/P1sec/pycrate/blob/288471d75b482be5162277801126d222a0bf13b2/pycrate_mobile/TS44018_RR.py#L711
Otherwise, you are doing it alright. You can also use the generic NAS parser for any mobile layer 3 message: you can have a look at the wiki on how to use it, https://github.com/P1sec/pycrate/wiki/Mobile-nas-messages. Finally, keep in mind that pycrate is open-source and therefore open to contributions ! If you feel something is missing, please also try to contribute by yourself, see https://github.com/P1sec/pycrate#contributing.
Thanks
Thanks, I wasn't aware NAS could also be used for GSM_RR. You were correct that the bytes were incomplete, it should have been 062C00.
When parsing it with NAS it worked, but parsing with RRHandoverComplete.from_bytes()
still gives an error.
Not on my side:
In [13]: m = RRHandoverComplete()
In [14]: m.from_bytes(unhexlify('062c00'))
In [15]: print(m.show())
### RRHandoverComplete ###
### RRHeaderUL ###
<SkipInd : 0>
<ProtDisc : 6 (RRM)>
<Type : 44 (HANDOVER COMPLETE)>
### RRCause ###
<RRCause : 0 (Normal event)>
Thanks, that works
Can you provide an example in the wiki of how to decode GSM RR messages.
I've tried the following but it returns
CharpyError: bitlen overflow: 8, max 0