Pi 4 -> 5GHz wifi

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

Pi 4 -> 5GHz wifi

Postby greps » Mon Jan 27, 2020 9:24 pm

Hi guys, arch runs amazing on the pi 4, and I am currently using it as a samba share (8TB usb hdd) and as a webserver for a single page website. All this on under 9 watts very green for the enviroment :)


My issue is that I cannot seem to get 5GHz wifi working, so the samba share is kind of slow. It worked on raspbian and NOOBs after running "sudo rfkill unblock wifi" but does not appear to work now.

sudo iwconfig wlan0
$this->bbcode_second_pass_code('', 'wlan0 IEEE 802.11 ESSID:"redacted-for-privacy"
Mode:Managed Frequency:2.437 GHz Access Point: xx:xx:xx:xx:xx:xx (redacted for privacy)
Bit Rate=72.2 Mb/s Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
Link Quality=61/70 Signal level=-49 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:3 Invalid misc:0 Missed beacon:0
')

sudo iwlist wlan0 freq
$this->bbcode_second_pass_code('', 'wlan0 32 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Channel 36 : 5.18 GHz
Channel 40 : 5.2 GHz
Channel 44 : 5.22 GHz
Channel 48 : 5.24 GHz
Channel 52 : 5.26 GHz
Channel 56 : 5.28 GHz
Channel 60 : 5.3 GHz
Channel 64 : 5.32 GHz
Channel 100 : 5.5 GHz
Channel 104 : 5.52 GHz
Channel 108 : 5.54 GHz
Channel 112 : 5.56 GHz
Channel 116 : 5.58 GHz
Channel 120 : 5.6 GHz
Channel 124 : 5.62 GHz
Channel 128 : 5.64 GHz
Channel 132 : 5.66 GHz
Channel 136 : 5.68 GHz
Channel 140 : 5.7 GHz
Channel 144 : 5.72 GHz
Channel 149 : 5.745 GHz
Current Frequency:2.437 GHz (Channel 6)
')

I tried the arm-arch kernel and the raspbian kernel (I THINK, IM NOT SURE IF THIS ACTUALLY CHANGED THE KERNEL BECAUSE I DIDNT DO A GRUB MKCONFIG)

How I tried the raspbian kernel (4.19)

$this->bbcode_second_pass_code('', 'pacman -Syu
pasman -S git bc bison flex make
git clone --depth=1 https://github.com/raspberrypi/linux
cd linux
KERNEL=kernel7l
make bcm2711_defconfig
make -j4 zImage modules dtbs
sudo make modules_install
sudo cp arch/arm/boot/dts/*.dtb /boot/
sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
sudo cp arch/arm/boot/zImage /boot/$KERNEL.img')
compiling took ~ 2 hours, not bad for this little guy ;)

I am wondering what I should do to get 5GHz working, I have one of those wireless adapters that have both the 5GHz and the 2.4Ghz on the same band / ssid. I left it for 2 days hoping it would beam form to 5GHz but it did not. The signal strength is great, no issues with that.

set region w/ iw and with wpa_supplicant
iw reg get
$this->bbcode_second_pass_code('', '
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 - 71000 @ 2160), (N/A, 40), (N/A)
')
cat /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
$this->bbcode_second_pass_code('', 'trl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1
country=US
network={
ssid="redacted-for-privacy"
scan_ssid=1
key_mgmt=WPA-PSK
psk="redacted-for-privacy"
}
')
- kernel is unrelated?
- Should I try the user made linux-raspberrypi4-aarch64 kernel https://esotericnonsense.com/blog/rpi-chroot.html
- should I try the latest raspbian kernel?
greps
 
Posts: 7
Joined: Mon Jan 27, 2020 9:12 pm

Re: Pi 4 -> 5GHz wifi

Postby greps » Wed Jan 29, 2020 11:25 am

Update: tried the aarch64 build, worked out well exept there is no hwclock anymore so I had to manually set time syncing in software.

Set region with crda and netctl no action. :(
greps
 
Posts: 7
Joined: Mon Jan 27, 2020 9:12 pm

Re: Pi 4 -> 5GHz wifi

Postby lategoodbye » Thu Jan 30, 2020 5:30 pm

AFAIR there were issues with a specific version of wpa_supplicant and 5 GHz. Just to make it clear, you don't use the built-in wifi?
lategoodbye
 
Posts: 124
Joined: Sat Dec 29, 2018 1:24 am

Re: Pi 4 -> 5GHz wifi

Postby greps » Fri Jan 31, 2020 6:00 am

Yes I use the built in wifi
greps
 
Posts: 7
Joined: Mon Jan 27, 2020 9:12 pm

Re: Pi 4 -> 5GHz wifi

Postby lategoodbye » Fri Jan 31, 2020 6:59 am

Did you try to run wpa_supplicant with enabled debug?
Did you try another version of wpa_supplicant?
lategoodbye
 
Posts: 124
Joined: Sat Dec 29, 2018 1:24 am

Re: Pi 4 -> 5GHz wifi

Postby greps » Sat Feb 01, 2020 8:57 pm

$this->bbcode_second_pass_quote('lategoodbye', 'D')id you try to run wpa_supplicant with enabled debug?
Did you try another version of wpa_supplicant?


No. I am not using wpasupplicant this time on the aarch64 kernel and did raw crda netctl. What's one that I should try how do I install it and run it as debug?
greps
 
Posts: 7
Joined: Mon Jan 27, 2020 9:12 pm

Re: Pi 4 -> 5GHz wifi

Postby graysky » Sun Feb 02, 2020 11:03 am

Recommend you stop using netctl.... use systemd-networkd. Be sure you enable and start it after creating the following 2 network configs:
$this->bbcode_second_pass_code('', '# cat /etc/systemd/network/10-wireless.network
[Match]
Name=wlan0

[Network]
DHCP=ipv4

[DHCP]
RouteMetric=10
')

And

$this->bbcode_second_pass_code('', '# cat /etc/systemd/network/20-wire.network
[Match]
Name=eth*

[Network]
DHCP=ipv4
LinkLocalAddressing=no
IPv6AcceptRA=no

[DHCP]
RouteMetric=20
')

Now setup wpa_supplicant's config for your network (https://wiki.archlinux.org/index.php/WP ... passphrase).

In short:
I assume you know the SSID and and password, so create a temp file (called /mypassword.txt) containing the password using your fav text editor. Contents is just your wifi password, for example:
$this->bbcode_second_pass_code('', '@YVBn1aZMmbM6P/ADospDbblylrvlJDP!FCLwbEc68TmIqaAE6WPn4i8yN7Z
')

Generate the auth portion:
$this->bbcode_second_pass_code('', '
# wpa_passphrase MYSSID </mypassword.txt
')

Now edit (create) the actual config file you will use and paste in the output of the above command:
$this->bbcode_second_pass_code('', '/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
ctrl_interface=/run/wpa_supplicant
update_config=1
country=US

network={
ssid="MYSSID"
#psk="@YVBn1aZMmbM6P/ADospDbblylrvlJDP!FCLwbEc68TmIqaAE6WPn4i8yN7Z"
psk=33...ddd
}
')

Finally enable and start wpa_supplicant@wlan0.service

Enjoy.
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Pi 4 -> 5GHz wifi

Postby greps » Sun Feb 02, 2020 11:42 pm

Well, that worked beautifully! A little unimpressed or underwhelmed that the WiFi chip in our pi4s can't exceed 80mbps when it sits 12 feet from a WiFi repeater. Checked iperf3 and speedtest, about the same. On my laptop I can reliably get 300mbps wireless.

But iw shows it is connected to a 5GHz channel! Thank you!!

I'll make a guide in a bit
greps
 
Posts: 7
Joined: Mon Jan 27, 2020 9:12 pm

Re: Pi 4 -> 5GHz wifi

Postby graysky » Mon Feb 03, 2020 9:05 pm

$this->bbcode_second_pass_quote('greps', '
')I'll make a guide in a bit


There is no need... it is all on the Arch wiki.
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 1 guest