OP25 VirtualBox Project - Run OP25 on Windows 7

Status
Not open for further replies.

VA3DBJ

Ontario Database Admin
Database Admin
Joined
Dec 19, 2002
Messages
503
Location
Durham Region, Ontario
It continues, but after a few minutes, it does come up with " p25_framer::rx_sym() tuning error +1200 and repeats about 5 times. I reinstalled and tested gqrx-sdr, but still same issue.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
It continues, but after a few minutes, it does come up with " p25_framer::rx_sym() tuning error +1200 and repeats about 5 times. I reinstalled and tested gqrx-sdr, but still same issue.

I've not personally experienced that message, but my understand is you can ignore it. The "tuning error" messages suggest you need to adjust ppm and or fine tune using -q and -d respectively.
 

Dark-Sky

Member
Premium Subscriber
Joined
Sep 30, 2016
Messages
102
Location
Central Arkansas
I have an odroid-xu4 that was sitting around collecting dust with a 8 core 2Ghz processor, 2G ram and 1G ethernet so I decided to move the op25 icecast server over to it. It works extremely well.
 

Attachments

  • odroid-xu4-op25.png
    odroid-xu4-op25.png
    141.7 KB · Views: 33

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
I've not personally experienced that message, but my understand is you can ignore it. The "tuning error" messages suggest you need to adjust ppm and or fine tune using -q and -d respectively.

I investigated some more and it seems this is (a) not an error and (b) is a librtlsdr work-around for a USB driver issue on ARM hardware.
 

Dark-Sky

Member
Premium Subscriber
Joined
Sep 30, 2016
Messages
102
Location
Central Arkansas
Boatbod:

Interesting idea with your last commits involving liquidsoap and icecast. I am anxious to try it out. The issue here is it is not in arch's repo as such and I am having to compile the package and all of the modules packages separately from AUR which will take some time. I pulled up ubuntu's package list for it's liquidsoap-plugin-all package and there are a multitude of them. lol

Ubuntu – Details of package liquidsoap-plugin-all in trusty
 

SOUTH300

Member
Joined
Jun 13, 2002
Messages
228
Location
Carencro, LA
Yesterday I wondered how op25 would do on my RPi pi 3 B+ using a 64bit kernel and complete 64 bit OS. So I downloaded Arch linux's basic 64 bit image to get the basic files I needed to manually build it up with the Mate desktop environment. I then nuked their /boot partition with a U-Boot kernel junk and it's modules and cross compiled on my x64 my kernel using aarch64 toolchain. I maintain this kernel for my friends on satellite forum which is at kernel version 4.20.0-rc1.

Ray Sherwin / rpi-udl-linux · GitLab

Arch's 64bit image uses the kernel from kernel.org and you lose certain drivers which you need. My kernel is Raspian's from their 4.20 branch (with modified modules for satellite viewing) which has support for the missing devices that do not work.

I am still in the early stages building my image but got to the point that I have op25 running and it seems to be working good.

I want to tweak things for a couple of days but if anyone wants to play I will upload the 64bit image to my googledrive for downloading. It should work on the pi3b also. Just let me know.....

First pic is the kernel version
2nd pic is file info on /usr/local/lib/libgnuradio-op25.so that was built
3rd pic is my pi3b+'s Desktop with op25 working and the web interface. (Notice the cpu usage under System Information)

Dark-Sky - I just purchased a pi3b to run OP25/GNU on a P25 Phase 1 system, looks like you have your image pretty well established. Would you still be willing to share your image with me to save me the heartache of buildingeverything myself? I am running it off a RTL dongle. I currently have OP25 running on it, but I really like your image. Thanks!
 

Dark-Sky

Member
Premium Subscriber
Joined
Sep 30, 2016
Messages
102
Location
Central Arkansas
Dark-Sky - I just purchased a pi3b to run OP25/GNU on a P25 Phase 1 system, looks like you have your image pretty well established. Would you still be willing to share your image with me to save me the heartache of buildingeverything myself? I am running it off a RTL dongle. I currently have OP25 running on it, but I really like your image. Thanks!

SOUTH300:

I would be glad to give you my image or anyone else for that matter.

Questions:

