# HG changeset patch # User Mychaela Falconia # Date 1671157301 0 # Node ID 3bbb16015a79060d2e0c20758335b3f19754676f # Parent b98aebd94d1fe66c6e5465293c4b159710f31466 gsmefr-dlcap-gsmx: logic change for updated understanding of DSP flags diff -r b98aebd94d1f -r 3bbb16015a79 efrtest/dlcap-gsmx.c --- a/efrtest/dlcap-gsmx.c Thu Dec 15 23:47:12 2022 +0000 +++ b/efrtest/dlcap-gsmx.c Fri Dec 16 02:21:41 2022 +0000 @@ -2,7 +2,7 @@ * This program reads a TCH/EFS downlink capture produced with FreeCalypso tools * (fw version with TCH downlink sniffing feature and fc-shell tch record) * and converts it into our extended-libgsm binary format, to be further - * fed to gsmefr-decode. + * fed to gsmefr-decode or other tools. */ #include @@ -62,16 +62,15 @@ } else goto invalid; /* - * Bit 15 of status word 0 is buffer validity flag, - * bit 2 is BFI. + * DSP flags will be documented in ../doc/Calypso-TCH-downlink */ - if (!(status_words[0] & 0x8000) || (status_words[0] & 0x0004)) { + if ((status_words[0] & 0xC204) == 0xC000) { + efr_tidsp_to_std(tidsp_bytes, efr_bytes); + fwrite(efr_bytes, 1, 31, outf); + } else { bfi[0] = 0xBF; bfi[1] = fn_mod_104 == 60; fwrite(bfi, 1, 2, outf); - } else { - efr_tidsp_to_std(tidsp_bytes, efr_bytes); - fwrite(efr_bytes, 1, 31, outf); } } exit(0);