WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Problem with rtl8188EUS wifi USB adapter  (Read 11538 times)

Offline notferrari

  • Newbie
  • *
  • Posts: 8
Problem with rtl8188EUS wifi USB adapter
« on: September 20, 2023, 12:27:06 PM »
I've installed (via "tc-install") coreplus on a pretty old machine (x86 single-core, around 500MHz processor, about 512MB RAM), and managed to boot correctly and use it from ethernet cable.
I have a TP-Link wifi adapter (RTL8188EUS on "lsusb") that i'd like to use with it, but it looks like tc isn't identifying it correctly.

"sudo wifi.sh" does not identify it as a wifi interface, and "dmesg" only shows lines for connecting the device.

I've also tried to install some packages (namely "firmware-rtlwifi", "firmware-wlan" and "wireless-6.1.2-tinycore"), but also no success.

Is there anything I could do to make it work?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: Problem with rtl8188EUS wifi USB adapter
« Reply #1 on: September 20, 2023, 12:31:26 PM »
That looks like one of the staging drivers, which we do not ship. You would need to compile either the staging driver, or their third-party driver.
The only barriers that can stop you are the ones you create yourself.

Offline notferrari

  • Newbie
  • *
  • Posts: 8
Re: Problem with rtl8188EUS wifi USB adapter
« Reply #2 on: September 20, 2023, 12:43:00 PM »
Are there any instructions on how should I do this?

Also, I've found this: https://github.com/lwfinger/rtl8188eu.
Is it just enough to follow repo's instructions? Should I need to do extra steps because of TinyCore architecture?

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1522
Re: Problem with rtl8188EUS wifi USB adapter
« Reply #3 on: September 20, 2023, 03:49:20 PM »
Are there any instructions on how should I do this?
...
Is it just enough to follow repo's instructions? Should I need to do extra steps because of TinyCore architecture?

The x86_64 repo has 88x2bu.tcz and 8188eu.tcz extensions. You are on x86 so those extensions are not going to help you, but you can consult the notes on how those extensions were built. Process to build 8188eu on x86 is probably identical or nearly so.

http://repo.tinycorelinux.net/14.x/x86_64/tcz/src/88x2bu/compilation
http://repo.tinycorelinux.net/14.x/x86_64/tcz/src/rtl8188eu/build-8188eu.sh

aus9

  • Guest
Re: Problem with rtl8188EUS wifi USB adapter
« Reply #4 on: September 20, 2023, 07:05:37 PM »
Hi

Quote
TP-Link wifi adapter (RTL8188EUS
Lets confirm we have a match for your adapter to my TC64 vendor and product ids

1) download and load usb-utils then post the output for your adapter for command
Code: [Select]
lsusb
NOT OP mine is Bus 001 Device 005: ID 2357:010c TP-Link TL-WN722N v2/v3 [Realtek RTL8188EUS]

TC64 vendor and product ids are little hard to read but they are
Code: [Select]
modinfo 8188eu | grep usb:
alias:          usb:v0BDApFFEFd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0B05p18F0d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2C4Ep0102d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp8179d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2357p0111d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2357p010Cd*dc*dsc*dp*ic*isc*ip*in* # this is my slow class N device
alias:          usb:v056Ep4008d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2001p331Bd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2001p3311d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2001p3310d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v2001p330Fd*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0DF6p0076d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v7392pB811d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v07B8p8179d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp0179d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp8179d*dc*dsc*dp*ic*isc*ip*in*;;

I have been busy doing stuff on RPi and had no plans to build this for TC32. I have no problem if you can build it if you have a match.
If you prefer I build it, it may take me some time but if built I can send a pm for you to get the TCE early as there can be a few weeks delay in submission being carefully checked for TC compliance etc.

class N speeds are slow.....have you considered buying an ac speed dongle?
Mine is single antenna in theory max 150 megabits per second
Some members here may be able to give you their suggestions
« Last Edit: September 20, 2023, 07:19:55 PM by aus9 »

aus9

  • Guest
Re: Problem with rtl8188EUS wifi USB adapter
« Reply #5 on: September 20, 2023, 09:33:09 PM »
there is at least one error in my script
change this line chmod -R 755 $P/usr/local/tce.installed to
chmod -R 775 $P/usr/local/tce.installed

submitqc --libs should have fixed that with luck
« Last Edit: September 20, 2023, 09:35:23 PM by aus9 »

Offline notferrari

  • Newbie
  • *
  • Posts: 8
Re: Problem with rtl8188EUS wifi USB adapter
« Reply #6 on: September 21, 2023, 08:36:12 AM »

