OP25 feature request?

Status
Not open for further replies.

AB5ID

Member
Joined
Aug 6, 2007
Messages
684
Location
Lee's Summit, MO (Kansas City)
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
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
903
Location
NE Wisconsin
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.
 

AB5ID

Member
Joined
Aug 6, 2007
Messages
684
Location
Lee's Summit, MO (Kansas City)
Thanks for the reply, I currently use --nocrypt but would like an option to instantly continue "scanning" once a encrypted is recognized instead of holding until the encrypted transmission(s) has ended.

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.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
Seems like your request should be simple, but it's actually rather problematic because there are users who want to stay on the encrypted tgid for the duration of the call. I'll think about how best to handle it.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
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
 

AB5ID

Member
Joined
Aug 6, 2007
Messages
684
Location
Lee's Summit, MO (Kansas City)
Works like a champ! Thank you so much!!! :)

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
 

AB5ID

Member
Joined
Aug 6, 2007
Messages
684
Location
Lee's Summit, MO (Kansas City)
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

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.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
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.
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.
Code:
            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)

Graham
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
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)
 

AB5ID

Member
Joined
Aug 6, 2007
Messages
684
Location
Lee's Summit, MO (Kansas City)
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)


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.
 

Attachments

  • stderr2_behavior_2.txt
    19.8 KB · Views: 6
  • stderr2_behavior_0.txt
    71.3 KB · Views: 1

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
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.
 

AB5ID

Member
Joined
Aug 6, 2007
Messages
684
Location
Lee's Summit, MO (Kansas City)
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.

Thank you for checking it out, can I use a blacklist only or will that result in the same issue?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
Thank you for checking it out, can I use a blacklist only or will that result in the same issue?
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.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
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.
 

AB5ID

Member
Joined
Aug 6, 2007
Messages
684
Location
Lee's Summit, MO (Kansas City)
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.

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
 
Status
Not open for further replies.
Top