WEBVTT

00:00.080 --> 00:06.410
So let's say you have configured the Raspberry Pi OS to connect to a Wi-Fi network here, WiFi network

00:06.440 --> 00:06.980
one.

00:06.980 --> 00:13.370
But then you go somewhere else and you need to use a different Wi-Fi network, and you don't have access

00:13.370 --> 00:15.680
to the one already configured.

00:15.710 --> 00:22.070
This can be a problem, because then your Raspberry Pi is kind of lost and you can't get access to it.

00:22.100 --> 00:29.330
You would either need to find an external monitor or to flash the SD card again with a new Wi-Fi configuration,

00:29.330 --> 00:33.740
which is not ideal because you would lose all the files here.

00:33.740 --> 00:38.960
In this video, I will show you how you can solve this problem and note that if you just install the

00:38.960 --> 00:42.950
Raspberry Pi OS and you can have access to the desktop, you don't need to do this.

00:42.950 --> 00:47.720
You can just keep this video and directly go ahead and go to the next section of the course.

00:47.750 --> 00:48.110
Okay.

00:48.140 --> 00:53.900
This video is more of a help you would potentially need in the future, in case you have the problem

00:53.900 --> 00:55.880
that I just described before.

00:55.880 --> 00:59.060
So now let's see how to solve this problem.

00:59.090 --> 01:03.590
And the first thing you can do, and I'm coming back to what I said before is just find an external

01:03.590 --> 01:05.510
monitor, maybe plug a keyboard and a mouse.

01:05.510 --> 01:07.010
That would be the easiest.

01:07.010 --> 01:09.920
Then you just pick the new Wi-Fi network.

01:09.950 --> 01:15.650
You could also try to use an Ethernet cable between your Raspberry Pi and your computer.

01:15.650 --> 01:21.530
And another solution that I also like is simply because you have your phone with you all the time,

01:21.530 --> 01:24.740
so you just use your phone as a hotspot for the Raspberry Pi.

01:24.770 --> 01:28.730
So then if you go to a new place, you can still use your phone as a hotspot.

01:28.760 --> 01:33.920
You can still connect your Raspberry Pi to your phone and then change the settings from there.

01:33.920 --> 01:39.110
But if you can't do any of that, then there is another solution that I'm going to explain right now.

01:39.830 --> 01:42.290
So the idea is quite simple.

01:42.290 --> 01:46.280
We will configure a hotspot on the Raspberry Pi okay.

01:46.310 --> 01:51.950
So that when we get to a new place and there is no Wi-Fi network that the Pi can connect to because

01:51.950 --> 01:57.590
it doesn't have the password, then the Raspberry Pi is going to boot as a hotspot from this computer,

01:57.590 --> 02:03.040
we will be able to connect to the Raspberry Pi, get access to the desktop, and then choose the new

02:03.070 --> 02:04.780
Wi-Fi network to connect to.

02:04.810 --> 02:05.320
Okay.

02:05.320 --> 02:09.640
And for this to work, we actually need to do a bit of preparation, okay.

02:09.670 --> 02:14.140
Because we need to configure the hotspot while we still have access to it.

02:14.140 --> 02:19.240
So while we are still connected here, you can see I'm connected to your Wi-Fi network.

02:19.240 --> 02:21.250
So it's the same network I have configured.

02:21.250 --> 02:24.040
And I'm going to connect to the Raspberry Pi.

02:26.290 --> 02:28.690
Okay I can keep it like this.

02:28.690 --> 02:32.230
And you can see the Raspberry Pi is connected to your Wi-Fi network.

02:32.230 --> 02:34.060
So that's the same thing we had before.

02:34.060 --> 02:35.590
And now we are going to configure.

02:35.590 --> 02:39.100
So I'm going to click here and go to Advanced Options.

02:39.280 --> 02:42.790
And we're going to create a wireless hotspot.

02:42.790 --> 02:49.630
So let's name it for example my RPI hotspot.

02:49.750 --> 02:56.800
You can choose whatever name you want and let's choose here WPA two personal okay.

02:56.830 --> 03:01.240
And let's put a password I choose a very simple password here.

03:01.270 --> 03:05.680
Well raspberry doesn't really matter and you can create it.

03:06.100 --> 03:12.010
You will notice that as soon as you create it, you lose the connection here because it's automatically

03:12.040 --> 03:13.720
gonna create the hotspot.

03:13.720 --> 03:17.260
So let's close Tigervnc here.

03:17.260 --> 03:26.800
And then if we go under settings here on the Wi-Fi settings of our computer, we should find the my

03:27.160 --> 03:29.140
my Raspberry Pi hotspot here.

03:29.140 --> 03:30.820
So I'm going to connect to it.

03:30.820 --> 03:34.600
And I will need to put the, uh pin.

03:34.630 --> 03:37.000
Now I'm going to use a security key instead.

03:37.060 --> 03:39.280
That's the password that I have set.

03:41.050 --> 03:42.730
So that's the raspberry.

