WiFi Connection on R-Pi 4

I just got a Raspberry Pi 4 to test out using it as a media center, primarily for Netflix, Disney+, Spotify, etc. I’m currently running into network issues.

According to System Info, I’m running OSMC using KODI 19.4. This was loaded onto the SD card via the Raspberry Pi Imager a day or two ago. I ran through basic initial setup but otherwise it is default settings.

When I go into My OSMC > Network > Wireless I can see my 2.4 GHz with an x, a lock, and 4 white dots (4 out of 5 bars of service?).

Issue 1
I cannot see my 5 GHz network. It appears as though R-PI 4 should have the capability to do this unless I am mistaken. Is there something I’m missing or need to configure?

Issue 2
When I try to connect to the 2.4 GHZ network it prompts for a password. It notes “Configuring…” for a while before displaying a Connection Failed message with status stating no wireless connection. I’m using a Logitech wireless keyboard as input but have entered the PW using both the letter keys and navigating the on-screen keyboard.

On which channel is your 5 GHz network? Certain channels would need you to configure your country via the CRDA tool.

You could try it from command line

Progress!

The second thread was really useful. I am now able to see and connect to my 5GHz network by setting my region. HOWEVER, every time I restart, the region resets to default (unset) and the connection no longer initializes.

osmc@osmc:~$ osmc@osmc:~$ iw reg get
global
country 00: DFS-UNSET
        (2402 - 2472 @ 40), (N/A, 20), (N/A)
        (2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, NO-IR
        (2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, NO-IR
        (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, NO-IR
        (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, NO-IR
        (5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, NO-IR
        (5735 - 5835 @ 80), (N/A, 20), (N/A), NO-IR
        (57240 - 63720 @ 2160), (N/A, 0), (N/A)

osmc@osmc:~$ sudo iw reg set US
osmc@osmc:~$ iw reg get
global
country US: DFS-FCC
        (2402 - 2472 @ 40), (N/A, 30), (N/A)
        (5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
        (5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
        (5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
        (5735 - 5835 @ 80), (N/A, 30), (N/A)
        (57240 - 63720 @ 2160), (N/A, 40), (N/A)

osmc@osmc:~$ shutdown -r now
osmc@osmc:~$ iw reg get
global
country 00: DFS-UNSET
        (2402 - 2472 @ 40), (N/A, 20), (N/A)
        (2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, NO-IR
        (2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, NO-IR
        (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, NO-IR
        (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, NO-IR
        (5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, NO-IR
        (5735 - 5835 @ 80), (N/A, 20), (N/A), NO-IR
        (57240 - 63720 @ 2160), (N/A, 0), (N/A)

How do I make the region settings persistent?

Check this post

Thanks for your assistance! For those that follow, the following are the key components of the process that worked for me.

sudo apt-get install iw
sudo apt-get install crda

## Test region to make sure connection works
iw reg get
sudo iw reg set <region>

## Could establish connection but did not persist through reboot, to make region persistent...
sudo nano /etc/default/crda

:frowning:
And it is now a year later and OSMC is still having these problems!
Why has this not been fixed in the distribution package???
I have tried two different SDcard creations, one using the RaspberryPiImager and the other by downloading the image from OSMC and writing to SDcard with Balena Etcher. Both do not work in the very same way as described here.
And they are the latest June 2023 images.

I have tried the suggestions here and they do not work:

sudo apt update
sudo apt install iw crda

iw reg get
sudo iw reg set SE
iw reg get

sudo nano /etc/default/crda
#Add the correct domain:
REGDOMAIN=SE

Does not work still, so I rebooted but it is not working nonetheless…
:frowning: :frowning:

This is what I see after a reboot:

$ iw reg get
global
country SE: DFS-ETSI
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
        (5725 - 5875 @ 80), (N/A, 13), (N/A)
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#0
country 99: DFS-UNSET
        (2402 - 2482 @ 40), (6, 20), (N/A)
        (2474 - 2494 @ 20), (6, 20), (N/A)
        (5140 - 5360 @ 160), (6, 20), (N/A)
        (5460 - 5860 @ 160), (6, 20), (N/A)

So it should work or not???

See my current thread about this.

I’m not sure why you’ve resurrected a post from a year ago.

I’ve only seen a need to do this for German users to set a CRDA region if they are using Channel 13 on a Raspberry Pi.

Then this would suggest the issue is not CRDA related

I’m not sure what problem you are specifically experiencing, but without logs it’s hard to speculate.

Since 2021, we set the CRDA region to the region set in Kodi by default.

commit a6c212df25fb4ae7f52e4346a869ab24fadebc93
Author: anxdpanic <anxdpanic@users.noreply.github.com>
Date:   Thu Aug 26 15:34:00 2021 -0400

    [package] [mediacenter-addon-osmc] set crda region code to kodi region

Because it describes a problem that is still present!
I found this thread by googling and it looked exactly like my problem…

But now I have found a way to get it going which is not obvious and probably needs some instructions for future OSMC users with RPi4B devices once they come back on the market. The last couple of years they have virtually disappeared from sight due to Covid and Semiconductor shortages. But this is slowly being solved now.

I have described what I did in the end of the thread I linked to above.

The Raspberry Pi 4 has the same WiFi implementation as the 3B / 3B+ which was introduced many years ago.

It has been tried and tested by OSMC users for years.

I think you’re from Sweden. If your WiFi router is operating in legal parameters, then according to (PTS) Post- och telestyrelsen, you do not need to adjust the CRDA at all.

If you’re in Germany, you may need to adjust CRDA, but simply setting the region in Kodi will do this for you. I haven’t encountered users with this problem outside of Germany.

Cheers,

Sam

To clarify, I am in Stockholm Sweden

OSMC is running with WiFi now and I will not change anything for the moment. But it was quite a struggle to get there so I have made lots of extra notes in my OSMC-Howto document for future reference…

I have done this:

Set the region code to SE as follows:

iw reg get
sudo iw reg set SE

then:

sudo nano /etc/default/crda
#Add the correct domain:
REGDOMAIN=SE

then:

sudo connmanctl
connmanctl> agent on
Agent registered
connmanctl> scan wifi
Scan completed for wifi
connmanctl> services
*AO myssidname           wifi_d83add1b611d_626f7373656669626572_managed_psk
... a number of irrelevant SSID:s from neighbors etc
connmanctl> connect wifi_d83add1b611d_626f7373656669626572_managed_psk
- Enter passphrase for my ssid
.. an acknowledge message is shown
connmanctl> quit

At this point the WiFi is connected and working.

But the strange thing is that if I check like this I get an unexpected DE response for country even though I have specified SE:

$ iw reg get
global
country DE: DFS-ETSI
        (2400 - 2483 @ 40), (N/A, 20), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
        (5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
        (5725 - 5875 @ 80), (N/A, 13), (N/A)
        (5945 - 6425 @ 160), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#0
country 99: DFS-UNSET
        (2402 - 2482 @ 40), (6, 20), (N/A)
        (2474 - 2494 @ 20), (6, 20), (N/A)
        (5140 - 5360 @ 160), (6, 20), (N/A)
        (5460 - 5860 @ 160), (6, 20), (N/A)

Still the file /etc/default/crda still contains:
REGDOMAIN=SE

It seems like things have been getting more complex recently…