JacobObrien
Posts: 8
Joined: Sun May 20, 2018 5:02 pm

I cannot get my Pi to connect to the internet

Sun May 20, 2018 5:19 pm

Okay so this is my first time using a PI, I'm trying to get it to work in headless mode as I want to setup a home media server.

I bought the PI 3 b+ and the pre-loaded NOOBS SD card, however i have since burned Raspbian onto the card as it appeared to be the easiest OS to run headless. I've added ssh file to the boot, when i power it up with an Ethernet cable connected directly into my router, the red power light either flickers for a few seconds and then turns off, goes solid for a few seconds while the green light flickers and then both of them will turn off simultaneously, or it goes solid while the green light flickers for about 5 seconds and then stays on.

It doesn't appear to connect to the internet either, the (I think they are) lights underneath the Ethernet just don't appear to be doing anything, I'm running on windows 10 and I've tried using cmd to find the IP, and I've also tried using various applications to find the IP but I've had no luck.

I have access to a monitor but I'm quite reluctant to purchase a mouse and keyboard as it just seems like added expense for a single use. Any suggestions on what to do ?

User avatar
B.Goode
Posts: 8987
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: I cannot get my Pi to connect to the internet

Sun May 20, 2018 5:59 pm

Welcome to the Raspberry Pi forums.


There is a Troubleshooting guide for these forums here: viewtopic.php?f=28&t=58151

It contains the accumulated wisdom from these forums over the past six years.


From your description it seems possible that the reason for your networking problem is that your RPi has not booted into the Raspbian Operating System. And the reason for that is related to an apparently inadequate power supply or connecting cable: the red Power led should not turn off in normal use.

wh7qq
Posts: 1347
Joined: Thu Oct 09, 2014 2:50 am

Re: I cannot get my Pi to connect to the internet

Sun May 20, 2018 7:11 pm

B. Goode's comment is right on target and should fix the problem.

You can find the IP address assigned to the RPi on your router's web interface (administration) pages. There is usually a "devices" listing of the connected devices. If you have not gone to those pages, they can be found by simply putting the router's ip address into the search bar of your browser. If you don't know the routers IP, see the instruction manual for the router.

If you expect to run a media center on the RPi. you would do well to get a wireless keyboard/mouse combination from one of the regular RPi suppliers like Adafruit or even Amazon if they specifiy that it works with RPi. Having the keyboard/mouse saves a lot of pain and trouble and will be necessary to control the media center. Then you can simply hook up to the HDMI port on your TV and select the TV input for the RPi.

User avatar
DougieLawson
Posts: 36575
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: I cannot get my Pi to connect to the internet

Sun May 20, 2018 7:44 pm

Use http://www.advanced-ip-scanner.com to scan your LAN for your Raspberry.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
HawaiianPi
Posts: 4876
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: I cannot get my Pi to connect to the internet

Mon May 21, 2018 3:06 am

As others have said, your power supply is not supplying a stable 5V output. The red LED turns off when the supply voltage drops below 4.65V, so you need a better power supply. Note that most so-called "5V power supplies" are phone chargers, and those don't always have good voltage regulation (phone charging does not require precise voltage regulation).

So even if your PSU says something like 5V 2.4A it might not work for a Pi computer (I have tested 5V 2.4A supplies that dipped well below 5V at only a 1A load). If your PSU uses a separate micro USB cable, then the cable is another possible issue. Many micro USB cables are not designed to deliver much more than 500mA (0.5A) without significant voltage loss.

So you need both a good power supply that can maintain 5V under load, and a good micro USB cable with fat, low resistance power wires to deliver the power to your Pi with minimal loss.

Now all that being said, some phone chargers work great (with a good micro USB cable). I use one myself. The problem is, you can't know for sure unless you can properly load test it.

It's for those reasons most people will recommend you purchase the official Raspberry Pi Foundation power supply.
https://www.raspberrypi.org/products/ra ... er-supply/
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

JacobObrien
Posts: 8
Joined: Sun May 20, 2018 5:02 pm

Re: I cannot get my Pi to connect to the internet

Mon May 21, 2018 2:51 pm

Okay, I've changed the power supply and the PI's red light now stays solid. I have downloaded advanced IP scanner as suggested, but still the PI cannot be found. The green light still only flickers for about 5 seconds, I'm not sure if that is ordinary or not ? Any other suggestions before I just buy a keyboard ?

User avatar
B.Goode
Posts: 8987
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: I cannot get my Pi to connect to the internet

Mon May 21, 2018 3:05 pm

Any other suggestions before I just buy a keyboard ?
Since you don't mention trying it...

Rewrite a fresh version of Raspbian to the microSD card, and add the ssh marker file, before trying to boot up the RPi again. (The set up of the card may have become corrupted by being used with an inadequate power supply.)
Last edited by B.Goode on Mon May 21, 2018 3:09 pm, edited 1 time in total.