03:42.760 --> 03:43.990
Same name I have set here.

03:43.990 --> 03:45.700
You can choose a different name if you want.

03:46.150 --> 03:47.230
Uh, next.

03:47.440 --> 03:52.810
And we should be connected to the Raspberry Pi hotspot.

03:53.080 --> 03:53.290
Okay.

03:53.320 --> 03:54.340
So we are connected.

03:54.340 --> 03:55.840
We don't have access to the internet.

03:55.870 --> 03:56.020
Okay.

03:56.050 --> 03:59.680
Because the Raspberry Pi has no internet access.

03:59.680 --> 04:05.830
And then I'm going to go, uh, again, connect with Tigervnc, but this time the IP address is not

04:05.830 --> 04:08.980
going to be the same because now the hotspot is the Raspberry Pi.

04:09.010 --> 04:12.610
So I'm going to go back to my IP scanner.

04:13.030 --> 04:13.870
Click here.

04:14.380 --> 04:21.370
And now with the Wi-Fi here you can see the network is 10.42 .0. something.

04:21.370 --> 04:25.930
And well you can start the scanner here.

04:26.110 --> 04:32.500
But yeah, what you will find is that the Raspberry Pi as a hotspot will have the IP address ending

04:32.500 --> 04:33.640
with one.

04:33.670 --> 04:36.610
Okay, so I think it should always be like that.

04:37.030 --> 04:47.380
I'm just going to stop once you find it and go back to Tigervnc and just use 10.42 .0.1.

04:48.070 --> 04:49.570
Let's connect.

04:52.690 --> 04:54.370
And we are back to the Raspberry Pi.

04:54.400 --> 04:59.050
This time the Raspberry Pi is the hotspot and our computer is connecting to it.

04:59.080 --> 04:59.680
Okay.

04:59.680 --> 05:01.390
And we just need to do one more thing.

05:01.390 --> 05:03.610
We're going to click here again.

05:03.640 --> 05:08.410
Go to Advanced Options and Edit Connections.

05:08.440 --> 05:14.350
We are going to click here on my API hotspot and click on the configuration.

05:14.380 --> 05:16.480
Here on the settings okay.

05:16.480 --> 05:20.080
And if you go to general so we don't change anything here.

05:20.080 --> 05:26.350
But if you go to general you can see connect automatically with priority zero.

05:26.380 --> 05:28.900
We keep zero here and you have to check that box.

05:28.900 --> 05:34.060
Because if you don't check that box then when you reboot your Raspberry Pi it's not going to create

05:34.060 --> 05:34.900
the hotspot okay.

05:34.930 --> 05:40.300
So we need to make sure that the hotspot is going to be created when we boot the Raspberry Pi.

05:40.300 --> 05:42.970
So I can click on save.

05:43.870 --> 05:44.560
Okay.

05:44.560 --> 05:46.570
And now I can shut down the Raspberry Pi.

05:47.110 --> 05:50.290
So I'm going to shut it down like this.

05:50.290 --> 05:54.310
And I can be sure that if so no close.

05:54.340 --> 05:54.820
Okay.

05:54.850 --> 06:00.940
I can be sure that if I go to any place where the Raspberry Pi cannot connect to a Wi-Fi, then it's

06:00.940 --> 06:07.590
going to create its own hotspot, and from this computer I can connect to the Raspberry Pi hotspot.

06:08.220 --> 06:11.040
All right, so what we did before was the configuration.

06:11.040 --> 06:17.670
Now let's say that we have arrived to a new place, and the Raspberry Pi doesn't know any of the Wi-Fi

06:17.700 --> 06:20.610
networks, so it cannot connect to any Wi-Fi network.

06:20.640 --> 06:24.630
Or simply you have changed your Wi-Fi Ssid or password at home.

06:24.750 --> 06:30.780
Okay, so the Raspberry Pi cannot connect to any network from this computer I have connected to.

06:30.810 --> 06:34.710
So here I have named it another Wi-Fi network.

06:34.740 --> 06:38.460
Okay, so that's my new network that I want to connect the Raspberry Pi to.

06:38.520 --> 06:45.810
So what I will do here is I will boot my Raspberry Pi, and the Raspberry Pi is going to start its own

06:45.810 --> 06:46.890
hotspot.

06:46.950 --> 06:55.050
So I'm going to wait a few seconds, maybe a minute or two, and then I can go there and I should find

06:56.010 --> 06:59.220
somewhere the Raspberry Pi.

06:59.250 --> 07:03.690
Okay, RPI hotspot, let's connect to this one.

07:05.010 --> 07:06.720
So connecting.

07:08.160 --> 07:08.430
Okay.

07:08.460 --> 07:11.820
And we are connected to my Raspberry Pi hotspot.

07:12.000 --> 07:14.370
Note that well of course we don't have internet.

07:14.400 --> 07:17.190
We just have a connection to the Raspberry Pi.

07:17.580 --> 07:25.440
I'm going to open Tigervnc again, and, well, that should be the same IP address as before, but you

