AB5ID
Member
Could there be a command line variable to continue "scanning" when encountering a encrypted talk group? I have some groups in my area that don't use encryption full time. Sometimes they will be encrypted and other times they will not
You can add --nocrypt or simply -n to your rx.py command line that will mute encrypted traffic to allow you to retain the subject TG in your whitelist that you'll still hear transmissions that are not encrypted.
./rx.py --crypt-behavior 2 --args "airspy=0" --gain-mode 0 --gains 'LNA:11,MIX:8,IF:7' -S 3000000 -X -q 0 -v 1 -2 -T trunk-test.tsv -V -U 2> stderr-airspy.2
Perhaps I found a way
If you pull an update you can try the following:
Remove the "--nocrypt" option from your command line. It will still work, but has been superseded by a new option called "--crypt-behavior" which takes an integer from 0 - 2.
0 = encryption handler disabled (will play garbled audio)
1 = silence encrypted audio (op25 remains on tgid for duration of call) [DEFAULT]
2 = skip encrypted tgid (blacklists tgid for 4 seconds)
The new default is 1 which is the same as the previous --nocrypt option. The only reason for setting "--crypt-behavior 0" would be to save a few cpu cycles if you have a low power system and know you'll never receive an encrypted call. e.g. small whitelisted system on a rpi3 etc.
Here's an example of the parameter as it might be used with an airspy system.
Code:./rx.py --crypt-behavior 2 --args "airspy=0" --gain-mode 0 --gains 'LNA:11,MIX:8,IF:7' -S 3000000 -X -q 0 -v 1 -2 -T trunk-test.tsv -V -U 2> stderr-airspy.2
Perhaps I found a way
If you pull an update you can try the following:
Remove the "--nocrypt" option from your command line. It will still work, but has been superseded by a new option called "--crypt-behavior" which takes an integer from 0 - 2.
0 = encryption handler disabled (will play garbled audio)
1 = silence encrypted audio (op25 remains on tgid for duration of call) [DEFAULT]
2 = skip encrypted tgid (blacklists tgid for 4 seconds)
The new default is 1 which is the same as the previous --nocrypt option. The only reason for setting "--crypt-behavior 0" would be to save a few cpu cycles if you have a low power system and know you'll never receive an encrypted call. e.g. small whitelisted system on a rpi3 etc.
Here's an example of the parameter as it might be used with an airspy system.
Code:./rx.py --crypt-behavior 2 --args "airspy=0" --gain-mode 0 --gains 'LNA:11,MIX:8,IF:7' -S 3000000 -X -q 0 -v 1 -2 -T trunk-test.tsv -V -U 2> stderr-airspy.2
The encrypted tgids do get blacklisted but it's only supposed to be for TGID_SKIP_TIME which is 4.0 seconds. I'll have to look deeper to see why the end time is not being observed.A site I listen to has some TGs that use unit selectable encryption, meaning some units are encrypted while others are not on the same TGID.
The "--crypt-behavior 2" option will put these hybrid encrypted talk groups onto what I assume is a blacklist? But after 4 seconds the TGs do not return even if all units are "back in the clear" for quite some time.
The hybrid TGs seem go into a Roach Motel mode where once they check into the assumed blacklist they don't check out.
if self.crypt_behavior > 1:
if self.talkgroups[self.current_tgid]['encrypted'] == 1:
updated += 1
if self.debug > 1:
sys.stderr.write('%s [%d] skipping encrypted tg(%d)\n' % (log_ts.get(), self.msgq_id, self.current_tgid))
self.add_blacklist(self.current_tgid, curr_time + TGID_SKIP_TIME)
12/05/20 19:21:16.073772 voice update: tg(11527), freq(773593750), slot(0), prio(3)
12/05/20 19:21:16.074306 do_metadata state=0: [11527] Easton PD Disp
12/05/20 19:21:17.434369 skipping encrypted tg(11527)
12/05/20 19:21:17.434823 blacklisting tgid(11527)
12/05/20 19:21:19.491221 do_metadata state=1: [None] None
12/05/20 19:21:21.537754 removing expired blacklist: tg(11527)
12/05/20 19:21:21.538208 voice update: tg(11527), freq(773593750), slot(0), prio(3)
12/05/20 19:21:21.538453 do_metadata state=0: [11527] Easton PD Disp
12/05/20 19:21:22.084158 skipping encrypted tg(11527)
Hmmm, well it seems to be working properly for me, both on rx.py and multi_rx.py.
I've added some additional logging at -v 2 to show when blacklisting expires.
Code:12/05/20 19:21:16.073772 voice update: tg(11527), freq(773593750), slot(0), prio(3) 12/05/20 19:21:16.074306 do_metadata state=0: [11527] Easton PD Disp 12/05/20 19:21:17.434369 skipping encrypted tg(11527) 12/05/20 19:21:17.434823 blacklisting tgid(11527) 12/05/20 19:21:19.491221 do_metadata state=1: [None] None 12/05/20 19:21:21.537754 removing expired blacklist: tg(11527) 12/05/20 19:21:21.538208 voice update: tg(11527), freq(773593750), slot(0), prio(3) 12/05/20 19:21:21.538453 do_metadata state=0: [11527] Easton PD Disp 12/05/20 19:21:22.084158 skipping encrypted tg(11527)
Oh, I see the problem... you're running a whitelist.Not sure if this helps, I let OP25 run for about 30 minutes with --crypt-behavior 2 and with log set to v -2. I had silence by the end of the 30 minutes.
Then I ran a little while with behavior set to 0
both files stderr2 files attached.
Oh, I see the problem... you're running a whitelist.
When encrypted traffic arrives it cause the tgid to be (a) unwhitelisted and (b) blacklisted. Once the blacklist expires it is removed from the system, but op25 doesn't know that it needs to re-whitelist the tgid so you never hear any further traffic from that tgid.
Not sure how to fix this without major headaches. Will have to think about it.
You could use a blacklist only setup, but you'll need to blacklist every tgid except the ones you want to receive. It'll work but might be rather cumbersome to set up.Thank you for checking it out, can I use a blacklist only or will that result in the same issue?
I'm come up with a solution that should work; temporary tgid skips (either from the terminal or implicitly due to encryption) are now handled separately from blacklisting & whitelisting so they shouldn't cause the whitelist to get messed up.
Even easier:Thank you!
Can I do the following (you've helped me with this before) to get the solution?
cd ~/op25
git pull
rm -rf build/*
./install.sh
cd ~/op25
./rebuild.sh