SDRTrunk Running (Barely) on a Raspberry Pi 3

1,743 views
Skip to first unread message

whit...@gmail.com

unread,
Oct 21, 2020, 12:43:16 PM10/21/20
to sdrtrunk
I thought I would start a new thread (i already posted this as a reply). 

I would like to report some early success on the raspberry pi front. 

I was able to "install" and get SDRtrunk to execute and open the playlist editor on a raspbery pi 3 by following these general directions. 

1. get an sd card image for Ubunte MATE 18.04 and burn it to an SD card: 

2. all the regular apt update, upgrade, auto remove steps

3. Get the Liberica Java SDK 15 

4. following my own instructions ( https://www.youtube.com/playlist?list=PLj_KwOJbc88aMJxGtYXdqGdPURgGs1N9a ) set up the build by cloning into the current repository. 

5. build from source
          ./gradlew clean build

6. I couldn't get the .jar to execute ( "no main manifest") but I could go to the newly compiled binary

The program launches and I can open the playlist editor!!

7. I then build the JMBE library on the RPi following Denny's instruction. 

8. I plugged my RTL-SDR dongle into the Raspberry Pi. 

9. Launched the Binary and created some playlist

10. It ran for 5 minutes and then I ran out of RAM - the RPi 3 only have 1 Gig. 

IT RUNS



Imago Trigger

unread,
Oct 21, 2020, 12:47:05 PM10/21/20
to whit...@gmail.com, sdrtrunk
Nice
--
You received this message because you are subscribed to the Google Groups "sdrtrunk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sdrtrunk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sdrtrunk/44128b3b-0b88-4fcf-b183-0fef23f55555n%40googlegroups.com.
Message has been deleted

Ken Tanch

unread,
Oct 21, 2020, 6:58:55 PM10/21/20
to sdrtrunk
Zach where you said :

"6. I couldn't get the .jar to execute ( "no main manifest") but I could go to the newly compiled binary
"

What command did you use to launch SDR-trunk  from the command line?
I want to try this out on my PI-4 with 8G

Ken


To unsubscribe from this group and stop receiving emails from it, send an email to sdrtrunk+u...@googlegroups.com.

whit...@gmail.com

unread,
Oct 23, 2020, 3:37:05 AM10/23/20
to sdrtrunk
I had a pi4 with 4GB RAM sitting around as a file server and wanted to try to see if it would run sdrtrunk. It is running poly-phase decoding (with JMBE) of the local APCO system. It is using all the processor power available but not all the RAM. The "control" frequency will fairly frequently drop. I tried in hetrodyne decoding and found that dropping the control frequency doesn't happen as often I dare to plug in another USB dongle to see what happens..

I went through several (Raspbian, Kali, ubuntu - Mate) distros before i found one that will work. The limiting factor was getting the bellsoft JAVA to install. I set it up headless (dictated by necessity because I couldn't find a convenient monitor). Getting this all to work together has taken 4 days and many many hours. 

I really can't recommend you try and my method definitely needs some refining because i followed 2 year old instructions. My explanation is pretty shitty, I'll be glad to help you try. Good luck!  

I have wires strung across the floor in my office and won't be able to keep this running right now, but I am going to keep the SD card image and revisit some time in the 
near future. 

As they say "pictures or it didn't happen:"

Workspace 1_002.png

Jeff Thompson

unread,
Oct 23, 2020, 11:09:52 AM10/23/20
to sdrtrunk
Can you try a couple of quick things before you dis-assemble the setup?

* Try with 0 tuners - does the control channel stay up?
* Try with no waterfall - how does CPU utilization look?

If you have any more steps to the instructions, that would be great. Having a small solution with one SDR dongle to monitor just a control channel is worthwhile. 

There are other solutions for Pi that work and don't max out CPU, but they don't measure up in many ways. 

whit...@gmail.com

unread,
Oct 23, 2020, 10:17:34 PM10/23/20
to sdrtrunk
Jeff, 

I will try those things out tomorrow. One thing to also remember is that I am RDPing into this RPi so that is also eating some memory. 

Ken, 
I wiped the box (or really i got an old SD card) and started over. I figured out through trial and error that I told you the wrong JDK. You need the FULL JDK from Liberica. 
My post about where to find the executable was deleted earlier in this thread. I don't think I did that so i might have made a moderator mad. We will try one more time. 

I created a full step by step on my successes. 

Good Luck. 
Build SDRTRUNK.pdf

whit...@gmail.com

unread,
Oct 23, 2020, 11:31:22 PM10/23/20
to sdrtrunk
Jeff, 

You were right. Shutting off the waterfall made a HUGE difference. Now we are running at 50% CPU.

Without the JMBE library installed. it holds the control with absolutely no problem. 

With the JMBE library it starts to stutter a little with the live playback, but the recordings are clear. Running at 60-80% CPU's 

the program doesn't drop the control anymore and it can decode two APCO channels simultaneously. 

I did try to edit the play list while the program was trying to decode things and I got the "stuck in teardown" thing. Alpha software, already been reported. 

I am going to let it run overnight recording one channel and see what it looks like in the morning. 





Selection_005.png

Ken Tanch

unread,
Oct 24, 2020, 3:26:42 PM10/24/20
to sdrtrunk
Zach -
Yathzee!!
Thanks for the detailed instruction in the PDF. I'll definitely check them out .

I had a thought. You said you have a Linux desktop and you VNC into the Pi, right ?
Have you thought about running SDR Trunk from the command line via ssh and see if it spawns a local X session on your Linux Desktop?
I'm thinking I might try Cygwin on a Windows box to see if I can get it to work as I saw Cygwin mentioned in the shell script that starts SDRTrunk

Cheers,
Ken

Ken Tanch

unread,
Oct 25, 2020, 12:24:25 AM10/25/20
to sdrtrunk
Zach,
Awesome!!
That works on my Pi4 . Thanks for all that legwork and a very well documented process.
The GUI comes up and with the JMBE jar complied it does decode P25 audio and all the GUI functions seem to work.
It is still  very slow though even on an 8 GB PI4. Even with the waterfall off . No doubt about that.

I don't have any trunked P25 system to monitor so I am monitoring 4 conventional channels with 2 dongles.
When it does decode , it lags about 20 seconds behind the windows 10 box where I run SDRTrunk on all the time.

I tried giving java half the RAM with JAVA_OPTS . It did not seem to make a difference in performance.
Tried overclocking the Pi to 2000 GHz , 650 on the GPU and 6v same or very little improvement.

I did however get SDR Trunk to display on my other Windows desktop as an X window with Xming while it was running on the PI but the performance is the same.
In my opinion, I don't really think the  Pi4 even an 8GB model is up to the task of running SDRTrunk.
Might run better on some other ARM SBC but who knows.
Still it was a fun experiment overall.

Oh here's a screen shot of SDRTrunk running on the PI and displaying as an X-window on my windows PC

Cheers,
Ken




.
SDRTrunk on Xwindows.PNG

whit...@gmail.com

unread,
Oct 25, 2020, 4:07:21 AM10/25/20
to sdrtrunk
Ken, 

Have you tried using only one tuner? I only had one dongle plugged in when I set this up the other day. Yesterday, I thought to myself... two dongles should be better than one right? No. 

I also thought to myself that I read somewhere in the manual (I had read it in this forum) to switch the channelization to "heterodyne" when you are experiencing processor weaknesses. 

I spent several hours yesterday plugging and unplugging and switching channelization. I have two RTL-SRD's and one NooElec. Ultimately what I ended up with was: two dongles set to heterodyne. I set the program to prefer the RTL-SDR for control and the NooElec to center on the system's center. The net results was a only a slight increase in processor power over the NESDR alone in poly-phase.

When in poly-phase I also found that my NESDR SMArtXTR (with the e4000 chipset) dongle works better than my RTL-SDR dongle. It seems to have a wider range and the program spends less time moving the center frequency around. 

As to launching an X session by ssh. I have tried in the past. That isn't possible except I looked it up and there are solutions. https://askubuntu.com/questions/633782/how-to-start-x-application-from-ssh . I don't need that capability and don't feel the need to go installing other X managers right now. I have had bad experiences having more than one desktop environment at the same time. That said: I also found that SRDTrunk doesn't seem to save whether you had the waterfall on. When I start a new X session and launch SDRTrunk it seems to come on with the waterfall. Can you pass instructions to SDRTrunk at launch? More testing is needed. 

I see in your screenshot that you have the playlist editor open and the program scanning at the same time. I still don't have luck with that. If I want to edit the playlist I have to start the program from the terminal and before SDRTrunk starts scanning, I make my changes. Then I start the scanning. If I need to make other changes, I have to stop the program and start it over again. I get java "out of memory" errors, even though the RAM is only half occupied. I think it means that JAVA is addressing memory with the processor and the processor is pegged out. 

I hadn't noticed the program lagging decoding that severely (20 seconds) but I hadn't left two computers scanning at the same time to compare. I only have one antenna. 

I disagree with the Pi4 not being up to the task of being a full time scanner(except for the lag thing). I am quite happy with its performance. Now.... I have no need for a full time scanner so I might be biased. I too have a beaucoup computers sitting around here so needing the power to perform the work is not an issue. I do think that we will see more ARM computers in the near future with Apple switching over. With that, we will also see more development in the software. I would think that Sun is already elbow deep in ARM development.   

Again, good luck and happy scanning,

Zach

whit...@gmail.com

unread,
Oct 29, 2020, 1:17:38 AM10/29/20
to sdrtrunk
Ken, 

How did you send more memory to java? What is this JAVA_OPTS you speak of? 

Ken Tanch

unread,
Oct 29, 2020, 6:58:53 PM10/29/20
to sdrtrunk
Hi Zach,
In the sdr-trunk startup file in the bin dir there a line around line 31 
You can edit it with nano or some other editor and add the options you want

DEFAULT_JVM_OPTS=""

There you can tell it to use more memory for Java and some other options.
See the link below

I used  -Xmx4096m  and that allocated the 4G to the Java VM since I have 8G on the Pi4

Also, 
One tuner does give me better response and faster decodes, I still need 2 though.

Ken 

ma...@innocent-media.co.uk

unread,
Jan 6, 2022, 3:21:30 PM1/6/22
to sdrtrunk
I have followed your instructions, but the gradle fails stating:

> Configure project :
Project : => no module-info.java found
Skipping OS Image - Linux ARM 64-bit JDK was not found at /home/denny/java_jdks/linux-arm64/jdk-17.0.1-full
Skipping OS Image - Linux x86 64-bit JDK was not found at /home/denny/java_jdks/linux-x64/jdk-17.0.1-full
Skipping OS Image - OSX x86 64-bit JDK was not found at /home/denny/java_jdks/osx-x64/jdk-17.0.1-full.jdk
Skipping OS Image - Windows x86 64-bit JDK was not found at /home/denny/java_jdks/windows-x64/jdk-17.0.1-full

> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> error: invalid source release: 17

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 5s
2 actionable tasks: 2 executed

Zach Whitaker

unread,
Jan 6, 2022, 4:29:49 PM1/6/22
to ma...@innocent-media.co.uk, sdrtrunk
Good afternoon, 

Are you building SDRTrunk 0.4.0-alpha.9?

Sincerely
Zach

sdrtrunk

unread,
Jan 6, 2022, 4:44:28 PM1/6/22
to sdrtrunk
You might not be running Java JDK 17 ... Gradle is telling you that you're trying to compile source code that specifies/requires Java 17, but your current version is not (at least) Java 17.
Reply all
Reply to author
Forward
0 new messages