Open RevathiGran opened 3 years ago
https://github.com/bhati-github/5GCore_NMP.git Network Message Protocol This can be used across all possible signaling interfaces and very easy to parse.
Hello @RevathiGran Did you manage to solve this issue ? We are facing the same problem here Regards.
Here are some details about the related issue we are facing:
dl_sch_bytes
which is declared like this:
uint8_t *dl_sch_bytes = new uint8_t[84]{0x74, 0x81, 0x01, 0x70, 0x10, 0x64, 0x04, 0xE0, 0x00, 0x00, 0xC8, 0x00, 0x24, 0x68, 0xA0, 0x38, 0x05, 0x21, 0x09, 0xA0, 0x30, 0x00, 0x00, 0x46, 0x4C, 0x6B, 0x6C, 0x65, 0xF0, 0x0F, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x08, 0xDC, 0x10, 0x08, 0x00, 0x00, 0x20, 0x20, 0x00, 0x10, 0x41, 0xA0, 0x28, 0x24, 0x21, 0x00, 0x00, 0x11, 0x95, 0x0E, 0x35, 0xB6, 0x32, 0x25, 0x00, 0x00, 0xF5, 0xC4, 0xAB, 0x1F, 0x01, 0x24, 0xA1, 0x10, 0x6D, 0xC2, 0xB6, 0x38, 0x70, 0x12, 0x0B, 0x01, 0xC8, 0x04, 0x08, 0x16, 0xD1, 0x85, 0x00};
sib1_2
variable which is declared with:
BCCH_DL_SCH_Message_t *sib1_2=0;
asn_dec_rval_t dec_rval = asn_decode(0, ATS_UNALIGNED_BASIC_PER, &asn_DEF_BCCH_DL_SCH_Message,(void **) &sib1_2, dl_sch_bytes, 84);
Or
asn_dec_rval_t dec_rval = uper_decode_complete(0, &asn_DEF_BCCH_DL_SCH_Message,(void **) &sib1_2, dl_sch_bytes, 84);
To decode the buffer into sib1_2
variable.
RC_FAIL
with dec_rval.consumed
equals to 0.asn_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, sib1_2);
still outputs something, but the printed result does not correspond to other decoding methods https://www.marben-products.com/decoder-asn1-nr/
and https://asn1.io/asn1playground/
and this is working, so the problem might come either from our use of asn1c or from asn1c itself.asn
file used is: NR-RRC-Definitions.txt (it is uploaded in txt format as github does not support asn files).rrc-dump
in asn1c/examples/sample.source.RRC
. We first replace the provided asn file with our one. Then, we add two lines in our code:
ofstream myFile ("data.bin", ios::out | ios::binary);
myFile.write((char*)dl_sch_bytes, 84);
and execute the project. We get the output data.bin
file and run
./rrc-dump -p BCCH-DL-SCH-Message data.bin
and this raises an error: data.bin: Decode failed past byte 0: Input processing error
To test our binary file, we upload it on https://www.marben-products.com/decoder-asn1-nr/
and it is decoding well, so binary file seems to be correct.
@vlm If you could just have a look to tell us wether or not it is a problem from our side or an issue of ASN1C, it would be great. And thanks for the great project!
Hello @RevathiGran, Just to inform you that we solved this issue. We used a forked and a specific branch by OpenAirInterface: https://gitlab.eurecom.fr/oai/asn1c/-/tree/velichkov_s1ap_plus_option_group We had to modify the content of ASN files following the procedure detailed here: https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/NR_RRC_PUSCH/cmake_targets/tools/generate_asn1 Then, the decoding was working well Regards.
hello @adejavel , The decoding works fine with this solution. Thank you.
It would be great if you could test https://GitHub.com/mouse07410/asn1c default branch (vlm_master).
It should have the fixes from the repo you referred.
Hi, I am using vlm/asn1c v0.9.29. RRC version 38.331 15.5.0 I compiled asn using this flags: asn1c -gen-PER -fcompound-names -findirect-choice -fno-include-deps
The PDU is decoded in https://asn1.io/asn1playground/ but unable to decode with this API. Kindly help me out with this.
The PDU is: 74 c5 80 3e 00 61 00 10 08 01 89 90 00 00 00 06 82 e8 05 84 26 81 80 06 41 88 30 22 59 bf e8 02 7f 80 00 00 00 03 07 70 44 20 00 24 90 83 70 84 20 00 00 90 80 00 42 06 84 04 22 90 ea 00 00 40 00 06 20 f3 81 12 cd e8 8a 00 c4 09 db f3 30 39 8f f8 92 5e 10 46 d6 65 c6 00 72 f8 80 41 50 20 00 40 08 a2 49 3c 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 27 f9 00 00