drgeoff
Posts: 9925
Joined: Wed Jan 25, 2012 6:39 pm

Re: I cannot get my Pi to connect to the internet

Mon May 21, 2018 3:07 pm

JacobObrien wrote:
Mon May 21, 2018 2:51 pm
Okay, I've changed the power supply and the PI's red light now stays solid. I have downloaded advanced IP scanner as suggested, but still the PI cannot be found. The green light still only flickers for about 5 seconds, I'm not sure if that is ordinary or not ? Any other suggestions before I just buy a keyboard ?
5 seconds sounds a bit short.

Have you reflashed the SD card since changing the PSU? If not, try that. An inadequate PSU can result in corruption of files on the card.

User avatar
bob_binz
Posts: 441
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: I cannot get my Pi to connect to the internet

Mon May 21, 2018 5:26 pm

Just to add, you don't need a mouse and keyboard just to check what's going on - try hooking up to the monitor and look at what the output is telling you - does it run the full boot to the desktop, or do you get errors, or do you see nothing?

--
BBz

User avatar
HawaiianPi
Posts: 4876
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: I cannot get my Pi to connect to the internet

Mon May 21, 2018 6:35 pm

This is the procedure I use for setting up headless boot with SSH and wireless network. Everything is done before you boot, and can be done on a Windows or Mac computer which only has access to the small FAT32 "boot" partition of a Raspbian imaged SD card.
  1. Grab the latest Raspbian image from https://www.raspberrypi.org/downloads/raspbian/
  2. Grab the Etcher software from https://etcher.io/
  3. Install Etcher and use it to write the Raspbian image to your SD card.
    • You don't need to extract the image or format the card prior to writing.
    • Just run Etcher, choose the Raspbian .zip you downloaded, pick your SD card and write.
    • If you have trouble, verify the SHA256 checksum of the download.
    • Writing an image to your card will erase everything previously on it!
  4. Remove and reinsert the SD card so that your Windows or Mac PC can see the small FAT32 partition on the card (labelled "boot").
    • If you get a message telling you the card must be formatted, cancel it.
  5. On that small FAT32 partition, create a file with the name ssh (or ssh.txt). It can be empty, the contents don't matter.
  6. To connect to a wireless network, create another file on the card called wpa_supplicant.conf, which has the following inside:

    Code: Select all

    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    country=US
    
    network={
         ssid="Your network name/SSID"
         psk="Your WPA/WPA2 security key"
         key_mgmt=WPA-PSK
    }
    • Edit country=, ssid= and psk= with your information and save the file.
    • Use the 2 letter country abbreviation in CAPS (without this you will have no WiFi).
    • Use a pure text editor, not a word processor, to edit the wpa_supplicant.conf file.
  7. Make sure that both files are in the main directory of the small FAT32 partition, not in any folder.
  8. Safely eject the card from your PC and use it to boot the Pi.
If Raspbian finds an ssh file it will enable SSH and delete the file. If it finds a wpa_supplicant.conf file, it will move it to its correct location and connect to your wireless network. Give your Pi some time to boot and connect to your network (the first boot always takes longer), then you should be able to SSH into the Pi and configure it how you like.

If you have a Zeroconf network service installed (Apple's iTunes or Bonjour install Zeroconf), you can SSH into [email protected] (provided you don't have any other Pi computers on your network with the same default hostname). Otherwise you must SSH into your Pi's IP address, which you can find by logging into your router and checking the list of connected clients, or using a network scanner app (like Fing for smartphones).

To login using SSH from Windows, you can use an app called PuTTY, which looks like this (click picture for download link).
Image

In the Host Name (or IP address) field, enter either, make sure SSH is selected (it should be by default) and click on Open.

If you have done everything correctly, a terminal window will open and you should see a password request. Although, if it's the first time you've connected to your Pi, you may have to answer "yes" to a security question, and then you'll get the password prompt. After login you'll get a warning about having SSH enabled with the default password, so type passwd[Enter] and enter a new password (twice). And now you can do whatever you need to configure your little Raspberry Pi computer.

Code: Select all

sudo raspi-config
Will bring up the Raspbian configuration utility. If you have more than one Raspberry Pi computer on your network it's a good idea to change the hostnames to something unique so that they can easily be identified.

Alternatives to PuTTY:
If your main PC has the Windows 10 OS, there are 2 alternatives to PuTTY. The Windows 10 Fall Creators Update (2017) added the ability to install the Windows Subsystem for Linux, which is a Linux Bash shell for Windows (there are a few different versions of Linux in the Microsoft Store). And the recent Windows 10 Spring Update (2018) added OpenSSH directly to the Windows command and powershell utilities.

Note:
If you have attempted this and failed, then unplugged power to turn off your Pi, you should start over with a freshly imaged card. Improperly powering down the Pi can cause SSH key generation to fail, which will prevent SSH logins (even if everything else is correct).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Return to “Troubleshooting”