Skip to main content
  • 2 months ago
Tired of seeing "Linux: No" on every review for the TP-Link AC600 USB WiFi adapter? I was too... until I got it working perfectly on my Raspberry Pi.

In this no-BS tutorial I walk you through:
- Identifying the chipset with lsusb
- Finding the right GitHub driver repo (rtl8812au / rtl8821au)
- Compiling the driver from source on Raspberry Pi (32-bit or 64-bit)
- Speeding up make with -j4
- Installing the module and making it load on boot
- Setting up DKMS so it survives kernel updates
- Verifying it works after reboot
- Checking if it supports Access Point mode

Yes, this actually works. Yes, I did it on a real Raspberry Pi (not some x86 box). And yes, you can do it too even if you're still getting comfortable with the terminal.

Timestamps in the video so you can jump straight to what you need.

If you're trying to add a second WiFi radio, improve range, or turn your Pi into a proper access point - this is the video that finally makes the cheap AC600 dongle useful on Linux.

Introduction 00:00:00
Why this adapter doesn't work out-of-the-box 00:00:28
Finding the chipset with lsusb 00:02:05
Searching GitHub for drivers 00:03:16
Choosing a driver repository 00:04:42
Installing git and cloning repo 00:06:12
Reading the README 00:07:35
Editing Makefile for Raspberry Pi 00:07:56
Installing build-essential 00:09:14
Compiling the driver (make -j4) 00:09:27
Using screen for long tasks 00:10:33
Installing the module 00:11:12
Checking if WiFi interface appears 00:11:46
Making driver load on boot 00:12:13
Installing DKMS for auto-rebuild 00:12:52
Fixing DKMS mistake 00:15:11
DKMS finally finishes 00:17:00
Adding module to /etc/modules 00:17:09
Reboot and verify persistence 00:17:48
Checking Access Point support 00:18:26
Conclusion and wrap-up 00:19:08
Thanks and subscribe 00:19:22


Thanks for watching!


Find us on other social media here:
- https://www.NeuralLantern.com/social

Please help support us!

- Subscribing + Sharing on Social Media
- Leaving a comment or suggestion
- Subscribing to our Blog
- Watching the main "pinned" video of this channel for offers and extras