Do you want the 32 bit image or the 64 bit
Did you buy a pi3b or pi3b+ as I have not tested it on my pi3b with 64 bit and will have to test to see if all is good
Do you want the icecast streaming capabilities (I think it it is so cool)

I am in the process of moving over to boatbod's latest commits involving using liquidsoap for the streaming to test so it may be a day or two before I can get it going and and manually create a small image for uploading. Which uploading to googledrive will take some time with my dsl connection. I have to go to town today which will add more time for completion.

I am also in the progress of testing Raspian's latest kernel 5.0.0-rc1 that I have merged with some dvb/atsc modules in my repo and want to make sure all is good with it.

Ray Sherwin / rpi-udl-linux · GitLab

Ray
 
Last edited:

SOUTH300

Member
Joined
Jun 13, 2002
Messages
228
Location
Carencro, LA
SOUTH300:

I would be glad to give you my image or anyone else for that matter.

Questions:

Do you want the 32 bit image or the 64 bit
Did you buy a pi3b or pi3b+ as I have not tested it on my pi3b with 64 bit and will have to test to see if all is good
Do you want the icecast streaming capabilities (I think it it is so cool)

I am in the process of moving over to boatbod's latest commits involving using liquidsoap for the streaming to test so it may be a day or two before I can get it going and and manually create a small image for uploading. Which uploading to googledrive will take some time with my dsl connection. I have to go to town today which will add more time for completion.

I am also in the progress of testing Raspian's latest kernel 5.0.0-rc1 that I have merged with some dvb/atsc modules in my repo and want to make sure all is good with it.

Ray Sherwin / rpi-udl-linux · GitLab

Ray

Ray - I have the pi3b+

Yes on IceCast, I agree

I guess the 64bit image would be good - does it make a difference with my setup?

I really appreciate it.

Oren K5LPD
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Boatbod:

Interesting idea with your last commits involving liquidsoap and icecast. I am anxious to try it out. The issue here is it is not in arch's repo as such and I am having to compile the package and all of the modules packages separately from AUR which will take some time. I pulled up ubuntu's package list for it's liquidsoap-plugin-all package and there are a multitude of them. lol

Ubuntu – Details of package liquidsoap-plugin-all in trusty

Strictly speaking you don't need many of the plugins - certainly not all of them - so try with none and then add them one at a time until you have a working system. You'll almost certainly need these packages in your flavor of architecture in order to support the common options (alsa, pulseaudio, mp3 and icecast):
Code:
liquidsoap/xenial,now 1.1.1-7.1 amd64 [installed]
liquidsoap-plugin-alsa/xenial,now 1.1.1-7.1 amd64 [installed]
liquidsoap-plugin-icecast/xenial,now 1.1.1-7.1 amd64 [installed]
liquidsoap-plugin-lame/xenial,now 1.1.1-7.1 amd64 [installed]
liquidsoap-plugin-pulseaudio/xenial,now 1.1.1-7.1 amd64 [installed]
 

Dark-Sky

Member
Premium Subscriber
Joined
Sep 30, 2016
Messages
102
Location
Central Arkansas
Boatbod:

I went ahead and compiled the modules that was in the make depends in the AUR PKGBUILD which pulled in about 10 more the guy left out and made sure the ones that you mentioned was there. Your liquidsoap-plugin-icecast module is my cry module for icecast/shoutcast.

Everything seems to be working except I do not have any audio via streaming. The audio works just fine on the pi's desktop environment. I recorded the stream on my desktop and it is a flat line when loaded in audacity. I uncommented pulseaudio in op25.liq and made no difference either way.

Before I forget it you must have made a change in your trunk.tsv because when I did a git pull it was wanting me to commit mine or stash it or it would over write it. Maybe put it in .gitignore?

Web interface seems to be working:

icecast-web.png

Audacious on my desktop connects and meta data working good but no audio:

audacious.jpg

Liquidsoap window showing the modules installed (cry is icecast module)

liquidsoap.png

op25 window:

op25.png


log window:

log.jpg

Ray
 
Last edited:

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Boatbod:

I went ahead and compiled the modules that was in the make depends in the AUR PKGBUILD which pulled in about 10 more the guy left out and made sure the ones that you mentioned was there. Your liquidsoap-plugin-icecast module is my cry module for icecast/shoutcast.

