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.

M. Rostami
  • 4,323
  • 1
  • 17
  • 36
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.

M. Rostami
  • 4,323
  • 1
  • 17
  • 36
  • Why do you keep telling people to use 4.2.2.4? This is not a public DNS. To quote "Unless you are a Level-3 customer, absolutely not. Google now has established public DNS servers at 8.8.8.8 which you should use." Actually better is to use the DNS on your ISP as supplied by your router. – Milliways Feb 05 '20 at 22:08
  • @M.Rostami it worked for some time and again no internet... – The White Cloud Feb 06 '20 at 07:13
  • @WritingNewbie Ok, add a static IP address to the /etc/dhcpcd.conf by this link. – M. Rostami Feb 06 '20 at 07:40
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,107
  • 20
  • 85
  • 197