OP25 Possible issue with AMBE frames displaying using -v 10 on Phase 2 systems

Status
Not open for further replies.

jcardani

Member
Joined
Jan 16, 2002
Messages
1,354
Location
Orlando, FL & Ocean City, NJ
Hi Boatbod,

Thanks for all of your hard work with OP25, you did an awesome job!

Using your current version of OP25 and running the program with this in the terminal:
./rx.py --args "rtl" --gains 'lna:36' -S 960000 -X -q 0 -v 1 -2 -V -U -T trunk.tsv 2> stderr.2

the AMBE voice frame bytes were not displaying in the output file for both clear and encrypted Phase 2 - see example below what is happening:

10/04/20 18:30:08.193793 [0] MAC_PTT: srcaddr=1530390, grpaddr=52175, algid=aa, keyid=0, mi=81 1d a2 95 20 6e cb 07 00, rs_errs=0
10/04/20 18:30:08.195595 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=81 1d a2 95 20 6e cb 07 00, rs_errs=0
10/04/20 18:30:08.312637 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=81 1d a2 95 20 6e cb 07 00, rs_errs=0
10/04/20 18:30:08.314063 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=81 1d a2 95 20 6e cb 07 00, rs_errs=0
10/04/20 18:30:08.449856 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=81 1d a2 95 20 6e cb 07 00, rs_errs=0
10/04/20 18:30:08.452174 [0] MAC_ACTIVE: mco=0/01, grpaddr=52175, srcaddr=1530390, mco=0/30, mco=0/00, rs_errs=0
10/04/20 18:30:08.585487 [0] 2V_BURST ESS: algid=aa, keyid=0, mi=c0 68 f2 7f 7b 2b fc ca 00, rs_errs=0
10/04/20 18:30:08.587314 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=c0 68 f2 7f 7b 2b fc ca 00, rs_errs=0
10/04/20 18:30:08.587732 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=c0 68 f2 7f 7b 2b fc ca 00, rs_errs=0
10/04/20 18:30:08.729236 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=c0 68 f2 7f 7b 2b fc ca 00, rs_errs=0
10/04/20 18:30:08.729381 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=c0 68 f2 7f 7b 2b fc ca 00, rs_errs=0
10/04/20 18:30:08.858807 [0] MAC_ACTIVE: mco=0/01, grpaddr=52175, srcaddr=1530390, mco=1/3c, lra=0x00, cfva=0x3, sys_id=0x2ad, rfss=3, site=25, ch=5520, ssc=0x70, mco=0/00, rs_errs=0
10/04/20 18:30:08.859335 [0] 2V_BURST ESS: algid=aa, keyid=0, mi=69 31 33 f1 0c cd 08 53 00, rs_errs=0
10/04/20 18:30:08.995644 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=69 31 33 f1 0c cd 08 53 00, rs_errs=0
10/04/20 18:30:08.997268 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=69 31 33 f1 0c cd 08 53 00, rs_errs=0
10/04/20 18:30:09.131025 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=69 31 33 f1 0c cd 08 53 00, rs_errs=0
10/04/20 18:30:09.132895 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=69 31 33 f1 0c cd 08 53 00, rs_errs=0
10/04/20 18:30:09.268721 [0] MAC_ACTIVE: mco=0/01, grpaddr=52175, srcaddr=1530390, mco=1/02, ch_1=9272, grpaddr1=52175, ch_2=1241, grpaddr2=5216710/04/20 18:30:09.269003 set tgid=52175, srcaddr=0
10/04/20 18:30:09.269104 set tgid=52167, srcaddr=0
, mco=0/00, rs_errs=0

So I dug into the program and saw the following line in op25/gr-op25_repeater/lib/p25p2_tdma.cc

In the module titled:
void p25p2_tdma::handle_voice_frame(const uint8_t dibits[])

I changed the line:

if (d_debug >= 9) {

to:

if (d_debug >= 10) {

To be consistent with the other modules in p25p2_tdma.cc

then I did:

make
sudo make install
sudo ldconfig

Now Unencrypted AMBE voice displays properly:

10/04/20 18:33:09.857921 [0] MAC_PTT: srcaddr=1645579, grpaddr=59530, algid=80, keyid=0, mi=00 00 00 00 00 00 00 00 00, rs_errs=0
10/04/20 18:33:09.859529 [0] MAC_PTT: srcaddr=1645579, grpaddr=59530, algid=80, keyid=0, mi=00 00 00 00 00 00 00 00 00, rs_errs=0
10/04/20 18:33:09.993829 [0] 4V_BURST ESS: algid=80, keyid=0, mi=00 00 00 00 00 00 00 00 00, rs_errs=0
10/04/20 18:33:09.993965 [0] AMBE 00 0e 9a 07 00 e0 00 errs 9 err_rate 0.012669
10/04/20 18:33:09.994596 [0] AMBE 98 02 b9 4f a4 d3 80 errs 0 err_rate 0.012036
10/04/20 18:33:09.995306 [0] AMBE ac 05 fd 4a 47 13 80 errs 0 err_rate 0.011434
10/04/20 18:33:09.996003 [0] AMBE 0e 08 c3 1d a3 f3 80 errs 0 err_rate 0.010862
10/04/20 18:33:09.997637 [0] MAC_ACTIVE: mco=0/01, grpaddr=59530, srcaddr=0, mco=1/3c, lra=0x00, cfva=0x3, sys_id=0x2ad, rfss=3, site=24, ch=5360, ssc=0x70, mco=0/00, rs_errs=0
10/04/20 18:33:09.998109 [0] 4V_BURST ESS: algid=80, keyid=0, mi=00 00 00 00 00 00 00 00 00, rs_errs=0
10/04/20 18:33:09.998176 [0] AMBE a8 02 b4 91 84 96 80 errs 0 err_rate 0.010319
10/04/20 18:33:09.998774 [0] AMBE e8 02 b9 4e 27 d2 80 errs 0 err_rate 0.009803
10/04/20 18:33:09.999344 [0] AMBE e8 02 d9 1f 84 c2 80 errs 0 err_rate 0.009313
10/04/20 18:33:09.999934 [0] AMBE 98 02 b9 4f a4 d3 80 errs 0 err_rate 0.008847
10/04/20 18:33:10.132238 [0] 4V_BURST ESS: algid=80, keyid=0, mi=00 00 00 00 00 00 00 00 00, rs_errs=0
10/04/20 18:33:10.132412 [0] AMBE ac 21 e1 80 a7 af 00 errs 0 err_rate 0.008405
10/04/20 18:33:10.134079 [0] AMBE e8 18 e9 e8 8b a9 80 errs 0 err_rate 0.007985
10/04/20 18:33:10.135532 [0] AMBE b8 13 d4 46 87 cd 80 errs 0 err_rate 0.007586
10/04/20 18:33:10.136639 [0] AMBE c8 1b d2 58 84 07 80 errs 0 err_rate 0.007206
10/04/20 18:33:10.137431 [0] 4V_BURST ESS: algid=80, keyid=0, mi=00 00 00 00 00 00 00 00 00, rs_errs=0
10/04/20 18:33:10.137455 [0] AMBE d8 10 e5 ac 03 52 80 errs 0 err_rate 0.006846
10/04/20 18:33:10.138254 [0] AMBE d8 13 b0 d6 e3 1c 80 errs 0 err_rate 0.006504
10/04/20 18:33:10.139049 [0] AMBE c8 13 23 12 01 26 80 errs 0 err_rate 0.006178
10/04/20 18:33:10.139764 [0] AMBE 6c b4 05 79 2e 64 00 errs 0 err_rate 0.005870

However the Encrypted AMBE voice bytes still does not display:

10/04/20 18:39:50.804797 [0] MAC_PTT: srcaddr=1004902, grpaddr=52175, algid=aa, keyid=0, mi=19 f5 db 9d eb 2a 34 da 00, rs_errs=0
10/04/20 18:39:50.806648 [0] MAC_PTT: srcaddr=1004902, grpaddr=52175, algid=aa, keyid=0, mi=19 f5 db 9d eb 2a 34 da 00, rs_errs=0
10/04/20 18:39:50.940378 [0] MAC_ACTIVE: mco=1/02, ch_1=9433, grpaddr1=52175, ch_2=9433, grpaddr2=52175, mco=1/02, ch_1=1197, grpaddr1=52207, ch_2=1197, grpaddr2=52207, mco=0/00, rs_errs=0
10/04/20 18:39:50.940708 set tgid=52175, srcaddr=0
10/04/20 18:39:50.940998 set tgid=52207, srcaddr=0
10/04/20 18:39:50.943995 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=19 f5 db 9d eb 2a 34 da 00, rs_errs=0
10/04/20 18:39:51.077234 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=19 f5 db 9d eb 2a 34 da 00, rs_errs=0
10/04/20 18:39:51.078847 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=19 f5 db 9d eb 2a 34 da 00, rs_errs=0
10/04/20 18:39:51.079144 [0] 4V_BURST ESS: algid=aa, keyid=0, mi=19 f5 db 9d eb 2a 34 da 00, rs_errs=0
10/04/20 18:39:51.714313 [0] 2V_BURST ESS: algid=aa, keyid=0, mi=6b 0b fc cb 65 ae 36 5f 00, rs_errs=0
10/04/20 18:39:51.715411 [0] MAC_ACTIVE: mco=0/01, grpaddr=52175, srcaddr=1004902, mco=1/02, ch_1=9433, grpaddr1=52175, ch_2=1197, grpaddr2=52207, mco=0/00, rs_errs=0
10/04/20 18:39:51.715543 set tgid=52175, srcaddr=0
10/04/20 18:39:51.715586 set tgid=52207, srcaddr=0

So my question is how do I fix this in the code?

thanks so much!
Joe

 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,724
Location
Talbot Co, MD
Two thoughts:-
i. Encrypted traffic is not going to be logged unless you change the setting for --crypt-behavior because the default action is not to attempt to play audio for encrypted calls. You'll need to add "--crypt-behavior=0" to the command line to override this and allow the AMBE frames to be decoded.

ii. The change you made to p25p2_tdma.cc makes no sense because all it did was increase the debug level required to get AMBE frames to log. The code currently in the mainline of my repo logs AMBE frames at "-v 9" or above, whereas you change would make it log at "-v 10" or above. I just tested phase 2 here and it logs at level 9 like it is supposed to.
 

jcardani

Member
Joined
Jan 16, 2002
Messages
1,354
Location
Orlando, FL & Ocean City, NJ
Thanks Boatbod!

I was working with a friend that had the OP25 running on a Phase 2 system therefore there could have been some miscommunication. Phase 1 clear and encrypted works fine and displays in the log so that kinda threw me off.

Thanks so much for the --crypt-behavior=0 idea I'll have him try it. Unfortunately I don't have any Phase 2 here so I'll have to wait until he's back monitoring a Phase 2 system.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,724
Location
Talbot Co, MD
I have kinda the opposite problem... mostly my local system runs fully phase 2 so it's harder for me to debug phase 1 stuff except for using some saved captures that I can replay on demand. Ironically our county fire dispatch tgid dropped back to phase 1 for most of the day today!
 

boatbod

Member
Joined
Mar 3, 2007
Messages
2,724
Location
Talbot Co, MD
Just to confirm, adding --crypt-behavior=0 to the command line arguments correct the problem, thanks Boatbod! Tested it last night.
Good.
The code was written that way to minimize wasted (cpu) effort decoding something that wasn't going to be used.
 
Status
Not open for further replies.
Top