OP25 Boatbod Web UI Update

boatbod

Member
Joined
Mar 3, 2007
Messages
3,712
Reaction score
1,113
Location
Talbot Co, MD
I'm using a Dell Optiplex 3050 mini PC, 8 GB RAM, i5-7500T processor. It is connected to the LAN via WiFi. It's running Ubuntu 22.04 LTS. To be honest I've never been happy with its performance, and I suppose that could lead to part of the problem.

The issue was extremely sluggish performance, primarily visually, but also audio related where audio seemed to run behind what was being heard live. Then it appeared as the client system would "catch up" for a short time, and then fall behind again. When the browser at the host PC was shut down, performance from the client improved dramatically and was "as normal".

I do plan to eventually replace the PC I'm currently using. Bill's info is likely far more valuable that mine.
The data exchange for the visual portion of the UI inside op25 was never designed to support multiple terminals running at the same time although in practice it works... sort of. The crux of the issue is that at the server level there is nothing to associates a UI request with the response returned by the server's trunking code. Moreover, if plots are enabled/disabled, they are visible system-wide to all UI's as long as the UI session has the plot window turned on. This isn't a waitress problem, but a op25 architecture problem.
 

N4HFA

Member
Premium Subscriber
Joined
Jul 23, 2017
Messages
30
Reaction score
14
Location
Ocala, FL
My apologies if this is a repeat question. I run the old rx.py because I only use one Airspy dongle and it's my understanding because of that I can't run multi.rx. I would really like to use the new UI though. Are there any "hacks" (lines of code I can add or modify) to allow use of the new UI with rx.py? Thanks
 

KC1UA

This ain't gettin us noplace, we'll have to blast!
Database Admin
Joined
Oct 27, 2002
Messages
2,332
Reaction score
1,329
Location
Marstons Mills, Cape Cod, Massachusetts
You can certainly use one Airspy device and run multi_rx.py. Within the apps folder of OP25 you should see some example files that allow for this. I run mine from op25.sh, which contains the call to multi_rx.py and a .json file that contains the necessary settings to get it going. I would copy/paste my files but my situation is probably mostly unique as I'm using OP25 to monitor an analog smartzone system. But, it surely can be accomplished with just one Airspy attached.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,712
Reaction score
1,113
Location
Talbot Co, MD
My apologies if this is a repeat question. I run the old rx.py because I only use one Airspy dongle and it's my understanding because of that I can't run multi.rx. I would really like to use the new UI though. Are there any "hacks" (lines of code I can add or modify) to allow use of the new UI with rx.py? Thanks
Nope, rx.py is no longer supported and architecturally incompatible with multi_rx.py.
There's actually no reason to be using it any more, and multi_rx is certainly compatible with a single dongle of any brand supported by gr-osmosdr. Take a look at "p25_single_rtl_example.json". That's a single stream (same as rx.py) but set up using an RTL device. To make it work with Airspy you would just need to make a copy of it and edit the "devices" section to load the airspy driver.

The following would work for Airspy R2 (10Mhz). Change rate to 6000000 if you're using a Mini (6Mhz)
Set the "frequency" parameter to park the device in the middle of the P25 system's freq range, or change "tunable" parameter to true to use it like an rtl.

Code:
   "devices": [
        {
            "args": "airspy",
            "frequency": 772525000, 
            "gains": "LNA:9,MIX:5,IF:6", 
            "name": "sdr0", 
            "offset": 0,
            "ppm": 0.0, 
            "usable_bw_pct": 0.80,
            "rate": 10000000, 
            "tunable": false
        }

Lastly, in the "trunking" section you'll need to specify the control channel frequency(s)
Code:
    "trunking": {
        "module": "tk_p25.py",
        "chans": [
            {
                "sysname": "Trunked System",
                "control_channel_list": "773.84375",
                "whitelist": "",
                "tgid_tags_file": "",
                "rid_tags_file": "",
                "tdma_cc": false,
                "crypt_behavior": 2
            }
        ]
    },
 

N4HFA

Member
Premium Subscriber
Joined
Jul 23, 2017
Messages
30
Reaction score
14
Location
Ocala, FL
Thank-you Boatbod for the response and explanation. One thing I am not clear on yet, do I make a separate cfg.json with the above changes? If so, what do I name it? Am I supposed to rename the existing cfg.json and call the new one cfg.json? Is the existing cfg.json used for anything or is it just there as an example? Sorry for the confusion.
 

MTL_Emergencies

Member++
Database Admin
Joined
Sep 6, 2019
Messages
187
Reaction score
120
Location
Quebec, Canada
Call it whatever you want: mychannel.json, config.json, cfg_new.json, etc. You'll need to reference it in your command line:
Bash:
./multi_rx.py -c config.json -v 1 2>stderr.1
 

N4HFA

Member
Premium Subscriber
Joined
Jul 23, 2017
Messages
30
Reaction score
14
Location
Ocala, FL
Thank-you for clearing up my confusion. I think I have a good enough understanding now to get-er-done. :)
 