Everything seems to be working except I do not have any audio via streaming. The audio works just fine on the pi's desktop environment. I recorded the stream on my desktop and it is a flat line when loaded in audacity. I uncommented pulseaudio in op25.liq and made no difference either way.

Before I forget it you must have made a change in your trunk.tsv because when I did a git pull it was wanting me to commit mine or stash it or it would over write it. Maybe put it in .gitignore?

Web interface seems to be working:

View attachment 67507

Audacious on my desktop connects and meta data working good but no audio:

View attachment 67509

Liquidsoap window showing the modules installed (cry is icecast module)

View attachment 67503

op25 window:

View attachment 67504


log window:

View attachment 67506

Ray
The last line in the bottom log window should not say "audio device: default". I believe you may have forgotten to replace the "-U" with "-V - w". Please post your rx.py command line so I can check it.
 

Dark-Sky

Member
Premium Subscriber
Joined
Sep 30, 2016
Messages
102
Location
Central Arkansas
The last line in the bottom log window should not say "audio device: default". I believe you may have forgotten to replace the "-U" with "-V - w". Please post your rx.py command line so I can check it.

You were right. I changed it and now no sound anywhere:

#!/bin/bash
#
# Start op25

cd /home/alarm/op25/op25/gr-op25_repeater/apps
python2 ./rx.py --nocrypt --args "rtl=0" -N 'LNA:46' -S 2048000 -f 856.1875e6 -o 50000 -q -1 -d 200 -T trunk.tsv -V -w -M meta.json 2> stderr-stream0
 

Dark-Sky

Member
Premium Subscriber
Joined
Sep 30, 2016
Messages
102
Location
Central Arkansas
I set the log level to 10 in op25.liq and at the end of the log it goes into endless:

2019/01/11 08:24:59 [input.external_7596:6] Not ready: need more buffering (0/160).

Code:
2019/01/11 08:24:57 [gstreamer.loader:3] Loaded GStreamer 1.14.4 0
2019/01/11 08:24:57 [frame:3] Using 8000Hz audio, 25Hz video, 8000Hz master.
2019/01/11 08:24:57 [frame:3] Frame size must be a multiple of 320 ticks = 320 audio samples = 1 video samples.
2019/01/11 08:24:57 [frame:3] Targetting 'frame.duration': 0.04s = 320 audio samples = 320 ticks.
2019/01/11 08:24:57 [frame:3] Frames last 0.04s = 320 audio samples = 1 video samples = 320 ticks.
2019/01/11 08:24:57 [video.converter:4] Using preferred video converter: gavl.
2019/01/11 08:24:57 [threads:3] Created thread "gstreamer_main_loop" (1 total).
2019/01/11 08:24:57 [audio.converter:4] Using preferred samplerate converter: libsamplerate.
2019/01/11 08:24:57 [threads:3] Created thread "generic queue #1".
2019/01/11 08:24:57 [threads:3] Created thread "generic queue #2".
2019/01/11 08:24:57 [threads:3] Created thread "non-blocking queue #1".
2019/01/11 08:24:57 [threads:3] Created thread "non-blocking queue #2".
2019/01/11 08:24:57 [clock:4] Currently 1 clocks allocated.
2019/01/11 08:24:57 [clock.wallclock_main:4] Starting 1 sources...
2019/01/11 08:24:57 [source:4] Source output.icecast_7601 gets up.
2019/01/11 08:24:57 [source:4] Source mean_7600 gets up.
2019/01/11 08:24:57 [mean_7600:4] Content kind is {audio=1;video=0;midi=0}.
2019/01/11 08:24:57 [source:4] Source mksafe gets up.
2019/01/11 08:24:57 [source:4] Source input.external_7596 gets up.
2019/01/11 08:24:57 [input.external_7596:3] Starting process
2019/01/11 08:24:57 [input.external_7596:4] Activations changed: static=[], dynamic=[mksafe:mean_7600:stream:stream].
2019/01/11 08:24:57 [source:4] Source safe_blank gets up.
2019/01/11 08:24:57 [safe_blank:4] Content kind is {audio=2;video=0;midi=0}.
2019/01/11 08:24:57 [safe_blank:4] Activations changed: static=[], dynamic=[mksafe:mean_7600:stream:stream].
2019/01/11 08:24:57 [mksafe:4] Activations changed: static=[mean_7600:stream:stream], dynamic=[].
2019/01/11 08:24:57 [mean_7600:4] Activations changed: static=[stream:stream], dynamic=[].
2019/01/11 08:24:57 [input.external_7596:6] Not ready: need more buffering (0/160).
2019/01/11 08:24:57 [stream:4] Activations changed: static=[stream], dynamic=[].
2019/01/11 08:24:57 [stream:4] Enabling caching mode: active source.
2019/01/11 08:24:57 [stream:3] Connecting mount stream for source@op25.portalshare.us...
2019/01/11 08:24:59 [stream:3] Connection setup was successful.
2019/01/11 08:24:59 [threads:3] Created thread "wallclock_main" (2 total).
2019/01/11 08:24:59 [clock:4] Main phase starts.
2019/01/11 08:24:59 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
2019/01/11 08:24:59 [mksafe:3] Switch to safe_blank.
2019/01/11 08:24:59 [safe_blank:4] Activations changed: static=[mksafe:mean_7600:stream:stream], dynamic=[mksafe:mean_7600:stream:stream].
2019/01/11 08:24:59 [input.external_7596:6] Not ready: need more buffering (0/160).
2019/01/11 08:24:59 [input.external_7596:6] Not ready: need more buffering (0/160).
2019/01/11 08:24:59 [input.external_7596:6] Not ready: need more buffering (0/160).
2019/01/11 08:24:59 [input.external_7596:6] Not ready: need more buffering (0/160).
2019/01/11 08:24:59 [input.external_7596:6] Not ready: need more buffering (0/160).
 
