OP25 OP25 Value error when running ./rx.py

Falcon4

Member
Joined
May 5, 2017
Messages
97
Location
West Chester,PA
Hello everyone its been a while. So sometime last year my lovely wife threw out my working RPI4 running OP25 flawlessly running liquidsoap the whole 9. I finally got another Pi, No,I didn't get a divorce :D Anyways, I'm getting a weird value error and I'm thinking it has to do with the NAC I'm trying to monitor being "00A"? Here's what I got:

File "/home/falcon4/op25/op25/gr-op25_repeater/apps/helper_funcs.py", line 156, in read_tsv_file
key_val = int(fields[key], 0)
ValueError: invalid literal for int() with base 0: '00a'

Any help would be appreciated. I hoping I can get this running again with not too much pain because the more roadblocks I encounter the more I think about calling my laywer :cool:
 

Falcon4

Member
Joined
May 5, 2017
Messages
97
Location
West Chester,PA
Sorry, for the delayed response got really busy at work. Well ,figured out my rx.py issue my NAC was incorrect in my trunk file. Now that I moved past that i'm in the dreaded no audio phase of the build. Last time I built it I remember it magically working one day after just letting in run. I went back and read a lot of my old threads after all that I should've just copied my SD card to a file somewhere just in case. I'll definitley do that this time around.

For some strange reason my Do_Audio_output is reading [0] no matter what I try. -O,-O alsa , -O Pulse. Ran a test .wav can hear that loud and clear. Here's my Stderr.2 and my Rx.Py/

GNU nano 5.4 stderr.2
Using Python /usr/bin/python3
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.8.2.0
built-in source types: file fcd rtl rtl_tcp uhd hackrf bladerf rfspace airspy airspyhf soapy redpitaya f>
Using device #0 Nooelec NESDR SMArt v5 SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
gain: name: LNA range: start 0 stop 0 step 0
setting gain lna to 35
supported sample rates 250000-2560000 step 24000
[R82XX] PLL not locked!
Using two-stage decimator for speed=288000, decim=6/2 if1=48000 if2=24000
p25_frame_assembler_impl: do_imbe[0], do_output[0], do_audio_output[0], do_phase2_tdma[1], do_nocrypt[0]
metadata update not enabled
python version detected: 3.9.2 (default, Mar 12 2021, 04:06:34)
[GCC 10.2.1 20210110]
Allocating 15 zero-copy buffers
Flowgraph completed. Exiting

./rx.py --args 'rtl' --gains 'lna:35' --phase2-tdma -T trunk.tsv -S 288000 -O 2> stderr.2

Thank you again, Got another long week of work ahead of me.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,247
Location
Talbot Co, MD
./rx.py --args 'rtl' --gains 'lna:35' --phase2-tdma -T trunk.tsv -S 288000 -O 2> stderr.2
The -O command line option requires a parameter, so the command line you quoted is incorrect as written. I'd suggest simply removing the -O and leaving op25 to use the default audio device as that works most of the time. The other common option would be "-O pulse" to force the use of Pulse Audio (rather than ALSA).

Also, you can lower your sample rate to save some CPU. There is no real advantage to sampling a wider bandwidth than the minimum for any given sdr device. e.g. for an RTL use "-S 1e6" or "-S 1000000"
 

Falcon4

Member
Joined
May 5, 2017
Messages
97
Location
West Chester,PA
The -O command line option requires a parameter, so the command line you quoted is incorrect as written. I'd suggest simply removing the -O and leaving op25 to use the default audio device as that works most of the time. The other common option would be "-O pulse" to force the use of Pulse Audio (rather than ALSA).

Also, you can lower your sample rate to save some CPU. There is no real advantage to sampling a wider bandwidth than the minimum for any given sdr device. e.g. for an RTL use "-S 1e6" or "-S 1000000"
Tried -O pulse,removed the -O parameter, no audio. Minimized the sampling rate. I played test audio using the $ aplay command and heard it so my thought process its not a pi issue. I'm still getting do_audio_output [0] in my stderr.2.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,247
Location
Talbot Co, MD
Eureka!! Thank you! I feel like an idiot how could I have missed "enable built-in UDP audio player" total face palm on my part. Hahah on to the next part of the build...liquid soap. Again thank you!
Hint: when you implement liquidsoap you'll need to remove the "-U" parameter ;)
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
830
Location
NE Wisconsin
Hint: when you implement liquidsoap you'll need to remove the "-U" parameter ;)
And add the "-w" and "-V" parameters. Just a heads-up, you may experience difficulties with Liquidsoap that will depend upon the
version of Raspbian OS used to image your Raspberry Pi. Specifically, the Desktop (GUI) versions install pulseaudio by default that can
be problematic for headless operation whereby Liquidsoap has been configured to run as a system service.

Don't let that discourage you, just come back if you run into any problems and we'll help you out.
 
Last edited:

Falcon4

Member
Joined
May 5, 2017
Messages
97
Location
West Chester,PA
Ok, so back at it again. I'm pretty sure I configured my meta.json,op25.liq and my icecast.xml. I tried to follow the readme rpi3-liquidsoap. In there in instructs to install liquidsoap to "sudo apt-get install liquidsoap liquidsoap-plugin-all". However, when I did that it said that "liquidsoap-plugin-all" is not available. I used "Sudo apt-get install liquidsoap" but now I'm getting an error:

falcon4@raspberrypi:~/op25/op25/gr-op25_repeater/apps $ ./op25.liq
2023/08/06 15:11:57 >>> LOG START
2023/08/06 15:11:57 [main:3] Liquidsoap 1.4.3
2023/08/06 15:11:57 [main:3] Using: bytes=[distributed with OCaml 4.02 or above] pcre=[unspecified] sedlex=2.2 menhirLib=20201216 dtools=0.4.2 duppy=0.8.0 cry=0.6.5 mm=0.5.0 xmlplaylist=0.1.5 lastfm=0.3.2 ogg=0.5.2 vorbis=0.7.1 opus=0.1.3 speex=0.2.1 mad=0.4.6 flac=0.1.7 flac.ogg=0.1.7 dynlink=[distributed with Ocaml] lame=0.3.4 shine=0.2.1 gstreamer=0.3.0 frei0r=0.1.1 theora=0.3.1 gavl=0.1.6 ffmpeg=0.4.3 bjack=0.1.5 alsa=0.3.0 ao=0.2.1 samplerate=0.1.4 taglib=0.3.6 ssl=0.5.9 magic=0.7.3 camomile=[unspecified] inotify=2.3 yojson=[unspecified] faad=0.4.0 soundtouch=0.1.8 portaudio=0.2.1 pulseaudio=0.1.3 ladspa=0.1.5 sdl=0.9.1 camlimages=4.2.6 lo=0.1.2 gd=1.0a5
2023/08/06 15:11:57 [gstreamer.loader:3] Loaded GStreamer 1.18.4 0
2023/08/06 15:11:57 [dynamic.loader:3] Could not find dynamic module for fdkaac encoder

Am I missing an encoder that was in the "plugin all" package?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,247
Location
Talbot Co, MD
So it's safe to say something isn't right with my files I'll have to go over them again. Reason why I say that is because that is the last line I see and im not logging anything.
You might have to play around with these parameters in the .liq script
Code:
set("log.stdout", true)
set("log.file", false)
set("log.level", 1)
In particular the log.level likely needs to be 3 or higher to be useful.
 
Top