WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Wifi on PI 1 with USB adapter  (Read 2980 times)

Offline glennr

  • Newbie
  • *
  • Posts: 14
Wifi on PI 1 with USB adapter
« on: October 01, 2021, 04:15:32 PM »
Hi,
I'm trying to get wifi working on a Raspberry Pi Model B Rev 2 with a RT5370 Wireless Adapter.
As far as I can tell I've installed the required packages.

On running sudo wifi.sh and selecting an AP and entering a password I see the following in dmesg:

[10317.094823] wlan0: authenticate with 74:ac:b9:6a:56:a8
[10317.153162] wlan0: send auth to 74:ac:b9:6a:56:a8 (try 1/3)
[10317.158338] wlan0: authenticated
[10317.161098] wlan0: associate with 74:ac:b9:6a:56:a8 (try 1/3)
[10317.171298] wlan0: RX AssocResp from 74:ac:b9:6a:56:a8 (capab=0x431 status=0 aid=2)
[10317.185121] wlan0: associated
[10317.379252] aes_arm: Unknown symbol crypto_it_tab (err -2)
[10317.379320] aes_arm: Unknown symbol crypto_aes_set_key (err -2)
[10317.379389] aes_arm: Unknown symbol crypto_ft_tab (err -2)
[10317.416299] wlan0: deauthenticating from 74:ac:b9:6a:56:a8 by local choice (Reason: 1=UNSPECIFIED)

Looks like I'm missing a library, but which one?

Glenn


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11135
Re: Wifi on PI 1 with USB adapter
« Reply #1 on: October 01, 2021, 04:49:10 PM »
Hi glennr
Welcome to the forum.

Maybe you need to load  aes-arm.ko:
Code: [Select]
sudo modprobe aes-arm.ko

Offline glennr

  • Newbie
  • *
  • Posts: 14
Re: Wifi on PI 1 with USB adapter
« Reply #2 on: October 01, 2021, 04:56:07 PM »
$sudo modprobe -v aes-arm.ko
modprobe: can't load module aes-arm.ko (kernel/arch/arm/crypto/aes-arm.ko.gz): unknown symbol in module, or unknown parameter

Offline glennr

  • Newbie
  • *
  • Posts: 14
Re: Wifi on PI 1 with USB adapter
« Reply #3 on: October 01, 2021, 05:04:31 PM »
dmesg output:
[14009.453849] aes_arm: Unknown symbol crypto_it_tab (err -2)
[14009.453916] aes_arm: Unknown symbol crypto_aes_set_key (err -2)
[14009.453980] aes_arm: Unknown symbol crypto_ft_tab (err -2)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11135
Re: Wifi on PI 1 with USB adapter
« Reply #4 on: October 01, 2021, 05:14:13 PM »
Hi glennr
Does it still show an error if you run this first:
Code: [Select]
sudo depmod -a

Offline glennr

  • Newbie
  • *
  • Posts: 14
Re: Wifi on PI 1 with USB adapter
« Reply #5 on: October 01, 2021, 05:59:45 PM »
Does it still show an error if you run this first:
Code: [Select]
sudo depmod -a

Yes it does.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11135
Re: Wifi on PI 1 with USB adapter
« Reply #6 on: October 01, 2021, 06:09:58 PM »
Hi glennr
The unknown symbols are provided by  aes_generic  which I think is built into the kernel. I'm wondering if maybe
aes-arm.ko  also needs to be builtin for it to be able to find those symbols. I think you need to wait for one of
the ARM maintainers to weigh in on this.

Offline glennr

  • Newbie
  • *
  • Posts: 14
Re: Wifi on PI 1 with USB adapter
« Reply #7 on: October 01, 2021, 06:25:27 PM »
@Rich thanks for your help. Do I need to do anything to bring it to their attention?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11135
Re: Wifi on PI 1 with USB adapter
« Reply #8 on: October 01, 2021, 06:29:11 PM »
Hi glennr
No, they'll see this thread.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1058
Re: Wifi on PI 1 with USB adapter
« Reply #9 on: October 02, 2021, 05:14:58 AM »
You never mentioned what version of piCore.    The needed module should be in the tar containing all modules.  The aes stuff is compiled into arm7 and arm7l.   But arm6 is done with modules.

If this is picore13, then You likely are missing libaes.ko

aes_generic was removed/renamed from the kernels.

Offline glennr

  • Newbie
  • *
  • Posts: 14
Re: Wifi on PI 1 with USB adapter
« Reply #10 on: October 02, 2021, 01:58:36 PM »
You never mentioned what version of piCore.

Oops, sorry. It's piCore armv6 13.0.3.

Offline glennr

  • Newbie
  • *
  • Posts: 14
Re: Wifi on PI 1 with USB adapter
« Reply #11 on: October 02, 2021, 02:18:52 PM »
After running 'sudo wifi.sh' the libaes module is loaded:

Code: (bash) [Select]
$ lsmod
Module                  Size  Used by    Not tainted
libaes                 16384  0
ccm                    20480  0
rt2800usb              28672  0
rt2x00usb              24576  1 rt2800usb
rt2800lib             126976  1 rt2800usb
rt2x00lib              61440  3 rt2800usb,rt2x00usb,rt2800lib
mac80211              815104  3 rt2x00usb,rt2800lib,rt2x00lib
sha256_generic         16384  0
libsha256              20480  1 sha256_generic
cfg80211              778240  2 rt2x00lib,mac80211
rfkill                 32768  2 cfg80211
libarc4                16384  1 mac80211
crc_ccitt              16384  1 rt2800lib
squashfs               40960 42
raspberrypi_hwmon      16384  0
zram                   24576  1
zsmalloc               28672  1 zram

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1058
Re: Wifi on PI 1 with USB adapter
« Reply #12 on: October 02, 2021, 04:04:51 PM »
I was wrong on aes_generic.  Not sure what I was thinking of this morning.  aes-arm depends on libaes and aes_generic

If aes_generic is not on your system, you can grab this http://www.tinycorelinux.net/13.x/armv6/releases/RPi/src/kernel/5.10.16-piCore_modules.tar.xz and extract the module from there.   copy it to /lib/modules/5.10.16-piCore/kernel/crypto/aes_generic.ko

Then run `sudo depmod -a`

Offline glennr

  • Newbie
  • *
  • Posts: 14
Re: Wifi on PI 1 with USB adapter
« Reply #13 on: October 02, 2021, 07:00:44 PM »
Thank you. It's working now.

Code: (bash) [Select]
$ lsmod
Module                  Size  Used by    Not tainted
ctr                    16384  1
aes_arm                16384  2
aes_generic            40960  1 aes_arm
libaes                 16384  2 aes_arm,aes_generic

Is the fact that this module wasn't there a bug? Or that just the way it works?

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1058
Re: Wifi on PI 1 with USB adapter
« Reply #14 on: October 02, 2021, 08:19:09 PM »
It’s an oversight.  We purposely leave out modules that are normally not needed, to keep the size small.   But we should include the full dependency chain.