Last edited:

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
In the window you would normally run op25.liq, try running ./audio.sh (with rx.py running in another window) and see what happens. You should have local audio again.

After that, set the liquidsoap log level to 3, run it and post the output along with a copy of your op25.liq file (minus any passwords).
 

Dark-Sky

Member
Premium Subscriber
Joined
Sep 30, 2016
Messages
102
Location
Central Arkansas
In the window you would normally run op25.liq, try running ./audio.sh (with rx.py running in another window) and see what happens. You should have local audio again.

The audio worked just fine locally on the pi3b+

After that, set the liquidsoap log level to 3, run it and post the output along with a copy of your op25.liq file (minus any passwords).

LiquidSoap log level 3:

Code:
2019/01/11 14:11:53 [gstreamer.loader:3] Loaded GStreamer 1.14.4 0
2019/01/11 14:11:53 [frame:3] Using 8000Hz audio, 25Hz video, 8000Hz master.
2019/01/11 14:11:53 [frame:3] Frame size must be a multiple of 320 ticks = 320 audio samples = 1 video samples.
2019/01/11 14:11:53 [frame:3] Targetting 'frame.duration': 0.04s = 320 audio samples = 320 ticks.
2019/01/11 14:11:53 [frame:3] Frames last 0.04s = 320 audio samples = 1 video samples = 320 ticks.
2019/01/11 14:11:53 [threads:3] Created thread "gstreamer_main_loop" (1 total).
2019/01/11 14:11:53 [threads:3] Created thread "generic queue #1".
2019/01/11 14:11:53 [threads:3] Created thread "generic queue #2".
2019/01/11 14:11:53 [threads:3] Created thread "non-blocking queue #1".
2019/01/11 14:11:53 [threads:3] Created thread "non-blocking queue #2".
2019/01/11 14:11:53 [input.external_7698:3] Starting process
2019/01/11 14:11:53 [stream:3] Connecting mount stream for source@op25.somewhere.us...
2019/01/11 14:11:55 [stream:3] Connection setup was successful.
2019/01/11 14:11:55 [threads:3] Created thread "wallclock_pulse" (2 total).
2019/01/11 14:11:55 [clock.wallclock_pulse:3] Streaming loop starts, synchronized by active sources.
2019/01/11 14:11:55 [mksafe:3] Switch to mksafe.
2019/01/11 14:11:55 [mksafe:3] Switch to safe_blank.

op25.liq:

Code:
#!/usr/bin/liquidsoap

# Example liquidsoap streaming from op25 to icecast
# (c) 2019, gnorbury@bondcar.com
#

set("log.stdout", true)
set("log.file", false)
set("log.level", 3)

# Make the native sample rate compatible with op25
set("frame.audio.samplerate", 8000)

