RPi4 doesn't connect automatically to hotspot

Manual for the Kraken SDR on page 11 reads that the android hotspot username and password should be krakensdr/krakensdr and the Kraken wiki for direction finding quickstart has them as krakenandroid/krakenandroid:

02. Direction Finding Quickstart Guide · krakenrf/krakensdr_docs Wiki · GitHub

Neither are working when I bootup my RPi. How do I confirm that the RPi has the correct credentials?

It should be KrakenAndroid/KrakenAndroid.

Did you setup the credentials with the proper capitalization? I believe WiFi does differentiate.

The print manual has a typo there. Please always refer to the more up to date Wiki since the print manual is just for regulatory compliance and went out of date almost instantly.

1 Like

I confirmed the credentials and was able to connect an ipad to the hotspot without issues, but the RPi isn’t connecting. I briefly see an adhoc wifi named ‘krakenrf’ show up when the RPi boots, but never connects to my hotspot. I’m able to ssh to the RPi and all seems ok. Not sure how to troubleshoot the wpa supplicant though. Any advice would be greatly appreciated.

Okay, I was able to get it to connect now, but it doesn’t seem to be pulling an IP address. Under the hotspot settings on the android phone, it just shows 1 device connected without an IP address. Is there some better documentation for setting up the RPi for use with the Kraken SDR app?

If you’re seeing the hotspot show up, then that means the Rpi didn’t see or couldn’t connect to the “KrakenAndroid” SSID, so it decided to generate it’s own hotspot.

What was the initial problem that prevented the Rpi connecting to the KrakenAndroid hotspot?

We unfortunately can’t provide documentation for every phone, but what phone do you have? On most you should be able to see the IP in the phone settings. If your phone doesn’t allow you to see the IP, you’ll need a third party Terminal Emulator App like Termux https://play.google.com/store/apps/details?id=com.termux. When the device is connected type in “ip neighb” in Termux to get the IP address of the connected device.

All documentation is on the Wiki 02. Direction Finding Quickstart Guide · krakenrf/krakensdr_docs Wiki · GitHub. I’ve just updated the docs to add info about Termux. There doesn’t seem to be any GUI based app that can show this information, i’m not sure why Google tries to hide it.

1 Like

I’m not sure what the original problem was, but I advanced it during my debugging by installing the Network Manager. Doing that disabled the systemd automatically running the dhcp client during startup. I had to stop/disable network manager, then start/enable the default network functions.

I’m running a rugged tablet phone by Tripltek. The RPi connects fine now, but it still doesn’t show an IP address on the phone’s hotspot screen. I had to connect a monitor and keyboard to get the RPi’s IP address from the CLI. I’ll try the Termux app next.

See my post at Finding IP address of PI connected to mobile hotspot - #6 by adrian

1 Like

Just noting that the hostname “krakensdr” works on local networks, but not if you are on mobile hotspot. Most mobile hotspot providers (if not all) will not allow hostname access.

1 Like

I have the same issue, Raspberry PI does not connect to the wifi spot, creates its own krakensdr wifi spot instead. Moreover, it used to connect to the mobile hotspot that I’ve created without any problems. I.e. I’ve created a KrakenAndroid/KrakenAndroid wifi hotspot on my phone, RPI connected, everything worked. Then, I disconnected everything and went for a lunch. Once I returned, I connected everything back together, enabled existing wifi hotspot on my phone, powered on both kraken head and RPI, and did not see any connected devices. Instead, as I already mentioned, a new krakensdr hotspot appeared. I haven’t changed neither my KrakenAndroid hotspot settings (laptop connects to it with existing settings without problems) nor I haven’t changed anything in the RPI. Kraken, RPI, and phone have already been rebooted multiple times. What can cause such a flaky behavior?

Hmm strange. I’m not sure right now - this entire WiFi connection is handled by the standard Linux wpa_supplicant system, so nothing really to do with the KrakenSDR software itself.

I’ve never experienced connection problems with any mobile device. Can you let me know your phone model and software info?

I wonder if it’s some issue to do with 5G vs 2.4G WiFi and the Pi not connecting to one.

Makes me wonder if there is a configuration on the Wi-Fi supplicant to force it to wait longer for Wi-Fi connection before activating its own krakensdr hotspot.