N4HFA

Member
Premium Subscriber
Joined
Jul 23, 2017
Messages
30
Reaction score
14
Location
Ocala, FL
OK, I got multi.rx working with one problem. I can't access the new ui through my browser. Using google chrome I could always access the old ui when running rx.py. Running on Lubuntu OS. Here is my terminal portion of the json config file:

terminal.jpg

Thanks for all the help.
 

KC1UA

This ain't gettin us noplace, we'll have to blast!
Database Admin
Joined
Oct 27, 2002
Messages
2,332
Reaction score
1,329
Location
Marstons Mills, Cape Cod, Massachusetts
If you're connecting on the same machine, I think that # to the left of terminal type is killing it.

Mine looks like this:

"#terminal_type": "curses",
"terminal_type": "http:0.0.0.0:8080",

If you're only connecting locally and not over your LAN the 127.0.0.1 should be fine I think. I'm still learning too so if I'm being a moron I'm sure someone will correct me. :ROFLMAO:
 

N4HFA

Member
Premium Subscriber
Joined
Jul 23, 2017
Messages
30
Reaction score
14
Location
Ocala, FL
If you're connecting on the same machine, I think that # to the left of terminal type is killing it.

Mine looks like this:

"#terminal_type": "curses",
"terminal_type": "http:0.0.0.0:8080",

If you're only connecting locally and not over your LAN the 127.0.0.1 should be fine I think. I'm still learning too so if I'm being a moron I'm sure someone will correct me. :ROFLMAO:
You are correct sir! That was it. My curses does not have a pound sign next to it. I wonder if I should put one there since the ui is working now? Thanks for the help.
 
Last edited:

boatbod

Member
Joined
Mar 3, 2007
Messages
3,712
Reaction score
1,113
Location
Talbot Co, MD
You are correct sir! That was it. My curses does not have a pound sign next to it. I wonder if I should put one there since the ui is working now? Thanks for the help.
Strictly speaking, only one of the "terminal_type" parameters should be un-commented at a time. Adding the "#" to the front of the parameter changes the name and makes it invisible to op25. In your case it's working because of the order in which the parameters are evaluated (the second one overwrites the first).

On an unrelated topic, you asked earlier about naming of your custom config file. As others have said, name it whatever you want, but avoid making direct edits to files included with the original op25 git repo. If you edit a version-controlled file it makes things harder to "git pull" updates when they are released, because git won't overwrite local changes without extra effort.
 

KC1UA

This ain't gettin us noplace, we'll have to blast!
Database Admin
Joined
Oct 27, 2002
Messages
2,332
Reaction score
1,329
Location
Marstons Mills, Cape Cod, Massachusetts
On an unrelated topic, you asked earlier about naming of your custom config file. As others have said, name it whatever you want, but avoid making direct edits to files included with the original op25 git repo. If you edit a version-controlled file it makes things harder to "git pull" updates when they are released, because git won't overwrite local changes without extra effort.
I had that happen when I changed the code in the main.js file to get rid of the "NAN" that was appearing in the Sys column of Call History. Thankfully I back my files up. The git pull stopped and told me it wouldn't continue because that file was modified. Replacing it with my backup solved the problem. Good pro tip there for us amateurs.
 

N4HFA

Member
Premium Subscriber
Joined
Jul 23, 2017
Messages
30
Reaction score
14
Location
Ocala, FL
Strictly speaking, only one of the "terminal_type" parameters should be un-commented at a time. Adding the "#" to the front of the parameter changes the name and makes it invisible to op25. In your case it's working because of the order in which the parameters are evaluated (the second one overwrites the first).

On an unrelated topic, you asked earlier about naming of your custom config file. As others have said, name it whatever you want, but avoid making direct edits to files included with the original op25 git repo. If you edit a version-controlled file it makes things harder to "git pull" updates when they are released, because git won't overwrite local changes without extra effort.
Thank-you for the info and help. I'm understanding the files and configurations a little better now that I was able to get it up and running. I even was able to get it running with my Airspy mini. I had to start with a RTL_SDR dongle as I initially started with the Airspy and had no success. After getting the RTL one setup then the Airspy fell right in line. I will comment out the curses line in the terminal section per your advice. It's good to have you and other more knowledgeable people here as a resource. Thanks.

