OP25 Troubles

Bubbarx

Member
Premium Subscriber
Joined
Oct 30, 2017
Messages
29
Reaction score
5
Howdy all,


Having some troubles with OP25 and hoping someone can provide some input. I've had a bunch of success with Op25 but this one is stumping me and I'm not quite sure where the fault is. Op25 is currently launched on startup on my linux mint desktup running on a mini-pc. Whenever it runs on startup, it freezes at roughly 250 tsbks. I've attached the top verbosity level log. The terminal UI freezes at this point, stuff keeps getting put into the log but thats it. If I run it from the actual .desktop file instead of it being run on startup, no issues for some time but eventually the curses UI will freeze up. Just at a much later time. There is no audio after the freeze.

I can't figure out why autostart launch and manual launch cause different outcomes here, and how to correct this problem.
 

Attachments

  • stderr.txt
    486.6 KB · Views: 6

Bubbarx

Member
Premium Subscriber
Joined
Oct 30, 2017
Messages
29
Reaction score
5
Here are some additional logs
 

Attachments

  • fail_2.txt
    101.8 KB · Views: 2
  • normal.txt
    1 MB · Views: 2

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,209
Reaction score
464
Location
NE Wisconsin
Having some troubles with OP25 and hoping someone can provide some input. I
Looking at the two logfiles in your second post, it appears that you're having and issue with SDR or with the USB data transfer between the SDR and the PC.

cb transfer status: 5, canceling...
cb transfer status: 5, canceling...
cb transfer status: 5, canceling...
cb transfer status: 5, canceling...
rtlsdr_read_async returned with -5


It might be that the SDR is failing. Check that your SDR is tightly seated in the USB connector. Try another USB port, eliminate USB extension cables and external hubs as the source of the problem while troubleshooting.
 
Last edited:

Bubbarx

Member
Premium Subscriber
Joined
Oct 30, 2017
Messages
29
Reaction score
5
Looking at the two logfiles in your second post, it appears that you're having and issue with SDR or with the USB data transfer between the SDR and the PC.

cb transfer status: 5, canceling...
cb transfer status: 5, canceling...
cb transfer status: 5, canceling...
cb transfer status: 5, canceling...
rtlsdr_read_async returned with -5


It might be that the SDR is failing. Check that your SDR is tightly seated in the USB connector. Try another USB port, eliminate USB extension cables and external hubs as the source of the problem while troubleshooting.
I gave it a shot with a few different SDRs I had, no luck with this. There is no extension and no external hubs, this is all direct to the PC. It also only immediately fails like this on a restart startup. If I run the .desktop file directly it doesn't seem to get hung up the same way.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,209
Reaction score
464
Location
NE Wisconsin
I gave it a shot with a few different SDRs I had, no luck with this. There is no extension and no external hubs, this is all direct to the PC. It also only immediately fails like this on a restart startup. If I run the .desktop file directly it doesn't seem to get hung up the same way.
Are you saying it will run indefinitely when starting op25 from the command line, or just that it runs a little longer before crashing?
 

Bubbarx

Member
Premium Subscriber
Joined
Oct 30, 2017
Messages
29
Reaction score
5
Are you saying it will run indefinitely when starting op25 from the command line, or just that it runs a little longer before crashing?
It'll run for longer than 24 hours run from the command line from what I've seen. I can't say that it will run indefinitely. I have it running from a manual start right now to monitor for issues.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,209
Reaction score
464
Location
NE Wisconsin
It'll run for longer than 24 hours run from the command line from what I've seen. I can't say that it will run indefinitely. I have it running from a manual start right now to monitor for issues.
If/when it crashes, look in the logfile for the "cb transfer status, 5 caneling & rtlsdr_read_async returned with -5" error messages, and if
they presist, then you are having USB communications problems with the SDR. BTW, I have op25 running on a Linux Mint 22.3 VM for
a test and have not had any failures.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,725
Reaction score
1,139
Location
Talbot Co, MD
Looks to me like the SDR hardware is failing or the connector is wobbly. Either way, the kernel is disconnecting from the hardware which is causing the app to freeze.

