OP25 OP25 Osmocom SQL Logging Can’t Import TGIDs

CanesFan95

Analog already is interoperable.
Joined
Feb 14, 2008
Messages
3,264
Location
FL
I’m running python3 sql_dbi.py import_tgid tags.tsv 813 but get some errors:

1701222937001.png

When I look at the logs, the TG aliases are blank:

1701223012219.png

Any way to make the aliases get saved? Thanks.
 

Outerdog

T¹ ÆS Ø
Premium Subscriber
Joined
Jul 1, 2016
Messages
667
That error usually indicates a problem with the TSV file you are importing or currently using. The Python script cannot parse what it is finding into an integer.

You can view the talkgroup TSV file in terminal and look for problems. Remember that op25 is expecting to see an integer TGID, a tab, a string talkgroup descriptor, like so:

1701226182887.png

For the osmocom version, a third column can contain a three digit integer (eg: 305). The first digit is a priority, the last two are a color code for the talkgroup display.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,422
Location
Talbot Co, MD
From the screenshot of the error, I'd suggest the offending line(s) have a tab separator for the third column, but no tg priority value(s).
 

CanesFan95

Analog already is interoperable.
Joined
Feb 14, 2008
Messages
3,264
Location
FL
My .tsv file with all the TGs only has 151 lines total. OP25 displays the TG aliases just fine in the RX window (I'm running OP25 on Ubuntu inside a VMWare machine in Windows 10).

If I open it in LibreOffice, this is what it looks like:

1701289509082.png

Opening that same file in Notepad in Windows looks like this:

1701289612016.png
 

Outerdog

T¹ ÆS Ø
Premium Subscriber
Joined
Jul 1, 2016
Messages
667
Attach your entire TSV file. zip it if necessary. Do not simply paste the text onto the forum. Attach it.
 

CanesFan95

Analog already is interoperable.
Joined
Feb 14, 2008
Messages
3,264
Location
FL
I'm going to go ahead and attach 2 files for comparison. The one called "clearwatertg.tsv" work. It will import. The other one called "hillsboroughtgid.tsv" doesn't work and will not import. Whenever I edit a file, I always use these settings at the prompt, per an old tutorial I found online years ago:

1701307680693.png
 

Attachments

  • TG Files (2).zip
    1.9 KB · Views: 2

Outerdog

T¹ ÆS Ø
Premium Subscriber
Joined
Jul 1, 2016
Messages
667
As boatload pointed out, you have a tab with no data after it:

1701310342977.png

Get yourself a real text editor that shows invisible characters like tabs, LF, CR, etc.
 

CanesFan95

Analog already is interoperable.
Joined
Feb 14, 2008
Messages
3,264
Location
FL
Thanks very much. It looks like if some lines don't have a color and others do, it gets confused and adds extra hidden characters. I was able to get it to work now by adding colors to the blank ones.
 

CanesFan95

Analog already is interoperable.
Joined
Feb 14, 2008
Messages
3,264
Location
FL
Is there a way to add to this .sh file to automatically open a 2nd terminal window and go to cd op25/op25/gr-op25_repeater/apps/oplog and then run ./oplog.sh so I don't have to do it manually? I want it to always do logging.

1701312211269.png
 

Outerdog

T¹ ÆS Ø
Premium Subscriber
Joined
Jul 1, 2016
Messages
667
Is there a way to add to this .sh file to automatically open a 2nd terminal window and go to cd op25/op25/gr-op25_repeater/apps/oplog and then run ./oplog.sh so I don't have to do it manually? I want it to always do logging.

View attachment 152183

Anything is possible in Linux, but it's something you'd have to put together on your own.

If you're going to run the logger full time, just be mindful that it will create enormous amounts of data if left running unchecked. Oplog will start to slow to a crawl when the database gets large. You'll have to experiment with your particular system to get a feel for just how large your can let it get before it crawls. Poke around in Oplog and familiarize yourself with the purge and backup / restore functions. These will probably help you meet whatever goal you're after in terms of logging.
 

CanesFan95

Analog already is interoperable.
Joined
Feb 14, 2008
Messages
3,264
Location
FL
Understood, thanks. Would you happen to know how come even though the TG aliases show up in the Frequency Table and Call History, but why the alias is blank in the Talkgroup TSV Editor:

1701318156459.png
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,040
Location
NE Wisconsin
Is there a way to add to this .sh file to automatically open a 2nd terminal window and go to cd op25/op25/gr-op25_repeater/apps/oplog and then run ./oplog.sh so I don't have to do it manually?

I would suggest running both OP25 and OPLOG as system services instead of having to open individual terminal sessions to run
the scripts manually. See the attachment; OP25_Reference_files.zip.

Edit "op25-rx.service", "op25-flask.service" and "oplog.sh" contained in the archive and replace "username" with "your_username".
The "op25-rx.service" file assumes that you've named your op25 startup script as op25.sh.

sudo cp op25-rx.service /etc/systemd/system
sudo cp op25-flask.service /etc/systemd/system
cp oplog.sh /home/username/op25/op25/gr-op25_repeater/apps/oplog
sudo systemctl enable op25-rx.service
sudo systemctl start op25-rx.service
sudo systemctl enable op25-flask.service
sudo systemctl start op25-flask.service

Once the services are running, you'll be able to view the OP25 GUI on Port 8080 and OPLOG on Port 5000 in separate tabs using
your favorite browser.

Example

OP25.png
 

Attachments

  • OP25_Reference_Files.zip
    1.2 KB · Views: 2

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,040
Location
NE Wisconsin
Understood, thanks. Would you happen to know how come even though the TG aliases show up in the Frequency Table and Call History, but why the alias is blank in the Talkgroup TSV Editor:

The Talkgroup Tags (aliases) will appear correctly once your tag file is correctly formatted and referenced in trunk.tsv.

Example

TG_EDITOR.png
 

CanesFan95

Analog already is interoperable.
Joined
Feb 14, 2008
Messages
3,264
Location
FL
Once I select the file to import, there's no button or anything to tell it to go ahead and read the file and import it:

1701319383731.png
 

Outerdog

T¹ ÆS Ø
Premium Subscriber
Joined
Jul 1, 2016
Messages
667
The Talkgroup Tags (aliases) will appear correctly once your tag file is correctly formatted and referenced in trunk.tsv.

Example

View attachment 152188

I don't know how or why, but the button to Import Now was commented out in the repo. I have no idea if I did this or not. Not sure why I would but anything is possible.

In the meantime, open up edit-tsv.html (www-static folder) and find the code below. Uncomment (remove <!-- and --> ) from the line shown here:

1701351712050.png

@KA1RBI - can you fix this in the repo?
 

Attachments

  • 1701350842430.png
    1701350842430.png
    74.1 KB · Views: 2
Last edited:

CanesFan95

Analog already is interoperable.
Joined
Feb 14, 2008
Messages
3,264
Location
FL
I was able to find that folder and file (slightly different file name) and went ahead and made the change:

1701400872274.png

Now I have the "Import Now" button showing:

1701400914241.png
However, clicking on the button doesn't do anything. No aliases load into the TG list:

1701401025964.png
 

Outerdog

T¹ ÆS Ø
Premium Subscriber
Joined
Jul 1, 2016
Messages
667
Well we've got a little problem here. I will look into this today or tomorrow...
 

Outerdog

T¹ ÆS Ø
Premium Subscriber
Joined
Jul 1, 2016
Messages
667
The good news is I've figured out why the Import Now button was commented out. It is not needed. The import function fires as soon as the file is selected so the button is not needed.

The import function works as designed. I imported your file without issue. So the bad news is I'm not sure why it isn't working for you.

Sorry for the little goose chase. I haven't looked at this code in over 2 years (!).

1701484099586.png
 
Top