input = mksafe(input.external(buffer=0.02, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -s"))


# LOCAL AUDIO
# Uncomment the appropriate line below to enable local sound
#
# Default audio subsystem
out (input)
#
# PulseAudio
#output.pulseaudio(input)
#
# ALSA
#output.alsa(input)


# ICECAST STREAMING
# Uncomment to enable output to an icecast server
# Change the "host", "password", and "mount" strings appropriately first!
# For metadata to work properly, the host address given here MUST MATCH the address in op25's meta.json file
#
output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", url="", fallible=false, icy_metadata="false", host="op25.somewhere.us", port=8000, mount="stream", password="password", mean(input))
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
From the appearance of your op25.liq log, liquidsoap is running fine but it's not seeing any audio stream come in from audio.py, which brings me back to my other question: "what happens if you run ./audio.py from it's own terminal window when rx.py is running and op25.liq is not"?

A thought occurred to me; are you running all the terminal processes on the same physical machine or are you trying to split it across a network? Please describe the setup and number of machines involved.
 

Dark-Sky

Member
Premium Subscriber
Joined
Sep 30, 2016
Messages
102
Location
Central Arkansas
I guessed you missed at the top of my last post where I said the audio played just fine when running ./audio.py but I have to run it "python2 ./audio.py" (have to to do the same "python2 ./rx.py ....... on arch) or python3 will try to run it and it bombs out with errors.

It is all being run native on the pi.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
I guessed you missed at the top of my last post where I said the audio played just fine when running ./audio.py but I have to run it "python2 ./audio.py" (have to to do the same "python2 ./rx.py ....... on arch) or python3 will try to run it and it bombs out with errors.

It is all being run native on the pi.
Did you edit the audio.py file top line to say "python2"? If not liquidsoap may not be able to execute the app. I guess you could alternatively edit op25.liq to insert python2 in front of ./audio.py
 

Dark-Sky

Member
Premium Subscriber
Joined
Sep 30, 2016
Messages
102
Location
Central Arkansas
Did you edit the audio.py file top line to say "python2"? If not liquidsoap may not be able to execute the app. I guess you could alternatively edit op25.liq to insert python2 in front of ./audio.py

I had thought about next temporarily making python2 the default to see what that would do as I do not know anything about programing but your idea got the sound working even on streaming some what. I went ahead and put #!/usr/bin/env python2 at the top of every .py file under the apps/ directory.

In the mean time yesterday I downloaded the Raspian image to see if I got any different results and it had sound some what also. The problem now with both images is my op25 display does not seem to display right. I have not figured out yet what I did to messed it up with all of my changing things to get things working. lol

There is no tgid info and the top line is not filling in right. I let it stream all night on the pi and it still did not fill in things right. I opened up the stream on my desktop and every once in a while some one would talk just for a little bit so it looks like the streaming part is working.

It says in the README to not use -V for phase 1 which I have here but right now it does not seem to solve my problem with or without it. My command line:

Code:
./rx.py --nocrypt -d 200 --args rtl=0 -N 'LNA:46' -M meta.json -f 856.1875e6 -o 50000 -S 2048000 -q -1 -V -T trunk.tsv -w 2> stderr-stream0.2

op25 window:

op25.png

No errors in the op25 log after running all night:

Code:
added talkgroup 52703 from shinall-blacklist.tsv
added talkgroup 52711 from shinall-blacklist.tsv
streaming server url="http://op25.somewhere.us:8000/stream.m3u"

I feel like hopefully I am getting closer to making it work. It has been raining here for 2 days and I am about 40 miles from the repeater and it seems like to me I have had issues in the past when it is raining but it has never gotten to the point where the info did not fill in the op25 window.

Ray
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Op25 is a python2 app. It hasn't been tested or modified to work under python3.

The downside of changing every .py file is that you won't be able to git pull any updates due to the local modifications. Personally I would see if there is a way to default python so that it runs the correct version, then delete/start-over with a freshly cloned repo.

Not sure what you were getting at about terminal text not being correct, but maybe this too will be corrected if you start from a fresh install.

For the command line options, you always require "-V -w" if you are running liquidsoap. "-2" is optional for phase 2 support, but I see no reason not to have it there all the time.
 
Status
Not open for further replies.
Top