While I can't fix the underlying hardware problem, you might try using ~/op25/op25/gr-op25_repeater/apps/5-sdr_hw.rules
You will need to make a copy of the file into /etc/udev/rules.d and edit the file to make the paths correct.
Specifically you'll need to fix this so that it reflects your own system:
Code:
RUN+="/bin/bash /home/pi/op25/op25/gr-op25_repeater/apps/sdrhw_removed.sh"

The script uses a UDEV hook to kill the op25 main process when the hardware goes away. Assuming systemctl is correctly configured, it will automatically restart op25 and you (might) be back in business.
 
Last edited:

Bubbarx

Member
Premium Subscriber
Joined
Oct 30, 2017
Messages
29
Reaction score
5
Looks to me like the SDR hardware is failing or the connector is wobbly. Either way, the kernel is disconnecting from the hardware which is causing the app to freeze.
I just don't get why it would be failing on startup only. Because without any other modifications if I pop open a terminal after it freezes and run the .desktop file to launch it the same way, it runs. I'm stumped how to correct this seeming usb issue. I've tried different SDRs in different ports as well. And OP25 has been running fine after having been run manually this morning for hours. I'd imagine there must be some configuration error somewhere on my part. I've attached my Op25 config and my desktop file although I imagine its unrelated to these.

I've had a lot of successful OP25 installations, so I'm not quite sure where I went wrong here. It is a fresh install of Mint for this project.
 

Attachments

  • op25_config.txt
    2.6 KB · Views: 2
  • desktop file.txt
    245 bytes · Views: 2

Bubbarx

Member
Premium Subscriber
Joined
Oct 30, 2017
Messages
29
Reaction score
5
Alright I did some more troubleshooting, problem seems to have shifted... The curses terminal is still freezing in roughly the same place but Op25 is not failing and audio will play even though the terminal is not updating. This is after a fresh reinstall of OP25 on the same system, only thing I transferred over was the config file. Same issue, it only does this on startup and not while manually run. Which makes my project work at the very least, but makes it difficult for me to identify at a glance if everything is functioning correctly. I've attached 3 logs from this occurring.
 

Attachments

  • fail_3.txt
    159.7 KB · Views: 2
  • fail_4.txt
    888.9 KB · Views: 2
  • fail_5.txt
    288.3 KB · Views: 2

boatbod

Member
Joined
Mar 3, 2007
Messages
3,725
Reaction score
1,139
Location
Talbot Co, MD
fail_3.txt contains a crash Traceback:
Code:
02/01/26 19:10:54.136740 [0] check_expired_hold: hold_tgid(11101), hold_until(1769991056.136297)
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/home/mcoem/op25/op25/gr-op25_repeater/apps/./multi_rx.py", line 999, in run
    self.callback(msg)
  File "/home/mcoem/op25/op25/gr-op25_repeater/apps/tk_p25.py", line 194, in process_qmsg
    rx.scan_for_talkgroups(curr_time)
  File "/home/mcoem/op25/op25/gr-op25_repeater/apps/tk_p25.py", line 2214, in scan_for_talkgroups
    sys.stderr.write("%s [%d] voice update:  tg(%d), rid(%d), freq(%f), slot(%s), prio(%d)\n" % (log_ts.get(), self.msgq_id, tgid, self.talkgroups[tgid]['srcaddr'], (freq/1e6), get_slot(slot), self.talkgroups[tgid]['prio']))
                                                                                                                                                                      ~~~~^~~~
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
02/01/26 19:12:02.363544 rx_block::stop() flowgraph stop called
Ctrl-C detected

Looking at the code, it's failing trying to log a "voice update:" (tune to a new channel) because freq is None instead of a legit numeric frequency. Unfortunately because the logging line itself failed, we can't tell what tgid was in use, and can't therefore look back and see why the freq is not set.
 
Top