A testimonial: I have been using DSDPlus up until now. There is a new P25 site in Levy county that is in start-up mode. With DSDPLus I keep getting garbled audio but switching to OP25 made all the difference and the audio from OP25 is better than DSDPlus IMHO.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,712
Reaction score
1,113
Location
Talbot Co, MD
I had that happen when I changed the code in the main.js file to get rid of the "NAN" that was appearing in the Sys column of Call History. Thankfully I back my files up. The git pull stopped and told me it wouldn't continue because that file was modified. Replacing it with my backup solved the problem. Good pro tip there for us amateurs.
You can also use the command "git checkout <filename>" to revert a single file, or "git checkout ." to revert a whole directory structure.
 

jets1961

Member
Joined
Jan 21, 2002
Messages
290
Reaction score
38
Thank-you for the info and help. I'm understanding the files and configurations a little better now that I was able to get it up and running. I even was able to get it running with my Airspy mini. I had to start with a RTL_SDR dongle as I initially started with the Airspy and had no success. After getting the RTL one setup then the Airspy fell right in line. I will comment out the curses line in the terminal section per your advice. It's good to have you and other more knowledgeable people here as a resource. Thanks.

A testimonial: I have been using DSDPlus up until now. There is a new P25 site in Levy county that is in start-up mode. With DSDPLus I keep getting garbled audio but switching to OP25 made all the difference and the audio from OP25 is better than DSDPlus IMHO.
Better vocoder... I also like that you can edit colours of a given TG type,
 

jets1961

Member
Joined
Jan 21, 2002
Messages
290
Reaction score
38
I have a few question or comments about the latest update.

I notice in the p25_rtl_example and p25_single_rtl_example *.json files there are no reference to smart colors. Can the smart colors be entered below lines 136 and line 89, respectively?

One last OP25 question in general. "audio_gain: 1.0". What unit is the gain (db) and is it output audio gain?

Off topic but other than a text editor in Ubuntu or Mate what do you guy use to edit the *.json files?
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,206
Reaction score
462
Location
NE Wisconsin
I notice in the p25_rtl_example and p25_single_rtl_example *.json files there are no reference to smart colors. Can the smart colors be entered below lines 136 and line 89, respectively?

Yes. Refer to the cfg.json fie or take a look at the example below.

JSON:
    "terminal": {
        "module": "terminal.py",
        "#terminal_type": "curses",
        "terminal_type": "http:0.0.0.0:8080",
        "terminal_timeout": 5.0,
        "default_channel": "MPSCS",
        "curses_plot_interval": 0.2,
        "http_plot_interval": 1.0,
        "http_plot_directory": "../www/images",
        "tuning_step_large": 1200,
        "tuning_step_small": 100,
        "smart_colors": [
            { "keywords": [ "fd", "fire" ], "color":"#ff5c5c" },
            { "keywords": [ "law", "lein", "pd", "police", "sheriff", "so" ], "color": "#66aaff" },
            { "keywords": [ "ambulance", "ems", "med" ], "color": "#ffb84d" },
            { "keywords": [ "rap", "fm" ], "color": "#37eb34" },
            { "keywords": [ "spev" ], "color": "#cc00ff" },
            { "keywords": [ "ecom" ], "color": "#ffff00" }
        ]
    }

One last OP25 question in general. "audio_gain: 1.0". What unit is the gain (db) and is it output audio gain?

I "believe" the following (float) multipliers apply where dB = 20 x log (multiplier).

1.0: Unity gain. The audio signal is completely unaltered (multiplied by 1).
0.0: Absolute silence (multiplied by 0).
0.5: Cuts the signal amplitude in half (roughly a -6 dB drop).
2.0: Doubles the signal amplitude (roughly a +6 dB boost), which will cause digital clipping if the audio peaks.

Off topic but other than a text editor in Ubuntu or Mate what do you guy use to edit the *.json files?

Generally, I prefer to just use nano. However, there are a terminal and GUI JSON editors available to intall on
various Linux distros.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,712
Reaction score
1,113
Location
Talbot Co, MD
The "audio_gain" parameter only applies to UDP audio being played by the built-in audio player. It does not apply to browser based audio (websockets) that plays directly on the client machine.
 
Top