Transcript
00:00Hello there!
00:03Let's learn how to compile drivers for a USB Wi-Fi adapter from source.
00:07We're going to be getting this adapter to work.
00:09It's called the TP-Link AC600 USB Wi-Fi adapter, which runs on 802.11ac.
00:15Reviews for this say that it does not actually work for Linux, but I got it to work,
00:20so I'm going to show you how I got it to work on my Raspberry Pi.
00:30Anyway, so what am I talking about here?
00:32Okay, so, you know, you get a Raspberry Pi and you want to hook it up to a second Wi-Fi radio
00:37because you want to make an access point or do more networking stuff
00:40or the range on the built-in radio is crappy so you want a better antenna or something like that.
00:46And you plug it in after waiting for it to ship to you and it doesn't work and you're really, really sad.
00:50And then you go to the reviews and you finally notice that all the reviews said,
00:54this adapter doesn't work for Linux, right?
00:57That's still true for a lot of adapters, but for this one, it did say all over the place,
01:02all over the reviews that I found that this doesn't work for Linux, but I got it to work
01:05because there are drivers you can find online and install if you're just willing to do a little bit of work.
01:09It's not really that much work.
01:11If you don't know how to use the command line or connect to machines over SSH,
01:15you probably want to just check out my other videos real fast.
01:18I show you how to do all that stuff.
01:20In this video, I'm just going to basically assume that knowledge
01:23and just kind of show you how to find drivers that might relate to your dongle and install them.
01:30So this video is about this particular dongle.
01:32But the idea that I'm showing you can work for a lot of different dongles.
01:36I actually just use this idea for a different dongle earlier today.
01:39So the first thing that we're going to do is we're going to try to figure out like,
01:45what is the driver that we're supposed to be finding, right?
01:48So this is like the Raspberry Pi website. It's not on there for sure.
01:51We've got a bunch of new stuff that I should probably have hidden.
01:54Who cares?
01:56Let me actually...
01:59Okay, I've got a Raspberry Pi that's online right now.
02:02This is not the thing that you're looking at right now.
02:04You're looking at my VM.
02:05So I'm going to plug this adapter, this dongle into my Pi.
02:10And then I'm going to use a program called LSUSB to list all the USB devices.
02:18If that program is not on your...
02:21If it's not on your Pi yet, it should be on your Pi by default.
02:26But if it's not, you can do something like pseudo app install USB utils.
02:30Obviously you need to be online because I'm in my Pi right now.
02:33But I'm going to go pseudo LSUSB and hope that it shows up.
02:37Okay, so it shows up.
02:39Notice how it says TP-Link Archer and then it kind of gives a little bit of a description of the dongle.
02:43If you're not sure which thing it is in this listing, you probably want to list before you put in the dongle
02:49and then list again after you put in the dongle.
02:52I'm lucky it shows me kind of like the driver that I'm supposed to be searching for.
02:56So I can search for RTL8821.
02:59And then if it doesn't show you that, you can actually just search for these numbers right here.
03:05This little ID here.
03:08This will kind of give you a decent idea of what dongle you have if you search for specifically that number online.
03:14So I'm going to like search for, you know, this right.
03:17For me, I already found the repository.
03:20So I'm just going to give you like a couple of tips and tricks of what you could do.
03:24You could say drivers and then search for that.
03:28You could also search for a right seat.
03:32So that the device ID already showed us the drivers.
03:35There's probably some links here to some drivers you can find online.
03:38A good place to check is github.com.
03:41They have tons of repositories.
03:44For some reason, they don't like it when I'm on this VM.
03:46I don't know why they always tell me I'm searching too fast.
03:49So let's see if that actually works.
03:51But so I'm going to go back here and I'm going to search for this little thing here,
03:54which you could eventually find if you started with the search for the device ID in USB.
04:00But I'm going to go on to GitHub and see if see if that shows up anywhere.
04:04Okay, it shows up.
04:06These are not the repositories that I'm going to use.
04:09The one that I use successfully is somewhere down here.
04:12Sometimes this is trial and error.
04:14You might have to try several different repos,
04:16but probably a good rule of thumb is if you just entered the name of the,
04:22you know, the like little driver description here,
04:25then you don't really need to sort by relevancy.
04:28So I'm going to sort by most stars,
04:31which not always, but sometimes it tends to tell you which repositories are better,
04:36which ones more people have favorited, right?
04:39So yeah, this might work.
04:42And then you look at the latest push last updated April 8th.
04:46I don't know about that, man.
04:47So you just kind of keep scrolling down until you find something that looks good.
04:51For me and this particular adapter,
04:54I ended up settling on this repository right here.
04:57I don't even think this is the best repo, but that is what I settled on.
05:00So I'm going to paste this one.
05:03And so this is the repository that got it working for me on this system.
05:07There's a newer one I found that I think will probably work too,
05:10but I just want to stick with what works.
05:12This works.
05:13I'm fine.
05:14I'm fine now.
05:15I don't need any more.
05:16Although that's not super smart.
05:18You should probably find the best.
05:19So if you go to the homepage,
05:22you should carefully read all the instructions
05:25because it'll tell you basically how to build the driver.
05:28If you're trying to follow along with this video with like a different,
05:33you know, dongle, this advice can still work for you.
05:37You probably just have to read the read me.
05:39There's a file called read me in there and just follow everything.
05:42It says for this one in particular, it's kind of simple.
05:44It just tells me to change a few things and then run like a make
05:47and then run like a make build and whatever.
05:50So, but I'm just telling you,
05:51if you end up on a different repo because you have a different USB dongle,
05:54you just have to read the instructions.
05:56And then the process is probably very similar besides that.
06:00So what am I going to do here?
06:01Let's go back into the pie and let's clone this repository.
06:05The first thing before we can actually clone repos,
06:07what is a repo is just like a place where you store code, right?
06:11So we have to install a tool called Git.
06:14So I'm going to say sudo apt install git.
06:17Git is just a program that helps programmers,
06:20you know, track changes to their code and like collaborate with each other
06:24and gives them nice history and logs.
06:26And it's, it's really great.
06:27It's taken the world by storm.
06:29So I'm going to install that first.
06:31And then I'm going to go into a special directory called opt.
06:34So CD slash opt, you don't have to clone the repo here, but I like to do,
06:39you know, wild, wild, wild, wild west repos here,
06:43because I feel like the slash opt directory is for optional software
06:47that you're just kind of installing yourself.
06:49And it's like outside the package manager.
06:51I think I read that somewhere.
06:52So I'm going to go sudo su root so that I can stay inside the root account.
06:57Being in root is not super safe, but the opt directory is owned by root.
07:02So I'm going to have to use sudo a bunch of times and I'm going to forget
07:04and it's going to be a pain in my butt.
07:06So I'm going to, I'm going to use the Git program that I've just downloaded
07:09to clone that repository.
07:11So I'm just pasting the URL of this repository that I found.
07:15Git clone and then enter it.
07:17It should contact GitHub.
07:19And now you should have a new folder.
07:21Again, if you're uncomfortable with the command line, see my other videos.
07:24So I'm going to go into this and if you look into the folder,
07:30this is the same thing that you'll see on the GitHub webpage.
07:33It even has the readme file.
07:35So if I do less readme, I can just kind of read the instructions on the pie.
07:41So what the instructions are telling me to do is I need to modify something called the make file.
07:47You don't need to know too much about make files right now.
07:50See my other videos if you're interested in learning how to do that.
07:52But this file tells a program called make how to build the driver.
07:58So I'm going to edit it and search for something called config platform.
08:05And it should be IE386.
08:07So basically, again, you don't have to know this by magic.
08:10The instructions told me to do this.
08:11I didn't guess this.
08:13Basically, by default, it's going to try to build for IE386.
08:17It's going to try to build for PC.
08:19But this is not a PC.
08:20This is a pie.
08:21It has a different CPU architecture.
08:23So I'm just going to duplicate that line and change the yes to no.
08:26For me, I like to duplicate lines that I change from default.
08:29So it's easier for me to revert later.
08:31Although I guess since I am inside of a Git repository, I could just use the Git features to go back.
08:39But so I'm looking for RPI.
08:43There we go.
08:44And I need to change that to yes.
08:46So if your pie has a 32 bit operating system, shame on you.
08:50You should probably upgrade to 64.
08:52I'm on 64 bit.
08:54So I'm just going to basically change the no to a yes, meaning, yeah, let's build for 64 bit arm Raspberry Pi.
09:01Then I think we're done editing that file and we're ready to just just just sort of like build the repository.
09:09You might need to install build essentials.
09:14I can't remember always if it's build essential or build essentials with an S.
09:19But you need to install some tools that will help you build repositories like this on your pie.
09:25So now that I've edited that make file, I'm going to do make and hit enter and it should start building.
09:31The thing, though, about make is by default, it doesn't use all of your cores.
09:37So I'm going to go back into the pie to 168.1.123.
09:42You can see that I am not actually saturating all of my CPU cores.
09:46So this is taking longer than it needs to take.
09:48With make, you can actually launch parallel jobs with dash J4 as an argument.
09:54And notice how all of my cores start to go crazy now because the whole pie is being used.
09:59It's OK to do this because the make files are almost always smart enough to launch parallel build jobs without having them conflict with each other.
10:08Like they'll the make build system will figure out in what is the correct order to build all these things unless the make file is really bad somehow.
10:15So we're just building and building and building and just kind of waiting for it to finish.
10:20Oops, that key was supposed to go down there.
10:24When it is finished.
10:27The next things that we need to do are.
10:31Oh, I should have went into a screen.
10:33I forgot if I talked about screen in this video, but basically, let me go into another terminal.
10:38There's a program called screen that you can use.
10:41Basically, if I say screen, I get a virtual screen that I can go back into later if I lose my connection.
10:50Notice how I'm outside of the pie again.
10:51I'm going to go back into the pie.
10:53If I say screen list and then screen reattach.
10:57Whoops.
10:58Reattach.
11:00My work is still there.
11:01So this is the kind of thing that you sort of want to do when you're building or doing a long running job,
11:07because you don't want the whole thing to fail if you lose connection or forget where you are or whatever.
11:12It looks like the build succeeded.
11:14Didn't take too long.
11:15Other drivers might take longer.
11:18So then the first thing or I guess the next thing that the instructions want us to do is still inside of the repository directory.
11:24It wants us to use a command that will install the module that we just built.
11:29This file right here at the end, 8812, that's the thing that we just built.
11:33So I'm going to say sudo install mod and that should get the dongle working right away.
11:39The next thing that we should do is let's just see if the dongle showed up right now.
11:46So you can at home just type IP space address and you should see on your pie an adapter for ethernet zero
11:53and ethernet or sorry, WAN zero and then also WAN one, which will be the dongle.
11:58I'm going to type also show and then wireless LAN one because I don't want to,
12:02I don't want you to see my other adapters.
12:04So it showed up.
12:05That means the driver already is working.
12:07And this, this, this dongle is fine.
12:09Now I can totally use it to make this permanent though.
12:12You have to, let's see, you have to copy a file.
12:22Let me copy a file right here real fast.
12:24So again, this is coming from the instructions of the repo.
12:27So you don't have to worry too much about this.
12:28Long story short, we're going to copy the kernel module we just made into a special folder
12:33that's named after the kernel and a wireless driver.
12:36So I'm going to copy it there.
12:37And now this might work on boot.
12:39The other thing that's kind of annoying about some of these drivers is,
12:42if you upgrade the operating system on your pie,
12:45it might actually make the drivers stop working.
12:48And then you have to like figure out how to compile them all over again.
12:51So there's a thing called DKMS that you can install with pseudo apt install.
12:58Oh, it's build essential without an S basically DKMS is what we're looking for.
13:03That will basically sort of like automatically it'll try,
13:07try to automatically recompile and reinstall drivers whenever the operating system changes too much.
13:12If you can't get this part working, it's okay.
13:15You can just come back in here and recompile the Wi-Fi whenever you need to.
13:18So now that DKMS, the package is installed in the system,
13:24I'm in now the driver folder for the Wi-Fi dongle.
13:29I'm just going to use make DKMS install.
13:32And that's a special target that works for that.
13:36What am I doing?
13:38Install pseudo make, what did I do wrong?
13:41Oh, I actually don't have DKMS on this pie.
13:46Pseudo apt install DKMS.
13:50Why don't I just do build essential while I'm at it?
13:53I'm just following the instructions finally.
13:56Okay.
13:58A kernel module something.
14:02I forgot what DKMS stands for.
14:04It's a helper.
14:06Anyway, when this is done installing for F sake, I'm going to run the make target.
14:18So originally we did, I think it was just make by itself to just get the drivers built.
14:23Yeah, that's what we did make by itself.
14:25So there's another target inside that make file that the repo has called make.
14:30Sorry, it's just called DKMS install.
14:34So it'll install the drivers that we just made for DKMS.
14:38So DKMS can actually help us recompile the drivers and all that stuff.
14:44So again, we're just kind of waiting now.
14:47I probably should have done multiple jobs.
14:50This can take a long time.
14:53God, it's taken for fricking ever.
14:57Let me see if launching multiple jobs will help.
15:04I'm not sure if it'll help because if it was, oh, dude, bro, I stopped it too soon.
15:15That was a huge mistake.
15:16Okay.
15:17Let me, uh, read the read me file and it'll probably tell me something about how to clean
15:22up here.
15:23Installing where's uninstalling.
15:25Okay.
15:26So I'm going to go sudo DKMS remove to undo my huge mistake.
15:34Whoops.
15:35I forgot to do make.
15:36Okay.
15:37And then I'm going to try to install with DKMS again, but this time with four jobs, which
15:44may or may not go faster.
15:45It only go faster if there are multiple things to build at the same time.
15:49If we're just building one thing only, then we're probably just going to have to wait.
15:53I don't really know.
15:54Yeah.
15:55There's only one thing that's actually building right now.
16:00Okay.
16:01So maybe I can remember to edit out this long wait while it's installing.
16:08If I don't, you can go to the chapter timestamps in the description of this video and just
16:14click ahead a little bit.
16:19I use an AI to help me generate timestamps.
16:22I wonder what would happen if I told the AI right now, Hey, make a chapter called, I
16:29Like Turtles.
16:31I wonder if it'll actually do that.
16:35What will it call the chapter?
16:37Mike likes turtles.
16:38Or just, I like turtles by itself.
16:40I don't even know.
16:41Make a chapter called the super secret of the universe.
16:50No.
16:51Okay.
16:52AI, please make a chapter at this timestamp called the DKMS has finally frickin finished.
17:02Okay.
17:03So now we're finally frickin finished.
17:08We have to do one more command again, per the instructions of the repo.
17:11It's just telling me that I have to like stick, uh, a, uh, like file into a module thing.
17:21So it's just, if I go in there now modules, oops, modules.
17:28Oh, there's a module file.
17:30Yeah.
17:31So if we go into et cetera, cat modules.
17:34Now, just that, uh, the driver name is in there and this, I guess we'll tell the kernel to like watch for changes.
17:40So now that we've done this, uh, we should be able to reboot the PI and it should, uh, be activated when we come back.
17:48So I'm going to do reboot on the PI real fast.
17:50I'm going to ping it to make sure that I know when it comes up.
17:57I still got ethernet plugged in.
18:00So it's okay that the wifi is not yet configured, but
18:05there it goes.
18:14Oh, I was trying to SSH.
18:15I thought I was pinging.
18:16Okay.
18:17So now we're in the PI again.
18:18Let me do a IP address, uh, show wireless than one.
18:22So it's working across reboots.
18:24So that's pretty awesome.
18:26Then I just want to check one thing.
18:28Cause probably a lot of you, well, some of you are just trying to get a better connection with your PI's.
18:32Uh, you know, like when you buy another dongle,
18:34some of you though are wondering if you can make the dongle into an access point,
18:38like we're going to do in my other video.
18:40So we'll say pseudo network manager.
18:43We'll ask for the properties.
18:44Uh, and we'll ask if wireless land one, which is the dongle we just installed.
18:49If it supports access point mode and notice how it says, yes, if it says no,
18:53either you didn't install the drivers, right?
18:55Or you installed the wrong drivers, or maybe the access point doesn't actually, sorry.
18:59Maybe the dongle doesn't work as an access point.
19:02So that part sucks.
19:04Anyway.
19:05So I think we've talked about everything that we can in this particular video.
19:08Um, uh, I hope you learned a little bit of stuff and had a little bit of fun.
19:12I hope your wifi dongle is now working and you're having a grand old time.
19:16Uh, I'll see you in the next video.
19:21Hey everybody.
19:22Thanks for watching this video again from the bottom of my heart.
19:25I really appreciate it.
19:26I do hope you did learn something and have some fun.
19:29Uh, if you could do me a please, a small little favor, could you please subscribe and follow this channel or these videos or whatever it is you do on the current social media website that you're looking at right now.
19:40Um, it would really mean the world to me and it'll help make more videos and grow this community.
19:45So we'll be able to do more videos, longer videos, better videos, or just, I'll be able to keep making videos in general.
19:51So please do, do me a kindness and, uh, and subscribe.
19:55You know, sometimes I'm sleeping in the middle of the night and I just wake up because I know somebody subscribed or followed.
20:01It just wakes me up and I get filled with joy.
20:03That's exactly what happens every single time.
20:05So you could do it as a nice favor to me or you could, you could troll me if you want to just wake me up in the middle of the night, just subscribe.
20:11And then I'll, I'll just wake up.
20:13Uh, I promise that's what will happen.
20:15Also, uh, if you look at the middle of the screen right now, you should see a QR code, which you can scan in order to go to the website, which I think is also named somewhere at the bottom of this video.
20:24And it'll take you to my main website where you can just kind of like, see all the videos I published and the services and tutorials and things that I offer and all that good stuff.
20:33And, uh, if you have a suggestion for, uh, uh, clarifications or errata or just future videos that you want to see, please leave a comment.
20:44Or if you just want to say, Hey, what's up, what's going on?
20:46You know, just send me a comment, whatever.
20:48I also wake up for those in the middle of the night.
20:50I get, I wake up in a cold sweat and I'm like, it would really, it really mean the world to me.
20:56I would really appreciate it.
20:57So again, thank you so much for watching this video and, um, enjoy the cool music as, as I fade into the darkness, which is coming for us all.
21:56Bye.
21:57Bye.
21:58Bye.
22:26Bye.
22:27Bye.
22:56Bye.
22:57Bye.
23:26Bye.
23:27Bye.
23:56Bye.
23:57Bye.
Comments

Recommended