WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: piCore 13.1.0 Wifi connection issue, missing module  (Read 1432 times)

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
piCore 13.1.0 Wifi connection issue, missing module
« on: July 30, 2022, 04:48:14 AM »
Hi all,

TL;DR: There is a module missing, and that's why encrypting the wifi credentials are not working, resulting in no wifi connection (fix in next message).

I have recently installed 13.1.0 in on one of my raspberries, but I couldn't get wifi working.

I used the regular wifi.tcz, but after entering the password, it hangs, en no connection is established.

When calling wpa_supplicant directly, I got these messages:

Code: [Select]
tc@box:~$ sudo wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -D nl80211,wext
Successfully initialized wpa_supplicant
wlan0: SME: Trying to authenticate with 74:cc:88:77:6a:88(SSID='WiFight' freq=2472 MHz)
wlan0: Trying to associate with 74:cc:88:77:6a:88 (SSID='WiFight' freq=2472 MHz)
wlan0: Associated with 74:cc:88:77:6a:88
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
nl80211: kernel reports: key addition failed
wlan0: WPA: Failed to set PTK to the driver (alg=3 keylen=16 bssid=74:cc:88:77:6a:88)
wlan0: CTRL-EVENT-DISCONNECTED bssid=74:cc:88:77:6a:88 reason=1 locally_generated=1
wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="WiFight" auth_failures=1 duration=10 reason=WRONG_KEY
wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD

This line is the important one:
nl80211: kernel reports: key addition failed

There is something wrong with the wifi key, allthough I entered the password correctly.
These messages can be found in the dmesg log:

Code: [Select]
wlan0: associated
aes_arm: Unknown symbol crypto_it_tab (err -2)
aes_arm: Unknown symbol crypto_aes_set_key (err -2)
aes_arm: Unknown symbol crypto_ft_tab (err -2)
wlan0: deauthenticating from 74:da:88:e7:6a:27 by local choice (Reason: 1=UNSPECIFIED)

And those messages led me to this thread:
http://forum.tinycorelinux.net/index.php?topic=25261.0

There is an module (aes_generic.ko) missing that does the encrypting of the wifi credentials.


Is this module missing in the piCore image?
(see temporary fix in message below)
« Last Edit: July 30, 2022, 04:53:46 AM by Gerrelt »
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline Gerrelt

  • Full Member
  • ***
  • Posts: 182
Re: piCore 13.1.0 Wifi connection issue, missing module
« Reply #1 on: July 30, 2022, 04:51:06 AM »

BTW: this is how I fixed it (partly copied from the other thread):

Code: [Select]
wget http://www.tinycorelinux.net/13.x/armv6/releases/RPi/src/kernel/5.10.77-piCore_modules.tar.xz
sudo tar -xf "5.10.77-piCore_modules.tar.xz"
sudo cp ./modules/lib/modules/5.10.77-piCore/kernel/crypto/aes_generic.ko /lib/modules/5.10.77-piCore/kernel/crypto/aes_generic.ko
sudo echo /lib/modules/5.10.77-piCore/kernel/crypto/aes_generic.ko >> /opt/.filetool.lst

And then add this after the "Load modules" comment in the /opt/bootlocal.sh:

Code: [Select]
/sbin/depmod -a
/sbin/modprobe aes-arm.ko

And of course, save it all:

Code: [Select]
filetool.sh -b
After a reboot, the wifi connection could be established.
my Raspberry Pi page: http://raspberry.gerrelt.nl

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14483
Re: piCore 13.1.0 Wifi connection issue, missing module
« Reply #2 on: July 30, 2022, 07:03:49 AM »
It seems the armv6 kernel config has CONFIG_CRYPTO_AES=m, whereas armv7 and aarch64 have CONFIG_CRYPTO_AES=y

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14483
Re: piCore 13.1.0 Wifi connection issue, missing module
« Reply #3 on: July 31, 2022, 06:44:02 AM »
I can confirm that with my RPi0w aes_generic.ko is missing and wifi is fixed when it is added as a local extension.

@bmarkus - as libaes.ko is in the base, perhaps it would make sense to add aes_generic.ko to the base?