3

My problem is similar to this question but the answer provided there is not helping me.

I am working on RPI4B and connected to WiFi with my Android device.

If I modify the etc/network/interfaces then my wifi connection also goes out. My interfaces file is blank as opposed to shown in the post I linked earlier.

Mohi Rostami
  • 4,434
  • 1
  • 20
  • 39
The White Cloud
  • 130
  • 1
  • 1
  • 7

2 Answers2

2

Recover the /etc/network/interfaces by adding these lines:

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

Then try to connect to your AP/Wireless router and check the internet connection out by ping www.google.com and if it says host unreachable ... or get you nothing, try to set static dns server:

sudo nano /etc/dhcpcd.conf

Comment/Remove all lines and add static domain_name_servers=8.8.8.8 and try pinging google.

Mohi Rostami
  • 4,434
  • 1
  • 20
  • 39
0

Raspberry Pi is made for education and to show newbies how hardware and software works. So the Raspberry Pi Foundation has taken any effort to make things as simple as possible to start with Raspberry Pi. Just follow its official documentation and most things will work out of the box.

Take a Raspberry Pi image of your choice and flash it to the SD Card. Against the recommodation on that side please don't use NOOBS! We always see many trouble with it here. When the virgin Raspbian operating system has booted up in your RasPi then you should already be able to connect it with an ethernet cable to your internet router out of the box. If you want WiFi then look at its Wireless connectivity.

Ingo
  • 42,961
  • 20
  • 87
  • 207