blackmore90
Member
- Joined
- Jan 9, 2018
- Messages
- 13
Hi, I am currently writing a C/C++ code to decode voice and control channels of an NXDN4800 trunked system. I have successfully decoded sound frames but i am having problems on obtaining call information, namely SACCH decoding. I get RTCH voice frames with full VCH(4x72 bits) without a problem but when i try to decode 60 bit SACCH fields i end up with CRC-6 and tail bits mismatch and a wrong SF value in the SR field. Therefore i cannot collect the consecutive layer-3 data and properly construct the layer-3 VCALL messages which will provide me the call info.
To be more clear after this short story, I share some files and technical information below:
The code applies the routine given in the NXDN standard document (TS 1-A Version 1.3) to each 60-bit SACCH frame, namely
Deinterleaving->Depuncturing->Convolutional Decoding->Tail Bit Removal->CRC-6 Checking->Decoding SR Field->Parsing 18-bit L3 Data.
The program runs with a bit file input which is formatted as one bit per byte. I have attached this file.
After finding the SYNC pattern: [1,1,0,0,1,1,0,1,1,1,1,1,0,1,0,1,1,0,0,1] with 3-bit error tolerance, 16-bit LICH decoding is performed. According to standard document LICH decoding procedure should be Descrambling->Dibit/Bit conversion->Parity Check->7 bit control data. However, i believe that the NXDN4800 system that i work on does not have any scrambler. Also, i need to flip some bits of the 16-bit LICH to successfully get the voice frames. Here is the code snippet of the bit flipper:
for (int i = 0; i < 16; i++) {
if (i == 0 || i == 8 || i == 14) {
lich = 0;
}
else if (i == 2 || i == 4 || i == 6
|| i == 10 || i == 12) {
lich = 1;
}
}
After this bit flipping and dibit-bit conversion, I sum first 4 bits with the last parity bit and successfully get even sum with a high probability. RF channel type is almost [0,1] (RTCH) in every frame and functional channel type is [1,0] (SACCH superframe structure). Steal flag is [1,1] which corresponds to no steal. In this case i successfully get voice frames.
After decoding LICH, decoding of 60-bit SACCH frames takes place. The problems i have defined in the beginning occurs in this step.
I can provide the codes of SACCH decoder blocks if needed.
I am stuck at this step and really need some ideas. I would be very happy if you would give an idea on this problem. Thank you very much.
To be more clear after this short story, I share some files and technical information below:
The code applies the routine given in the NXDN standard document (TS 1-A Version 1.3) to each 60-bit SACCH frame, namely
Deinterleaving->Depuncturing->Convolutional Decoding->Tail Bit Removal->CRC-6 Checking->Decoding SR Field->Parsing 18-bit L3 Data.
The program runs with a bit file input which is formatted as one bit per byte. I have attached this file.
After finding the SYNC pattern: [1,1,0,0,1,1,0,1,1,1,1,1,0,1,0,1,1,0,0,1] with 3-bit error tolerance, 16-bit LICH decoding is performed. According to standard document LICH decoding procedure should be Descrambling->Dibit/Bit conversion->Parity Check->7 bit control data. However, i believe that the NXDN4800 system that i work on does not have any scrambler. Also, i need to flip some bits of the 16-bit LICH to successfully get the voice frames. Here is the code snippet of the bit flipper:
for (int i = 0; i < 16; i++) {
if (i == 0 || i == 8 || i == 14) {
lich = 0;
}
else if (i == 2 || i == 4 || i == 6
|| i == 10 || i == 12) {
lich = 1;
}
}
After this bit flipping and dibit-bit conversion, I sum first 4 bits with the last parity bit and successfully get even sum with a high probability. RF channel type is almost [0,1] (RTCH) in every frame and functional channel type is [1,0] (SACCH superframe structure). Steal flag is [1,1] which corresponds to no steal. In this case i successfully get voice frames.
After decoding LICH, decoding of 60-bit SACCH frames takes place. The problems i have defined in the beginning occurs in this step.
I can provide the codes of SACCH decoder blocks if needed.
I am stuck at this step and really need some ideas. I would be very happy if you would give an idea on this problem. Thank you very much.
Attachments
Last edited: