Running the Kraken app in a Bluestacks 5 Android simulation

My new system is working well. The KrakenSDR is connected to a 4Gig Raspberry Pi4B. I made my own antenna with dipoles (Welding Rod) cut to the frequency of interest (146.565) and mounted on a sheet of aluminum in a 44" diameter circle. The entire antenna array is mounted on the luggage rack on my car. The first test of DOA pointed directly to the transmitter as viewed from the DOA Estimation graph. No app connection yet.

I don’t have an Android device. I installed Bluestacks5 on my laptop and downloaded the Kraken app as described in “Android App Guide”. It runs, but it doesn’t seem to get any data. There are no indications of any movement or data exchange. I’m feeding the Pi4 with a USB GPS. It updates the web GUI. Does the web interface feed the GPS data to the app? Do I need to add another GPS for the laptop? Can I configure the app or the simulation environment to use it or get GPS data from the Pi4?

Did you enter the IP address of the Pi in the Android App settings and press the DOA start button?

For GPS on the Kraken, make sure that your “Bearing Mode” setting in the app is set to “Kraken”, so that it uses GPS data from the Kraken’s Pi4.

I’m not exactly sure if Bluestacks will get the laptop GPS. From a quick Google I believe that it should work, but can’t be 100% sure.

Continuing the discussion from Running the Kraken app in a Bluestacks 5 Android simulation:

I appreciate your quick response to this. Unfortunately, I was delayed in checking these issues. Since I don’t have an Android phone, I was using the Kraken SDR web GUI at The “Bearing Mode is set to “Kraken”. I was attempting to use as the address in the Kraken App. Since that didn’t seem to work, I have also tried Still no joy. When I tried Termux and issued the “ip neighbor” command”, It replied - stale, Available. I tried both. Still no joy.

I was able to participate in a T Hunt on 1 July using just the web GUI. Impressive. The compas format of the DOA Estimation was rock steady when compared to my previous system, a Ramsey DDF-1. I still have some learning to do about various tuning parameters.

I look forward to getting the Android App working and display GPS map info on an Android simulation. Do you have any further trouble shooting ideas?

Here are a few pictures of my installation.

1 Like

It’s probably a configuration issue with the network bridge Bluestacks is using.

I’m not sure how to change it but you want Bluestacks, your PC and the Kraken to all be on the same network. If they are on different networks, then Bluestacks cannot access the data from the Kraken.

You can also test by trying to connect to the web GUI in Bluestacks Chrome. If the web gui shows, then the Kraken App should work fine.

I tried running both, the Kraken App and the Chrome on the laptop under the Bluestacks simulation. I got random failures of each. I came to the conclusion that my laptop was under powered. It’s an HP with a i3 5005 at 2 GHz with 16 Gig ram. My desktop has an i7 7700 at 3.6 GHz and 32 Gig ram. It also is Wifi capable. For a test, I enabled the Wifi and tested. On first attempt, I was successful running the Kraken App under bluestacks with the Kraken Web GUI connected to Win Edge. For my original configuration, I need a stronger laptop.

Thanks for all the helpful guideance.

Rather than getting a better laptop, T tuned the setup parameters for Bluestacks. After several attempts, I finally obtained reasonable performance by allocating 4 Gig of memory, 4 cores (it only has 2) and setting it for High Performance. I also reduced the frame rate to 10. The display updates for the App are a bit chunky. But it works.

Can’t wait for the next T Hunt,

1 Like

My latest problem has been that the Android app was not getting new location information from the GPS connected to the Pi4. The locaton it started with never changed and the status was connected. Using the console interface to the Pi4, I issued a few commands to diagnose the GPS. Using cgps -l I saw that the lat/lon would never update from the initial position. However, if I used gpsmon it did. I found in the man pages, that the difference is gpsmon does not normally send any configuration to the GPS. Something in cgps was changing the output format of the GPS. I used gpsctl -n to force the GPS into the NEMA mode. I finally get GPS lat/lon updates using either cgps or gpsmon. I then connected to the Kraken GUI using Edge on a laptop. It showed the lat/lon updating as well. I then started Bluestacks 5 and the KrakenSDR app on the same laptop. All is well everybody is playing together.
I still need to find out where the initialization of the GPS interface is performed. It needs to send the commands to set the GPS to NEMA mode during startup.