The x86_64 repo has 88x2bu.tcz and 8188eu.tcz extensions. You are on x86 so those extensions are not going to help you, but you can consult the notes on how those extensions were built. Process to build 8188eu on x86 is probably identical or nearly so.

http://repo.tinycorelinux.net/14.x/x86_64/tcz/src/88x2bu/compilation
http://repo.tinycorelinux.net/14.x/x86_64/tcz/src/rtl8188eu/build-8188eu.sh


I've tried to use this script with some changes (inside attachment), and it looks like it almost worked. It tries to find "/lib/modules/6.1.2-tinycore/build", which doesn't exist. It also fails to apply patch (I tried to apply anyways and no difference on this part). The full output is also inside attachment.

Looking trough tips inside the script and the 88x2bu link, it looks like a step is missing, and I really don't understand what do I need to do with that part:
Code: [Select]
tce-load -wi compiletc perl5 bash ncursesw-dev bc glibc_apps elfutils-dev gettext

http://repo.tinycorelinux.net/14.x/x86_64/release/src/kernel/linux-6.1.2-patched.txz
http://repo.tinycorelinux.net/14.x/x86_64/release/src/kernel/config-6.1.2-tinycore64

$ cd linux-6.1.2
$ make mrproper
$ cp ../config-6.1.2-tinycore64 .config
$ make oldconfig
$ make prepare
$ make modules_prepare
# ln -s $HOME/Downloads/linux-6.1.2 /lib/modules/6.1.2-tinycore64/build

The "tce-load" part is straightforward. But the links and the "cd linux-6.1.2" part is weird to me. Which path should this folder be?

Lets confirm we have a match for your adapter to my TC64 vendor and product ids

1) download and load usb-utils then post the output for your adapter for command
Code: [Select]
lsusb

Also added to attachment.

class N speeds are slow.....have you considered buying an ac speed dongle?
Mine is single antenna in theory max 150 megabits per second
Some members here may be able to give you their suggestions

Just like the PC, it's a leftover that I'd like to use on some simple projects.

there is at least one error in my script
change this line chmod -R 755 $P/usr/local/tce.installed to
chmod -R 775 $P/usr/local/tce.installed

submitqc --libs should have fixed that with luck

Tried the change, no difference.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11654
Re: Problem with rtl8188EUS wifi USB adapter
« Reply #7 on: September 21, 2023, 09:03:49 AM »
Hi notferrari
...
Code: [Select]
tce-load -wi compiletc perl5 bash ncursesw-dev bc glibc_apps elfutils-dev gettext

http://repo.tinycorelinux.net/14.x/x86_64/release/src/kernel/linux-6.1.2-patched.txz
http://repo.tinycorelinux.net/14.x/x86_64/release/src/kernel/config-6.1.2-tinycore64

$ cd linux-6.1.2
$ make mrproper
$ cp ../config-6.1.2-tinycore64 .config
$ make oldconfig
$ make prepare
$ make modules_prepare
# ln -s $HOME/Downloads/linux-6.1.2 /lib/modules/6.1.2-tinycore64/build
...

I see a few things that might be causing problems. One of them
is that the step to untar the source package is implied instead
of being stated.

See if this version gets you any further:
Code: [Select]
tce-load -wi compiletc perl5 bash ncursesw-dev bc glibc_apps elfutils-dev gettext

# Fetch source and configuration files.
wget http://repo.tinycorelinux.net/14.x/x86/release/src/kernel/linux-6.1.2-patched.txz
wget http://repo.tinycorelinux.net/14.x/x86/release/src/kernel/config-6.1.2-tinycore

$ tar xf linux-6.1.2-patched.txz
$ cd linux-6.1.2
$ make mrproper
$ cp ../config-6.1.2-tinycore .config
$ make oldconfig
$ make prepare
$ make modules_prepare
# ln -s $HOME/Downloads/linux-6.1.2 /lib/modules/6.1.2-tinycore/build

Offline notferrari

  • Newbie
  • *
  • Posts: 8
Re: Problem with rtl8188EUS wifi USB adapter
« Reply #8 on: September 21, 2023, 10:18:50 AM »
Code: [Select]
tar xf linux-6.1.2-patched.txzIt gives me the error:
Code: [Select]
tar: can't create symlink 'linux-6.1.2/scripts/dummy-tools/objcopy' to 'ld': Operation not permittedeven if I run as root.

Apart from that, all "make" commands gives "nothing to do" result.

aus9

  • Guest
Re: Problem with rtl8188EUS wifi USB adapter
« Reply #9 on: September 21, 2023, 10:54:39 AM »
your lsusb confirms that you could use my TC64 converted to TC32 except I do not detail the kernel prep.