07:25.440 --> 07:28.050
can use angry IP scanner if needed.

07:28.080 --> 07:29.280
Let's connect.

07:29.310 --> 07:29.490
Okay.

07:29.520 --> 07:30.360
It works.

07:31.560 --> 07:35.040
So let's connect and we have access to the Raspberry Pi.

07:35.130 --> 07:37.440
You could just keep it like this if you don't need internet.

07:37.440 --> 07:43.020
But here we're going to try to connect the Raspberry Pi to this new Wi-Fi network.

07:43.020 --> 07:45.240
So we're going to click on the Wi-Fi here.

07:45.510 --> 07:50.100
And what it doesn't see any thing okay.

07:50.130 --> 07:52.230
Probably because it's configured as a hotspot.

07:52.230 --> 07:58.830
So you can just click on Advanced options and connect to hidden wireless network.

07:59.850 --> 08:06.270
So when I click here and we're going to set here The network name, so the network name was another

08:06.270 --> 08:08.160
Wi-Fi network.

08:08.190 --> 08:10.770
Make sure you don't make any mistake, any typo.

08:10.800 --> 08:12.660
Okay, so another Wi-Fi network.

08:12.690 --> 08:15.450
So that's the network we want to connect to.

08:15.660 --> 08:21.210
And we're going to choose this one and put the password.

08:23.460 --> 08:29.370
So the password here is going to be the password of the new Wi-Fi network that you should have.

08:29.400 --> 08:32.160
Since you can connect your computer to this new Wi-Fi network.

08:32.190 --> 08:32.730
Okay.

08:33.090 --> 08:34.230
Let's connect.

08:34.230 --> 08:41.100
And well, as soon as we connect, of course, we're going to lose the connection from Tigervnc because

08:41.100 --> 08:44.370
the Raspberry Pi is connecting to another Wi-Fi network.

08:44.370 --> 08:48.120
And we don't have anything else with the hotspot.

08:48.120 --> 08:50.070
So you can see the error.

08:50.070 --> 08:51.540
So let's click on no.

08:51.990 --> 08:57.570
Then our computer, we're going to lose the connection to the Raspberry Pi hotspot because it doesn't

08:57.600 --> 08:58.500
exist anymore.

08:58.500 --> 09:01.560
And you see we are back to another Wi-Fi network.

09:01.560 --> 09:07.290
So make sure that you are back on that one, and then the Raspberry Pi and your computer should be connected

09:07.290 --> 09:09.060
to this new Wi-Fi network.

09:09.180 --> 09:13.920
So we are going to run an IP scan again.

09:13.950 --> 09:14.370
Okay.

09:14.400 --> 09:19.560
So make sure you have the correct Wi-Fi here.

09:19.560 --> 09:20.910
We scan again.

09:21.780 --> 09:22.590
Okay.

09:22.620 --> 09:24.060
Scanning completed.

09:24.090 --> 09:25.680
Let's sort by ping.

09:25.710 --> 09:27.660
You can see we even find it here.

09:27.660 --> 09:32.400
So 192 168 zero and 222.

09:32.430 --> 09:35.340
You can see that it's the same IP address as I had before.

09:35.370 --> 09:39.720
The network mask is the same simply because I'm using the same phone.

09:39.750 --> 09:45.210
I used different names for the Wi-Fi, but it's the same phone, so it's going to create the same IP

09:45.210 --> 09:45.480
address.

09:45.480 --> 09:49.770
But if you go to a different place, the IP address is probably going to look different.

09:50.100 --> 09:51.720
So tigervnc.

09:52.290 --> 09:54.900
And now we can do this.

09:54.900 --> 09:58.050
So we put the IP address.

09:59.190 --> 10:00.420
We connect.

10:03.230 --> 10:05.990
And we are back to the Raspberry Pi.

10:06.020 --> 10:10.160
This time we are connected to another Wi-Fi network.

10:10.190 --> 10:11.600
And what you can do?

10:11.660 --> 10:18.560
Well, if you want to be sure you are connected to this Wi-Fi network and that the Raspberry Pi doesn't

10:18.560 --> 10:26.450
start as a hotspot, you could go back to advanced options, edit connections, and then the hotspot.

10:26.480 --> 10:33.770
You edit the connection again here in the settings, you go to general and you remove this automatically

10:33.770 --> 10:35.900
connect and you save okay.

10:36.410 --> 10:41.750
This way the Raspberry Pi is going to connect automatically to this network.

10:41.780 --> 10:44.030
You are sure it's not going to start as a hotspot.

10:44.030 --> 10:45.590
And then you can repeat this process again.

10:45.590 --> 10:51.380
So if you're going again to a place where you don't know any Wi-Fi network in advance, so it's not

10:51.380 --> 10:56.900
saved on the Raspberry Pi, you just make sure first to start the hotspot, okay?

10:56.930 --> 10:58.520
By default on boot.

10:58.550 --> 11:00.320
So that's the configuration you need to do.

11:00.320 --> 11:04.340
And after this you can go to any place and do this process again.