I have been able to run both the KrakenSDR GUI and the Android app under a Bluestacks Android simulation all on a laptop. Because of the limitations of my laptop, the system was unreliable. CPU load on the laptop was borderline high with peaks hitting 100%.

I acquired a cheap Android tablet and dedicated it to the Android app. System stability, performance and startup all improved.

I still need to manually set the GPS to NMEA or I never get location updates. That means I need to always have a keyboard and monitor attached to the system. Where can I add the command “gpsctl -n” to the initialization process? Is there something else that needs to be checked?
Thanks, N9SCD

Edit the bash file in the krakensdr_doa folder, and add your custom command there at the beginning of the file. Then it should run on every boot.

There are two copies of the file loaded on the 1.7.0 release. One is in /home/krakenrf/krakensdr_doa/
and the other is in
I modified the first one that you referenced by adding:
gpsctl -n
It still did not initialize the GPS to update. I added some text out and found that I get no indication that this code runs at all.

echo “%%%%%%%%%%%%%”
echo “Reconfigure GPS”
echo “%%%%%%%%%%%%%”
gpsctl -n
sleep 3

I looked around to find another .sh file the command could be added to. That is when I found the second copy of the file. I tried the modification with it and got the same result. The command needs to be near the end of system startup. Something during startup may be corrupting the GPS initialization. Where is the GPS initialization performed now? Am I the only one having this trouble?

The GPS is started in the Python DSP code, which runs last. I assume you need to run the special GPS initialization command before that? If that’s not the case and you actually need to run it after the GPS has been started, then you might need to add it to the end of the file after a delay.

The correct file to add the command to is /home/krakenrf/krakensdr_doa/ as that file definitely gets run on startup. The echo might not work as the output might be muted

I’m not aware of anyone else that needs to run gpsctl -n before their GPS will work.

I tried to run the command at the end of Still not displaying proof thar it runs. I tried adding “sudo” prior to each command. Still, no joy. The GPS doesn’t report position updates until startup completes and I manually issue the command “gpsctl -n”.

How many threads are running during startup? Are they held in sync by some semaphore or something else? Is there a startup log that will capture all of the text displayed during startup?
Are there any debug commands I can issue during normal operation?

Sorry that this is taking so much of your time. The things that should be simple usually end up taking the most of it.

Did you try adding a sleep command before gpsctl -n?

During startup it might take a few seconds before the Python codes reaches the part that activates the GPS.

Alternatively you could try adding a system call to bash from within Python.

Possibly in

In the enable_gps function after gpsd.connect(), try adding:

os.system("bash -c 'gpsctl -n'")

I tried the delay both prior to and after the gpsctl -n with no effect. I still have no indication that the modified command is being run. Other than modifying .sh files under Linux, I have no experience or development environment to build in Python. I am occupied with a T Hunt tomorrow and will use the system by providing the command externally. After that, I will consider working out the details of modifying Python code.
Thanks again for your quick assistance in this issue.

KrakenSDR Server Settings/Web GUI is accessible from within android app.
wanted to use gps thats connected to PI’s usb port.
cannot find bearing mode on android app, found heading sensor and updated it to “Kraken”. But still nothing is showing on app interface.

Did you activate the GPS mode on the Kraken web GUI?


When you say nothing showing up, do you mean no data at all is showing up? Even if you set the heading sensor to “Manual” in the app?

If so then it’s just a connection problem you are having. For whatever reason the app isn’t able to connect to the Pi 4. Double check that the IP address in the app is correct, and that there’s nothing like a firewall potentially blocking the connection.

but the Web GUI is accessible which means network is fine.

Is nothing showing up only when you have it set to ‘Kraken’?

Did you make sure to change the logging mode to ‘Log Everything’? By default it’s set to only start logging when moving.