I have an Android 10 (10QKQ1.190910.002) phone, Xiaomi Redmi Note 7. Also, I have tried switching from 2.4 GHz to 5GHz and it worked, at least it works for now.

Weird. Would have thought 2.4G would be the one more likely to work.

Has anyone figured out what may be going on with this? I just started setting up mine today and the same thing happens. It will not connect on 2.4Ghz but 5G connected straight up without any issues.

I really want it to work on 2.4Ghz as my car head unit only does 2.4GHz hotspot. It would be perfect and has been my intention from the word go to use that for the hotspot, mapping and direction finding.

If you boot up regular Raspbian on a different SD card, are you able to connect to your 2.4G channel with the Pi?

I was about to do that earlier today and then the only monitor I have here that does HDMI stopped working, the forth electrical thing to pack up within a week. :rage:

This prevented me from confirming precisely if the Pi will connect to a 2.4Ghz connection. I intended to swap the SD back to the supplied PI card and just boot up on Raspbian to test.

However, earlier when the monitor was still working I successfully connected to the ‘Pi’ hot spot after it did not auto connect to my phone or the head unit. This I noted was over 2.4GHz. I don’t believe at this stage there is anything wrong with the 2.4GHz WIFI hardware.

I just tried it again (no monitor) switched everything back on after trying both the head unit in the car and my phone hotspots set on 2.4GHz and it connected straight away!
I cannot explain why it would no connect yesterday on 2.4GHz.

Anyhow, won’t complain as it seems to be working now on 2.4GHz which allows me to hotspot from my car head unit so I guess for now this has resolved itself for me.

I just need to figure out the next problem I am having only on the car head unit. I will go for a search now and see if anyone has uncounted that and started a thread topic for it.

Kind regards
John

I know this is an old thread but it was the most relevant one.

I have basically the same issue. Won’t connect to WiFi
It is however creating it’s own access point.

First odd thing is if I run the raspi-config, and try to edit the wifi settings, it says “Could not communicate with wpa_supplicant”

If I run wpa_supplicant manually
sudo wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -d -iwlan0 | tee ./wifi.log

This will run with a bunch of logging and the “tee” splits the console output to a log file and the console

First I must say I changed the credentials in wpa_supplicant.conf to match my hotspot instead of using the default as I have other devices that connect and don’t want to have to change all those.

When I run the command, I see in the log it finds and recognizes the SSID,
I see it going from DISCONNECTED → SCANNING → ASSOCIATING… and it looks like its going to work, but then there’s a line
wlan0: Event ASSOC_REJECT (12) received
and a few lines later I it goes from ASSOCIATING → DISCONNECTED

My install was from when I first got my unit a while ago, so after messing with it for 12 hours (literally), I went scorched earth and reflashed the latest image… and …it does exactly the same thing. Can’t access the wifi config, and it creates a hotspot.

I would assume that if the default image does this there should be instructions on how to switch it to use a hotspot, but the getting started instructions seem to assume that it does that automatically.

After the reflash, I did indeed try with my hotspot credentials set as specified in the setup guide and did not get a connection.

I suppose maybe it is possible there is some different between a RP4 and a CM4 which is what I am using?. I don’t have a spare RP4…

So literally 5 minutes after I post this, I found a key to all this…

sudo systemctl disable hostapd

This turns off the access point daemon

Once I did that, then I could run wpa_supplicant manually, and it connected! Was also then able to run the wireless setup in raspi-conifg.

To get it all working from boot, you need to do
sudo nano /etc/dhcpcd.conf

And comment out the last line with a #
nohook wpa_supplicant

Now it connects automatically to my hotspot on boot!!! OMG this was such a challenge for such a small and simple fix. I had previously commented out that line (in my old image) but never had it commented and had hostapd disabled.

I’m not sure why the default image is not shipped this way.

But that disables the hotspot when there is no connection right?

We use an existing script called Autohotspot which creates a hotspot for users to connect to when there is no other Wifi network available to connect to.

The idea is that even without a mobile phone hotspot available, it’s still possible to connect to the Kraken via it’s own hotspot.

But it sounds like the detection of external wifi is not working in some cases. But I can’t seem to replicate the issue here.