I am trying to set up my Raspberry Pi in headless mode (i.e., without a monitor). I have installed the Raspbian Wheezy OS on my SD card. Initially when I powered it on with the ethernet cable connected to my laptop and ran the Advanced IP Scanner, it successfully detected the Pi and I was able to access the Pi's terminal with PuTTY using the Pi's IP. I logged into the device.

When I tried to access the Pi later, doing everything in the same manner as I described above, the Advanced IP Scanner was not able to detect the Pi.

The Pi is powered on and connected to the laptop via the ethernet cable. What am I doing wrong?

  • 1
    If possible, try plugging the Pi into your router rather than directly to the PC. – Milliways Sep 16 '15 at 12:38
  • @Milliways yeah i am now trying to do that – sangam.saga Sep 16 '15 at 12:44
  • Are you trying to find an answer that would work a Windows user? The approach you are taking makes me think that you are using a Windows laptop to connect to your Pi. If you are, it would help to know: working with DHCP on Windows is entirely different than on a Unix or Linux OS. – Vladislav Martin Jun 14 '16 at 4:38

I presume since you don't know the IP address, it means that the Pi is getting its' IP from DHCP. If a simple scanner can't find the IP, it's because the Pi hasn't acquired one - perhaps you have misconfigured whatever DHCP/Network Sharing you might be using on the laptop?

What exactly are you using to give the Pi an IP, and how did you configure it? If you turned on the Pi before you enabled the service handling DHCP, it's possible the Pi has timed out attempting to acquire an address and simply powering it off and on would solve the problem. Alternatively you should assign the Pi a static IP address if you are always using it in the same configuration.

  • I initially powered on the pi and connected the ehternet cable to my laptop. I did not configure anything. then i used advanced ip scanner to get the IP of my pi and access it with putty. But this was only for the first time. Trying the same did not work. I powered off and on the pi again but still it was not detectable. – sangam.saga Sep 16 '15 at 12:15
  • @sangam.saga: your Pi won't have an IP address unless you installed an OS image that has a default IP setup (I'm not aware of any, but there probably are some), or it could reach a DHCP server. – Nick Bastin Sep 16 '15 at 12:16
  • how would i assign the pi a static ip and configure DHCP/ network sharing. is there an exhaustive tutorial for it ? – sangam.saga Sep 16 '15 at 12:20
  • @sangam.saga if Nick is using a recent (post May 2015) Raspbian, which uses dhcpcd this will allocate a link-local IP and can be accessed (at least by a zeroconf client). I do this from OSX. I cannot comment on what Windows will do, but this is more a Windows problem than a Pi one. Setting static IP on a Pi is not as simple as it used to be. – Milliways Sep 16 '15 at 12:38
  • @Milliways thanks... i am presently trying to find a detailed tutorial to help me out. I have the option of trying the same on linux OS on my laptop. The main issue is i want to configure pi in headless mode. – sangam.saga Sep 16 '15 at 12:41

1) Copy the img to your SD card

2) Open the SD card on your computer

3) Open the file cmdline.txt and add e.g ip= just behind the last entry like this:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait ip=

It is important that you use a text editor which preserves line endings e.g. notepad++, sublime... DON'T use something like word for this.

Make sure beforehand that the IP is free. E.g. with your scanner or by using the ping command.

4) Eject the SD and plug it into your pi

5) ssh pi@ (if you are on a unix system, on windows use putty)

6)Run this command printf 'network={%s\n\tssid="SSID"%s\n\tpsk="PASSWORD"%s\n}' >> /etc/wpa_supplicant/wpa_supplicant.conf Your have to change SSID & PASSWORD


You laptop does'nt have a DHCP server installed. You should connect your Pi into your router instead.


Connect the pi to your laptop, turn off wifi and make sure network bridge is enabled in its properties, then use IP scanner and you should only see 2 IP addresses : your laptop's and your pi's. Hope i helped.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.