Skip to playerSkip to main contentSkip to footer
  • 5 days ago
Join us in Scene 3 of our Raspberry Pi Wi-Fi Repeater series! This step-by-step guide walks you through compiling Wi-Fi dongle drivers from source, setting up Network Manager to connect to your router, configuring the Pi?s Wi-Fi adapter, expanding the file system, and installing DNS Masq for DHCP. Whether you?re extending your network to the garage or just geeking out, this tutorial is for you. Check out our other videos for the full setup, and subscribe to join our community of tech tinkerers!

Introduction and Recap 00:00:00
Wi-Fi Dongle Driver Compilation 00:00:04
Network Manager Setup 00:00:50
Connecting to Existing Router 00:01:05
Raspberry Pi Wi-Fi Configuration 00:03:23
Expanding File System 00:04:12
Verifying Wi-Fi Connection 00:05:05
Setting IP Address 00:06:39
Installing DNS Masq 00:08:53
Configuring DHCP Server 00:11:04
IP Forwarding Introduction 00:16:20
Closing Remarks and Subscription Call 00:16:44

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

Category

🤖
Tech
Transcript
00:00yeah there we go okay so we're back um i went away i forgot exactly what i told you before i
00:08cut the video but i went away i recorded a different video where i install the drivers
00:12for this wi-fi dongle from i compiled them from source i found them on you know github
00:17i wanted you to go to that video and use it to to learn how to compile the drivers for your own
00:23wi-fi dongle if you want to have the same dongle that i have that video i should have a link to
00:28where you can buy the same dongle that i have but if you have a different dongle that's okay
00:32the instructions in the other video should probably help you so at this point now you've gone away to
00:37compile the drivers for your wi-fi dongle and you're back you're ready to continue making your pi access
00:42point so what we should do is i'm logged into the pi right now and let's use network manager to see
00:57what's up network manager connection show we only have ethernet up right now we want to connect as
01:02a client to your existing router so remember we have two radios one is going to be the internal
01:08radio of the pi or or dongle if you wanted to buy two dongles and then the other one is going to be
01:13the dongle that we've been talking about so i mean i'm saying you can buy two dongles and stick them in
01:18the pi you want a little bit more range for me i just use the internal of the pi and then the dongle
01:23as the external so the dongle is going to connect nowhere it's just going to be an access point so
01:28that other clients can connect to it so i'm going to connect as a client specifically using wireless
01:34land zero because that's the built-in ethernet sorry wireless adapter of the pi we can do this in
01:40network manager we don't even need a desktop we'll say pseudo network manager device wi-fi connect and
01:47then we just have to specify the name of your uh original or how about your primary access point
01:56you know whatever it is whatever your wi-fi credentials are you got to put that there
01:59i'm not going to show you i'm going to type this into another window so that you don't have to see
02:05the name of my access point like a pseudo network manager uh device wi-fi connect i'm going to connect
02:14to
02:15like that the name of the access point and then after that you have to put a couple more things in
02:26so you're going to do the interface name uh you should name which radio you want to do the connecting
02:32as a client so i'm going to put wland zero because that's what we just said if name wland zero in the
02:38other window and then you want to provide the password for your wi-fi access point so i'm just
02:43going to put password here your password here and then i'm going to type that for myself up in the other
02:50window
02:50there we go
03:06okay um i think that's probably all we need right now i'm just gonna hit enter on my other window
03:13you should hit enter now
03:15um it's saying that it does not see the network we forgot to turn the radio on
03:20the the wi-fi adapter is off right now so that's that's a default thing with the raspberry pi
03:27so we'll go into a tool called raspy config raspy config raspy config um you could use a program
03:36called rf kill to activate the radio but the raspberry config is more fun
03:39so what you want to do is uh after you say you know sudo raspberry config you go into localization
03:46options and you select the wireless lan country so uh that's you know because different countries
03:54have different regulations they'll they'll restrict like the frequency bands you can use or whatever
03:57i'm not sure about all the countries but uh i'm going to find united states in the use there's only a
04:04few of us only a few use and now the uh the wi-fi should actually be on and then while we're here
04:11this is a pretty good idea um i go to advanced options and select expand file system because if
04:18you remember i'm going to do a reboot real fast yeah if you recall we uh what's going on man i want
04:26ping we wrote a very small image to the card it was only like two gigabytes or something right so
04:34that means the file system is only two gigabytes but the card is way bigger than that and i want
04:39i want to be able to take advantage of all the space on the card so that's why you expand the file
04:43system and raspberry pi has like a nice little tool that helps you do that so it's pinging again i
04:49should be able to get in there okay uh going back to my other window real fast i'm just going to check
04:57that the uh the connection actually worked so wireless land zero oh it didn't even work last
05:05time for sure so we're going to we're going to repeat that command because the wi-fi wasn't on
05:09before right so so if you recall uh we did sudo network manager device wi-fi connect and then the name
05:16your access point and then if name wireless land zero and then the password i'm going to type that
05:21into my other window here and if we're lucky it'll connect yeah okay it seems to uh have worked
05:29and then sudo and sudo connection show okay i'm going to rename the connection real fast and then i'll
05:37show it to you in the main terminal windows sudo network manager connection edit uh main one
05:44and set the connection id to um how about just like connect as client save quit show okay so now
05:56i think i can show you this so sudo network manager command line interface connections show and you can
06:02see that i am now successfully connected as a client to the rest of my network at this point i could pull
06:07out the wife uh i could pull out the ethernet adapter if i wanted to but i still don't like doing
06:12that because it's pretty easy to lose your connection and screw everything up and the ethernet is there
06:16to save you but for now i have connected as a client on wireless land zero make sure you have the right
06:21one selected and if you did it wrong you can do sudo network manager connection delete and then just
06:28name the connection but i think we're fine so let me just uh edit the uh ip address real fast
06:37edit uh connect as client you're probably going to want to do this because remember we talked before
06:46about the idea of you having ip addresses that you had to uh you know come up with to follow this
06:53video so i'm going to oh gosh what's happening there we go let me go to this one
06:58right so i'm trying to set up wireless land zero so it's going to be 147 for me
07:06maybe not the same thing for you so i'm going to go let's see i've just edited it okay so i'm going
07:13to set ipv4 dot addresses as that with a 24 block and yes i want to set to manual i want to set the
07:22gateway basically this is the same thing that we did with the ethernet already then i'm going to set
07:27the dns the only difference here between you know this connection and the ethernet connection
07:34is i'm just setting a different ip address but i'm giving it the same gateway in the same dns servers
07:38and everything so dns search home i'm going to save it and then i'm going to quit it
07:44uh at this point you could reboot the pi maybe i should do that so i can read my notes a little bit
07:51more let's reboot the pi and let's see if we can connect on the wireless interface so i think it was
07:57147 i just set up um let me do a ping at 147 so i'll know if the wi-fi comes on i may have forgotten
08:07to tell it to auto connect like i did last time but i feel like the wi-fi does that already
08:13we'll see what happens i'll just give it like 10 more seconds
08:17yay it worked okay so now we're connected we can connect through uh the wi-fi notice how it says i
08:27don't recognize this remote because it's a different ip address but we're on the pi so now you've got two
08:31ways to get into your pi i'm actually going to revert because i like staying on ethernet but uh
08:36just so you know this is how the pi will get its internet after you eventually put this repeater
08:41somewhere where you can't get ethernet you know like in your garage or on top of a china hutch or
08:46whatever so um the next thing that we need to do is um
08:54we need to install a program called dns mask we need a dhcp server because what's what's going to
09:03happen basically is when we connect it as a client to the primary router its dhcp server gave us an ip
09:09address on the normal subnet so that's fine we don't really need that for the primary connection
09:14but when we become an access point with the extra antenna whoever connects to our pi as a client is
09:22going to need ip addresses and it's not going to be able to get the ip address the clients are not
09:27going to be able to get the ip address their ip addresses from the router anymore because they're
09:31not even connected to the router they're connected to the pi and there's an isolation because there's two
09:35different networks so that means we need to put a dhcp server on the pi so the pi can just decide
09:42what ip addresses everybody has on its network so i think what i'm going to do since the video is
09:50already about 15 minutes long into this particular segment and i think the whole video is already like
09:54over an hour for sure i'm going to pause the video and i'm going to go away and make another video
10:00where i just talk about how to install dns mask on your raspberry pi so you should go to that other
10:06video and then come back when you have a dns mask all set up and then maybe i'll i'll just copy paste
10:14the config just so you can see the config that i'm actually using for this particular project
10:18just to make it more clear this is a sample configuration file for dns mask
10:23it's not too bad that that's kind of it it's kind of all you have to do so uh i think i'm just
10:29going to install dns mask uh right now for you uh what i did a moment ago is i said sudo apt install
10:36dns mask so it's already installed for me and then to give it some configuration we'll just go into a
10:43special directory called etc dns mask and any file you create in this dot d directory and this is kind
10:51of typical for programs that recognize a dot d drop directory you can just stick configuration files
10:57in there and they'll be read automatically so uh this is the configuration i'm going to use
11:02uh for my dhcp server on my pi you should probably use something similar but not exactly the same
11:08uh or not necessarily it doesn't have to be the same but um i'm using my search domain of home
11:14so you don't have to do that because you don't even you probably don't even have the home
11:17domain unless you want one and then i'm going to i'm going to specify what ip addresses should
11:23get assigned to clients that connect to the access point so then um
11:31what's going on how come i did not specify the adapter and it still worked on my other project
11:38we might have to specify the adapter if this doesn't work otherwise i guess it's fine
11:42by default nobody's going to be looking at this pi i don't know maybe i should specify the adapter
11:48i'll make a note um or i'll come back in a second but anyway so we want to specify an ip address range
11:54if you recall our ip address uh range that we chose for the clients of the access point is going to be
12:01dot five dot something right so this dhcp server is going to be for the clients so that means
12:07the uh the subnet should match what we've chosen so all of the ranged all of the ips that we give
12:15away should start with 192.168.5 and then something so notice here notice out here i'm just saying
12:20192.168.5.10 so i'm saying that the first ip address that i will give away is a something dot 10
12:28and the last one that i'll give away is a something dot 150 i think most people don't go up that high but i
12:33just i just feel like it i want to go from 10 to 150 and that gives me a little room to statically
12:39assign lower addresses if i really feel like it later or high addresses if i feel like it later
12:43uh this subnet right here that's the same thing as a slash 24 block it just means only the last number
12:50uh should be able to change and then the least time 24 hours that means if the if the pi dhcp server
12:58gives an ip address to a client then that ip address should last for about 24 hours before
13:03the pi has to decide um you know on another ip address or if it's going to give it a longer
13:10lease or something on the same one it'll just it'll just redetermine what's going to happen
13:13uh then we'll send a dhcp option uh basically we're going to tell the clients hey here's the ip address
13:20of your gateway so that's called option three for dhcp option so we say three comma and then the dhcp
13:27server is going to be dot five dot one at the end because that's the number we've designated for
13:32wireless land one the gateway uh you know the the wire the wireless dongle that we're setting up
13:38then we're going to send dns servers uh you need dns servers so that your clients can actually
13:43resolve names to addresses you know like yahoo.com or google.com instead of their numbers
13:48so that's going to be option six and then you basically just put every dns server you know
13:53about or you want the clients to know about uh separated by commas just to point out also
13:58we're not covering ipv6 in this video because we're trying to keep it short but uh you probably
14:03want to continue eventually and set up ipv6 um on your own at some point but this will totally work
14:09without it so my dns servers are 1.101 but again you probably don't have those as i uh as dns servers
14:16yours are probably just going to be the ipv6 of your router or maybe you can put in some public
14:21dns servers like 8.8.8.8 whatever you do write it all down there and save it and before we try to
14:30run dns mask let's watch messages and see what's going on um actually you know what let me just type
14:37it and i won't show you because there's probably sensitive stuff in there you use a command to watch
14:42service logs called journal control so you'll say pseudo journal control dash dash unit and then you
14:49just name the unit that you're interested in watching um if you type if you press enter right
14:54now you'll see all of the logs and you'll be able to scroll up and down hit q to exit but if you just
14:59want to follow the logs in a live view to see maybe problems as they're uh occurring uh then you'll do
15:05a dash f for follow i'm going to do that in my other window right now just so that um i can maybe
15:13catch myself if something goes wrong so i'm going to like copy paste this up here on a terminal
15:18blup blup blup blup blup okay so it says
15:22i think it actually just like reset itself once i change the config file that's kind of cool
15:28so but then the next steps you want to do just to be sure that this service is actually going to run
15:33for you you'll say pseudo system control status dns mask and then um it says it's enabled on my
15:42system so then i'm going to do uh pseudo system control enable dash dash now and that'll just
15:50ensure that it's enabled so it'll start whenever the system boots and then it'll start it right now
15:55also and every time you change the configuration you probably want to do something like restart i
16:00actually i'm not sure you need to do this because it looks like it was picking up the config once
16:04while i was typing it and saving it so pseudo apt sorry pseudo system control enable now and then
16:10restart and then the dns server should be running let's see how much time do we have seven before i
16:16have to cut another scene or the the camera's going to cut me off um so now we're at the point
16:24where we have to set up ip forwarding because what's going to happen is actually you know what let me
16:28do a scene cut because this is going to take more than seven minutes uh we're almost there we're
16:33actually almost finished well not quite we're getting closer okay i'm going to do a scene cut
16:40hey everybody thanks for watching this video again from the bottom of my heart i really appreciate it
16:48i do hope you did learn something and have some fun uh if you could do me a please a small little
16:54favor could you please subscribe and follow this channel or these videos or whatever it is you do
17:00on the current social media website that you're looking at right now um it would really mean the
17:04world to me and it'll help make more videos and grow this community so we'll be able to do more videos
17:09longer videos better videos or just i'll be able to keep making videos in general so please
17:14do do me a kindness and uh and subscribe you know sometimes i'm sleeping in the middle of the night
17:20and i just wake up because i know somebody subscribed or followed it just wakes me up and
17:24i get filled with joy that's exactly what happens every single time so you could do it as a nice
17:29favor to me or you could you could troll me if you want to just wake me up in the middle of the night
17:32just subscribe and then i'll i'll just wake up i promise that's what will happen also uh if you
17:39look at the middle of the screen right now you should see a qr code which you can scan in order to go
17:43to the website which i think is also named somewhere at the bottom of this video
17:46and it'll take you to my main website where you can just kind of like see
17:50all the videos i published and the services and tutorials and things that i offer and all that good
17:55stuff and uh if you have a suggestion for uh uh clarifications or errata or just future videos
18:04that you want to see please leave a comment or if you just want to say hey what's up what's going on
18:09you know just send me a comment whatever i also wake up for those in the middle of the night i get
18:13i wake up in a cold sweat and i'm like it would really it really mean the world to me i would
18:18really appreciate it so again thank you so much for watching this video and um enjoy the cool music
18:25as as i fade into the darkness which is coming for us all
18:30so
18:35so
18:40so
Be the first to comment
Add your comment

Recommended

1:04:46
Up next