see attachment for modified 8188eu for TC32 Good Luck
changes are...flags.....git source is already patched.....dep file had a duplication when you load wifi.tcz

2) The kernel prep is not working for me....I have some memory/RAM issues

3) In addition to what you have already downloaded and unpacked
suggest you include this for download and unpack
Code: [Select]
wget http://tinycorelinux.net/14.x/x86/release/src/kernel/Module.symvers-6.1.2-tinycore.gz
gunzip Module.symvers-6.1.2-tinycore.gz

Please keep copies of all downloads or better still keep copies somewhere of your unpacks

more suggestions. I do all my downloads to /tmp
Use root powers to create a dir /usr/src
Code: [Select]
sudo mkdir -p /usr/srcUse root powers to copy your unpacked kernel source into that new dir
But I use sudo mc to do the copy but you "need"
/usr/src/linux-6.1.2

Then
Code: [Select]
ln -s /usr/src/linux-6.1.2 /lib/modules/6.1.2-tinycore/build
SRC=/usr/src/linux-6.1.2
cd $SRC
make mrproper  # seconds
mv /tmp/config-6.1.2-tinycore .config
make oldconfig  # seconds
make prepare  # about 10 seconds
make modules_prepare  # seconds
make modules

make modules borks for me

I am aware I am confusing you with your use of Downloads vs my use of /usr/src etc





Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: Problem with rtl8188EUS wifi USB adapter
« Reply #10 on: September 21, 2023, 12:22:09 PM »
The symlink error sounds like you're operating on fat32. A linux fs is necessary.
The only barriers that can stop you are the ones you create yourself.

aus9

  • Guest
Re: Problem with rtl8188EUS wifi USB adapter
« Reply #11 on: September 21, 2023, 10:09:50 PM »
correction to above for me....
my steps should have included the symversions so my end bits become
Quote
make modules_prepare  # seconds
mv /tmp/Module.symvers-6.1.2-tinycore $SRC
make modules


aus9

  • Guest
Re: Problem with rtl8188EUS wifi USB adapter
« Reply #12 on: September 21, 2023, 10:52:24 PM »
I am going to have a re-look on TC64 how I built it in terms of kernel prep.
On TC32 I can not get past make modules or make modules install bit

on TC32 skipping that and only going to make_modules prep then for 8188eu
Code: [Select]
make all
SNIP
MODPOST /tmp/rtl8188eu/Module.symvers
WARNING: Module.symvers is missing.
         Modules may not have dependencies or modversions.
         You may get many unresolved symbol warnings.
SNIP
WARNING: modpost: suppressed 191 unresolved symbol warnings because there were too many)

# lets just see about direct injection
make install
install -p -m 644 8188eu.ko  /lib/modules/6.1.2-tinycore/kernel/drivers/net/wireless/
/sbin/depmod -a 6.1.2-tinycore
# Looks good eh? but
modprobe 8188eu
modprobe: can't load module 8188eu (kernel/drivers/net/wireless/8188eu.ko): unknown symbol in module, or unknown parameter

I think I may have no choice but research cross compile using a 64 bit kernel

Your thoughts?

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1248
Re: Problem with rtl8188EUS wifi USB adapter
« Reply #13 on: September 22, 2023, 06:52:47 AM »
I have always needed System.map as well, and you need to copy them before you run. modules_prepare.

This is from once of my scripts for out of tree drivers.
Code: [Select]
cd $LINUX_SRC_DIR
echo "[ INFO ] Cleaning linux source tree"
make -s mrproper

echo "[ INFO ] Copying configs and symbols"
xz -d -kc /tmp/config.xz > .config
xz -d -kc /tmp/System.map.xz > System.map
xz -d -kc /tmp/Module.symvers.xz > Module.symvers

sudo rm /lib/modules/${KERNELVER}/build
[ ! -d /lib/modules/${KERNELVER} ] && sudo mkdir -p /lib/modules/${KERNELVER}
sudo ln -sv $LINUX_SRC_DIR /lib/modules/${KERNELVER}/build

echo "[ INFO ] Preparing Kernel"
make -s -j4 KERNELRELEASE=$KERNELVER oldconfig
make -s -j4 KERNELRELEASE=$KERNELVER scripts
make -s -j4 KERNELRELEASE=$KERNELVER modules_prepare

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 716
Re: Problem with rtl8188EUS wifi USB adapter
« Reply #14 on: September 22, 2023, 08:12:24 AM »
Just some thoughts from me.

Could it be useful to use qemu-system-i386 -enable-kvm to run tc32 into tc64 and compile instead of cross-compile, because it's very easy to get the host within the target, if not using like chroot.