-
-
Save MBing/de297a8ae5e8a191c55a67a568d20d31 to your computer and use it in GitHub Desktop.
# DO NOT PUT THE WIFI DONGLE IN THE DEVICE BEFORE MENTIONED EXPLICITLY BELOW | |
# Brief note, after this the UI will not show the usb dongle, | |
# the wifi does work and I get an IP address, so all works, | |
# but I don't go into detail of making it show on the Raspbian UI. | |
# (for this purpose I don't care about the UI) | |
# For the use of this I connected my device to an ethernet connection and through the Router could see the IP which I can SSH into. | |
## STEP 1: Prepare machine and install packages needed | |
# Make sure the system is up to date and all that needs to be installed is installed | |
`sudo apt-get update && sudo apt-get install -f` | |
# I also upgrade my distro, but this step can be skipped | |
`sudo apt-get dist-upgrade` | |
# Install some necessary packages as we will build the source firmware ourselves | |
`sudo apt-get install -y build-essential git` | |
# There is a package for raspberry pi to add the kernel headers, so you can pick one here (if one doesn't work, use the other) | |
`sudo apt-get install -y linux-headers` | |
`sudo apt-get install -y raspberrypi-kernel-headers` | |
# reboot for changes to take effect | |
`sudo reboot` | |
## STEP 2: Get and install the firmware for TP-Link-WN725N Nano | |
# Download the Github package (for best support use git clone instead of zip) | |
# I just put this on my home folder as I am not using this RPI for any other purpose than a livecam | |
`git clone https://github.com/lwfinger/rtl8188eu.git` | |
# Go into the new folder | |
`cd rtl8188eu` | |
# Make the source for your machine | |
`make` | |
# Install the firmware that was just build for your machine | |
`sudo make install` | |
# Reboot for changes to take effect | |
`sudo reboot` | |
# Shutdown now as we need to have the usb dongle in the RPI on startup | |
`sudo shutdown -h now` | |
## STEP 3: (INSERT USB DONGLE BEFORE CONTINUING) Check if dongle is recognized by the system | |
# After starting your rpi check if it now recognizes your wifi dongle | |
`lsusb` | |
# This should show something like `BUS 00X .... REALTEK... RTL8188EUS... Wireless Network Adapter` | |
# Great your wifi dongle is now recognised. If not, you probably don't have this dongle or you need to repeat the above steps. | |
# Check if modules are being loaded | |
`lsmod` | |
# Search for something like `8188eu ... 0` | |
# Check if wlan0 is present | |
`ifconfig -a` | |
# There should be quite some output next to and under `wlan0`, if there's an IP address already visible, skip all next steps it's working. | |
## STEP 4: Setup wifi settings | |
# Add wifi settings | |
`sudo vi /etc/network/interfaces` | |
# Search for `auto wlan0` at the start, if it's not there, add it and keep the file open | |
# Make sure it knows where to find the wpa config | |
# Add these lines to the bottom of the same file: | |
``` | |
allow-hotplug wlan0 | |
iface wlan0 inet dhcp | |
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf | |
iface default inet dhcp | |
``` | |
## STEP 5: Connect to wifi | |
# The file `wpa_supplicant.conf` might already exist and might have some lines, add these below: | |
``` | |
network={ | |
ssid="YOUR_NETWORK_NAME" | |
psk="YOUR_NETWORK_PASSWORD" | |
proto=RSN | |
key_mgmt=WPA-PSK | |
pairwise=CCMP | |
auth_alg=OPEN | |
} | |
``` | |
# Replace `YOUR_NETWORK_NAME` & `YOUR_NETWORK_PASSWORD` with your own credentials. | |
# Reboot and connect | |
`sudo reboot` | |
# To test after reboot if your wifi is working, you can open the browser or go to the terminal | |
`ifconfig -a` | |
# This will now have an ip-address next to `wlan0` which you can use for ssh or whatever. | |
# Congrats! | |
## Resources used: | |
# The dongle on Amazon: https://www.amazon.de/TP-Link-TL-WN725N-Adapter-Suitable-10-9-10-13/dp/B008IFXQFU/ | |
# The Firmware: https://github.com/lwfinger/rtl8188eu | |
# Troubleshooting on RPI: https://www.raspberrypi.org/forums/viewtopic.php?t=44044 | |
# Wifi auto connect on RPI: https://weworkweplay.com/play/automatically-connect-a-raspberry-pi-to-a-wifi-network/ | |
# Extra resource for rpi-source: https://blog.samat.org/2014/12/15/realtek-8188eu-based-wi-fi-adapters-on-the-raspberry-pi/ | |
@rdesmarais2
Hi, It seems that you are not familiar with using vi
editor. Either search for a tutorial on using vi
or use nano
instead:
sudo nano /etc/network/interfaces
@rdesmarais2 Hi, It seems that you are not familiar with using
vi
editor. Either search for a tutorial on usingvi
or usenano
instead:sudo nano /etc/network/interfaces
You were correct. Read a guide, Nano was better for me. Thank you! Sorry I didn't know what vi was to even search for it lol.
Note: if you are doing it in raspberry pi 4, change wlan0 to wlan1
Thanks! Confirmed to work with Raspberry Pi 2B + Raspberry PI OS 5.15.76-v7+
Got it working on RPI 2B with Raspberry PI OS (32-bit) Linux 5.15.61 #1579 by following steps 4 and 5. Thank you!
You can solve it also when on Linux 5.1x where 8188eu
was updated (and assuming your dongle was listed in lsusb
result) using only /etc/network/interfaces
file.
Add following to the end of the file:
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "<SSID_HERE>"
wpa-psk "<PASSWORD_HERE>"
Hi all,
I followed the advice of septicwolf818 but raspberry doesn't see any wi-fi interface.
I ran the command "lsusb" and raspberry sees Wireless Network Adapter (Bus 001 Device 004: Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter).
The firmware on my raspberry pi2 model B v1.1 is 5.15.90-v7+, but I launched the lsmod command and I didn't find the module 8188..eu.
Only module with number is 8021q.
So I followed the guide step by step, but when I try to run the make command (after install Github package) the terminal show this error:
make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.15.90-v7+/build M=/home/masterfitness/rtl8188eu modules
make[1]: *** /lib/modules/5.15.90-v7+/build: File or directory does not exist. Stop.
make: *** [Makefile:155: modules] Errore 2
Can you help me?
Thank!
Hi all, I followed the advice of septicwolf818 but raspberry doesn't see any wi-fi interface. I ran the command "lsusb" and raspberry sees Wireless Network Adapter (Bus 001 Device 004: Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter). The firmware on my raspberry pi2 model B v1.1 is 5.15.90-v7+, but I launched the lsmod command and I didn't find the module 8188..eu. Only module with number is 8021q. So I followed the guide step by step, but when I try to run the make command (after install Github package) the terminal show this error: make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.15.90-v7+/build M=/home/masterfitness/rtl8188eu modules make[1]: *** /lib/modules/5.15.90-v7+/build: File or directory does not exist. Stop. make: *** [Makefile:155: modules] Errore 2
Can you help me? Thank!
Try this approach
- Install Linux headers (You may get a message that you try to install a virtual package and you have to install a concrete package. Use
apt-cache search linux-headers
in terminal to search for a package name)
In terminal:sudo apt-get install linux-headers
- Install the concrete package
In terminal:sudo apt-get install linux-headers-<kernel version>-rpi
- You have to link the new build folder with the missing folder.
In terminal:sudo ln -s /lib/modules/<kernel version>-rpi/build /lib/modules/<kernel version>/build
Hi @septicwolf818 , thank for your support!
I installed the linux header (raspberry-kernel-headers) and I have the ultimate version now (1:1.20230106-1).
But when I try a install the concrete package with this command: sudo apt-get install raspberrypi-kernel-headers-5.15.92-v7+-rpi
But terminal shows this message:
E: Could not find package raspberrypi-kernel-headers-5.15.92-v7+-rpi
E: Could not find any packages via glob "raspberrypi-kernel-headers-5.15.92-v7+-rpi"
E: Could not find any packages via regular expression "raspberrypi-kernel-headers-5.15.92-v7+-rpi"
I tried change raspberrypi-kernel-headers with linux-headers but the result is the same.
Ps: I did the update the kernel version by the sudo rpi-update command, I have 5.15.92-v7+ version now.
@gianluca7cristaudo
Use sudo apt list -a raspberrypi-kernel raspberrypi-kernel-headers
to list available packages.
Follow match Kernel version and kernel header version - forums.raspberrypi.com thread for more instructions.
I solved the problem by downgrading the kernel and installing the drivers.
After doing this, through the ifconfig -a command, I saw the wlan0 field.
Then I followed point 5 of this guide.
Thank you!
I got my Pi Zero (5.15.84+ #1613 kernel) working with a TP-Link Wi-Fi adapter (8188eu), following the above instruction from step 4. As Mdvorak mentioned I also needed to add to /etc/network/interfaces.d/wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Thanks MBing and Mdvorak
Hi!
I have a Raspberry Pi 1 B+ with latest updates and first it seems that I established a connection following the instruction beginning with STEP 4 as Mdvorak mentioned.
But after some seconds or sometimes minutes the ping gets unstable. Then it is also changing IP address. Normally it is a 192.168.0.xxx and after i lost connection i reconnected via ethernet and checked out ifconfig
. Suddenly it is a total different one 169.254.251.247
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.251.247 netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::7b44:dee5:6968:328d prefixlen 64 scopeid 0x20
ether 34:60:f9:55:a6:9d txqueuelen 1000 (Ethernet)
RX packets 12438 bytes 1287911 (1.2 MiB)
RX errors 0 dropped 81 overruns 0 frame 0
TX packets 1098 bytes 141969 (138.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
then i unplugged the wifi usb stick and plugged it in again. The connection reastablished
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.0.53 netmask 255.255.255.0 broadcast 192.168.0.255
ether 34:60:f9:55:a6:9d txqueuelen 1000 (Ethernet)
RX packets 210 bytes 22462 (21.9 KiB)
RX errors 0 dropped 154 overruns 0 frame 0
TX packets 42 bytes 7013 (6.8 KiB)
TX errors 0 dropped 4 overruns 0 carrier 0 collisions 0
but then changed again to
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.54 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::7b44:dee5:6968:328d prefixlen 64 scopeid 0x20
ether 34:60:f9:55:a6:9d txqueuelen 1000 (Ethernet)
RX packets 2598 bytes 318570 (311.1 KiB)
RX errors 0 dropped 221 overruns 0 frame 0
TX packets 570 bytes 91967 (89.8 KiB)
TX errors 0 dropped 4 overruns 0 carrier 0 collisions 0
Does anyone of you have a clue whats wrong here?
sudo apt list -a raspberrypi-kernel raspberrypi-kernel-headers
raspberrypi-kernel-headers/stable 1:1.20230106-1 armhf
raspberrypi-kernel/stable,now 1:1.20230106-1 armhf [installed]
Thank you!
It worked on a Pi 1 B, thanks!
It worked also on Kernel 6+ Version. Thank you!
@shapsix I've tried it on latest MainsailOS 1.1.1, and I have same issue. It connects fine, but the longer it runs, the higher packet loss. And when the signal quality drops even slightest, packet loss goes to 100%.
The behavior of the IP addresses and routes points to faulty driver (module). I've set all to static IP addresses and disabled dhcp altogether - it fixed routes, but it did not solve packet loss issue.
It is absolutely unusable. Works fine with the old system :-(
It worked perfectly on a Rpi 3b +, thank you!
Works to this day! Thanks!
For someone maybe having the same problem I've had, yes the SSID and Password should be between "" NOT without
hi, on my installation attempt it fails at the LS mode step and does not show up in the ifconfig. I am installing on a rpi 2b under lated moode os (raspberrian lite 32 bit)
It worked also on Kernel 6+ Version. Thank you!
@val3ri Did you have to build the kernel module to get this wifi dongle on kenel 6.* running? Are steps 1 to step 5 needed or are step 4 and 5 enough to get it working on kernel 6? I found out that in kernel 6 there is a kernel module r8188eu that should be an the new default for the rtl8188EU chips. Does this work on kernel 6.1.21-v8+ for the Raspberrys?
Hello, thank you for your contribution, I performed all the steps, everything checked, the interface exists and configured, but it does not change to UP, I appreciate any help.
Marco - PU2MUS
Thanks a lot for the valuable steps. I was checking here since the http://downloads.fars-robotics.net/wifi-drivers/8188eu-drivers/ which I downloaded the driver previously was down now. Your steps worked like a charm ๐
This worked perfectly for me. I used this guide on a Raspberry Pi Zero 1.3.
I used the Ethernet Gadget mode to perform steps 1 and 2 since my Pi doesn't have built-in WiFi. I preconfigured my network interface and wpa_supplicant before restarting since I had to unplug from my computer and put the TP-Link dongle into the only USB port (with an adapter) .
I'm pretty not good at this stuff and this guide made it all finally make sense to me. Thank you!
my pi recognizes the interface, sees the SSID and when I select it and Apply in the Network Settings (graphical UI), it does nothing. The same network is configured in the supplicant conf. when i mouse over the interaces icon on the top right bar it says wlan0 is not associated. Not sure where to go from here.
Thanks a lot for the valuable steps. I was checking here since the http://downloads.fars-robotics.net/wifi-drivers/8188eu-drivers/ which I downloaded the driver previously was down now. Your steps worked like a charm ๐
Ive tried to follow the installations several times. I even tried installed the old distro (5.15.61-v7l+) to correspond with the latest distro at the time when most of the comments confirmed that the instructions were working. With both the newest (and older) distro I get stuck have the "make" command. Below is the error message I receive
~/rtl8188eu $ make
make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.15.61-v7l+/build M=/home/user/rtl8188eu modules
make[1]: *** /lib/modules/5.15.61-v7l+/build: No such file or directory. Stop.
make: *** [Makefile:155: modules] Error 2
Any advice on how to fix this?
Thank you!
I don't know why, but for me the wpa_supplicant just wasn't connecting to my wi-fi. I own Raspberry 1 B. I switched to NetworkManager (disabled wpa_supplicant service, removed changes in /etc/network/interfaces) and suddenly raspberry connected sucessfully. Actually if you have the settings preconfigured from raspi install, you shouldn't need any extra steps to connect to wifi after USB insert. Run nmcli device
and go from there based on wlan0 status. But I did a lot of steps, so it's possible some of them are neccessary and I just don't know it.
It's 2025 and I'm using this dongle on an ancient RPi 1 B+. Bleeding thank you for putting this together. This was the only howto that worked to get the dongle working. All day wasted until I got to your guide!. Thank you.
Btw. I actually reinstalled my OS a lot of times after my first comment. Every time I just did full-upgrade (dist-upgrade), rebooted and dongle started to work without me doing anything. I recommend everyone to atleast try first!
I am having a lot of trouble getting this to work on my PI2B. I am doing just steps 4 and 5 as stated by mrhosseini. When trying to edit /etc/network/interfaces they keyboard often does random things. It will type the wrong letter, it will delete lines. takes me like 30 minutes of messing with it to the the text I need in there. I edit the text file for step 5 in notepad++ after I install the image file onto the SD Card. The funny thing is....the LED light on the USB dongle lights up until I do step 4 then it wont light up anymore. Also I get errors during start up of something like DHCP failed to start on all interfaces.