fearless
Posts: 21
Joined: Tue Apr 16, 2013 2:24 pm

Headless setup: no keyboard, display or frustration

Tue Apr 08, 2014 7:19 pm

This is a step-by-step guide of how to set up your Raspberry Pi from scratch. It assumes that you want to run "headless", that is, access it via network connections without a keyboard or display. This guide uses Raspbian, the "Debian Wheezy" version of Linux.
0. Prerequisites
This guide assumes you DO have:
  • A model "B" Raspberry Pi
    A Mac running OSX
    A "big enough" SD card (I used a 16 GB - plenty big)
    Some means to read/write an SD card on your Mac (built-in or USB adaptor)
    A router with at least one spare ethernet socket
It assumes you do NOT have:
  • A dedicated keyboard
    A dedicated display
    Access to administrative privileges on your router
1. Get Raspbian (operating system) image onto an SD card
  • Open browser and visit http://downloads.raspberrypi.org/raspbian_latest. It will offer to download a file with a name such as '2014-01-07-wheezy-raspbian.zip'.
    Download the file.
    Locate the file in the finder and click on it to un-zip it. It will create a file with a name like '2014-01-07-wheezy-raspbian.img'.
    Insert the SD card into your Mac using the built-in slot or a USB adapter.
    Open a terminal window on the Mac.
    In the terminal window, type 'df -h'. You should see something as follows:

    Code: Select all

    $ df -h
    mbp:~ r$ df -h
    Filesystem      Size   Used  Avail Capacity  iused    ifree %iused  Mounted on
    /dev/disk0s2   465Gi  199Gi  265Gi    43% 52299389 69587353   43%   /
    devfs          192Ki  192Ki    0Bi   100%      664        0  100%   /dev
    map -hosts       0Bi    0Bi    0Bi   100%        0        0  100%   /net
    map auto_home    0Bi    0Bi    0Bi   100%        0        0  100%   /home
    /dev/disk1s2   303Mi  280Mi   23Mi    93%    71633     5944   92%   /Volumes/NI-DAQmx_Base_3.3.0
    /dev/disk2s1    56Mi   19Mi   37Mi    34%      512        0  100%   /Volumes/NONAME
    
    By process of elimination, it should be clear that the SD card is mounted as "/dev/disk2s1". The important part to remember is the "2" -- that is the disk number for the SD card. Type the following, substituting the disk number for X and the name of your image file where you see "2014-01-07-wheezy-raspbian.img":

    Code: Select all

    $ sudo diskutil unmount /dev/diskXs1                                 # Substitute disk number for X
    $ sudo dd bs=1m if=./2014-01-07-wheezy-raspbian.img of=/dev/rdiskX   # Substitute disk number for X
    $ sudo diskutil eject /dev/rdiskX                                    # Substitute disk number for X
    
    It is now safe to unplug the SD card.

    2. Boot the Raspberry Pi and find its IP address
    • Connect the RPi to a spare Ethernet port on your router using an Ethernet cable.
      Insert the SD card into the Raspberry Pi.
      Power up the Raspberry Pi. Wait about 90 seconds.
      Open a terminal window on your Mac and type "arp -a". You should see something like this:

    Code: Select all

    mbp:~ r$ arp -a
    ? (169.244.1.0) at (incomplete) on en1 [ethernet]
    wireless_broadband_router.home (192.168.1.1) at 0:26:62:7f:f3:e6 on en1 ifscope [ethernet]
    laptop.home (192.168.1.2) at d0:df:9a:1b:39:9c on en1 ifscope [ethernet]
    raspberrypi.home (192.168.1.8) at 80:1f:2:da:af:d on en1 ifscope [ethernet]
    revolvhub-000122.home (192.168.1.13) at b0:79:3c:0:1:22 on en1 ifscope [ethernet]
    
    • From this, you can see that your Raspberry Pi has been assigned an IP address of 192.168.1.8. (Yours will likely be different.)
    3. Log in using ssh
    • In a terminal window in your Mac, type "ssh [email protected]", where "xxx.xxx.xxx.xxx" is the IP address you discovered in the previous step.
      It will then prompt for your password. Type in the default password raspberry and type return. (Note that this will not echo on the screen.)
      It will look something like this:

    Code: Select all

    $ ssh [email protected]
    [email protected]'s password: 
    Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l
    
    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    
    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Tue Apr  8 18:42:58 2014 from mbp.home
    
    4. Expand the filesystem
    • Since this is the first time you are logging in, the RPi will run something called "raspi-config" so you can set configuration parameters.
    raspi-config.jpg
    raspi-config.jpg (39.69 KiB) Viewed 306310 times
    • The only parameter we need to set now is "Expand Filesystem": select it, and use the arrow keys to highlight <Select>, then hit return.
      You will see a message that the filesystem will be resized at the next boot and you'll be returned to the configuration screen.
      Use the arrow keys to highlight <Finish> and hit return.
      The next screen will ask "Would you like to reboot now?". Hit return to indicate <Yes>.
      Your terminal will report "Connection to xxx.xxx.xxx.xxx closed" because the Raspberry Pi is rebooting.
    5. Do a little housekeeping
    Now you want to make sure your Raspberry Pi has the latest updates.
    • Give the RPi enough time to reboot, then log back in using SSH as before with 'ssh [email protected]'
      When you get the prompt, type "apt-get update"
      When that finishes, type "apt-get upgrade"

    Code: Select all

    pi@raspberrypi ~ $ sudo apt-get update
    Hit http://repository.wolfram.com stable Release.gpg
    Hit http://repository.wolfram.com stable Release                                                              
    ...
    Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
    Reading package lists... Done
    pi@raspberrypoor ~ $ sudo apt-get upgrade
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    ...
    Congratulations! You now have a fresh-to-go Raspberry Pi.

    6. Accessing the window server
    Since you're using a Mac, there's a delightfully easy way to get to the window server. As neonecho correctly points out, you'll need to load ``tightvnc`` package onto your Raspberry Pi first. So ssh into your Rasberry Pi to load it:

    Code: Select all

    myMac ~ $ ssh [email protected]     # instead of 198.168.1.8, use the IP address of your pi
    [email protected]'s password: 
    Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l
    pi@raspberrypi ~ $ sudo apt-get tightvncserver                              # download the VNC server
    pi@raspberrypi ~ $ tightvncserver                                                    # start the VNC server
    pi@raspberrypi ~ $ vncserver :0 -geometry 1920x1080 -depth 24  # start a VNC session
    
    (Code taken from: https://www.raspberrypi.org/documentati ... ccess/vnc/)

    Now, back on your Mac:
    • In the Finder, select Go => Connect To Server...
      Type vnc://xxx.xxx.xxx.xxx (where xxx.xxx.xxx.xxx is the IP address that you discovered in step 2.
      Click [Connect]. This will launch the Screen Sharing application, and with a little luck, you should see this image.
rpi_window.jpg
rpi_window.jpg (48.12 KiB) Viewed 306310 times
Last edited by fearless on Tue Jan 12, 2016 10:12 pm, edited 1 time in total.

dwss5
Posts: 1
Joined: Sun Apr 27, 2014 4:23 pm

Re: Headless setup: no keyboard, display or frustration

Sun Apr 27, 2014 4:31 pm

Sounds great for MacOSX 8-) , now all someone should do is make it this easy for others running Linux on their PCs :oops:
With PCs having distros like Mint or Ubuntu for instance :?:

User avatar
DougieLawson
Posts: 42748
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: Headless setup: no keyboard, display or frustration

Sun Apr 27, 2014 8:31 pm

Despite getting a bunch of Java warnings, with a VNC server running at pi.local:5901 I can use http://pi.local:5801/ to get VNC running in my browser.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

azat385
Posts: 1
Joined: Thu Jul 24, 2014 9:22 pm

Re: Headless setup: no keyboard, display or frustration

Thu Jul 24, 2014 9:48 pm

...3. Log in using ssh
In a terminal window in your Mac, type "ssh [email protected]", where "xxx.xxx.xxx.xxx" is the IP address you discovered in the previous step...
I have found ip and tried ping cmd from my laptop....it is OK.
But cant connect ssh using putty.

Is ssh enabled by default in 2014-06-20-wheezy-raspbian.img?
(model B+, no keyboard, no display )

Thank you.

fearless
Posts: 21
Joined: Tue Apr 16, 2013 2:24 pm

Re: Headless setup: no keyboard, display or frustration

Thu Oct 23, 2014 4:51 am

@azat385: I'm fairly certain ssh is enabled by default. One thing to test before ssh is pinging the address:

Code: Select all

ping xxx.xxx.xxx.xxx
where "xxx.xxx.xxx.xxx" is the IP address you discovered in the previous step. If you've got the right address, you should see responses along these lines:

Code: Select all

new-host-5:BackupServer r$ ping 192.168.2.2
PING 192.168.2.2 (192.168.2.2): 56 data bytes
64 bytes from 192.168.2.2: icmp_seq=0 ttl=64 time=0.868 ms
64 bytes from 192.168.2.2: icmp_seq=1 ttl=64 time=0.881 ms
64 bytes from 192.168.2.2: icmp_seq=2 ttl=64 time=0.890 ms
64 bytes from 192.168.2.2: icmp_seq=3 ttl=64 time=0.883 ms
^C
--- 192.168.2.2 ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.868/0.881/0.890/0.008 ms
That should confirm that you've got the right IP address.

2uanta
Posts: 1
Joined: Mon Mar 02, 2015 3:13 am

Re: Headless setup: no keyboard, display or frustration

Mon Mar 02, 2015 3:16 am

You still need a monitor and keyboard to do the initial setup?
I dont have any. Have been living with a laptop only :(

DirkS
Posts: 10953
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Headless setup: no keyboard, display or frustration

Mon Mar 02, 2015 9:52 am

2uanta wrote:You still need a monitor and keyboard to do the initial setup?
I dont have any. Have been living with a laptop only :(
No. Put Raspbian on the card (not Noobs), start your Pi.
Now log in with SSH (which is active by default)

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Headless setup: no keyboard, display or frustration

Mon Mar 02, 2015 10:21 am

Yes, I get that 'ssh' server is on by default, but what I don't get is the implication that there is a vncserver running on the Pi by default.

Surely, you have to install that before you can "vnc" into it?
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

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

Re: Headless setup: no keyboard, display or frustration

Mon Mar 02, 2015 11:29 am

2uanta wrote:You still need a monitor and keyboard to do the initial setup?
I dont have any. Have been living with a laptop only :(
Did you read the first post that kicked off this thread:

QUOTE -

Code: Select all

This guide assumes you DO have:

    A model "B" Raspberry Pi
    A Mac running OSX
    A "big enough" SD card (I used a 16 GB - plenty big)
    Some means to read/write an SD card on your Mac (built-in or USB adaptor)
    A router with at least one spare ethernet socket


It assumes you do NOT have:

    A dedicated keyboard
    A dedicated display
    Access to administrative privileges on your router
Beware of the Leopard

mob-i-l
Posts: 367
Joined: Sat Dec 29, 2012 2:45 am
Location: Lund, Skåne/Scania, Sweden

Re: Headless setup: no keyboard, display or frustration

Sun Mar 22, 2015 4:00 pm

Code: Select all

arp -a
didn't work on my Ubuntu 14.04 LTS in my network. But this works here in Terminal (started by Ctrl+Alt+T):

Code: Select all

nmap -sn `hostname -I | sed -n 's/\(.*\)\..*$/\1.0/p'`/24
You may need to install nmap first:

Code: Select all

sudo apt-get install nmap
One can even show only computers having pi in their names:

Code: Select all

nmap -sn $(hostname -I | sed -n 's/\(.*\)\..*$/\1.0/p')/24 | grep pi
Have Pi0&1A&1B&1B+&2B&3B&4B w/ rasPiOS. Started w/ BASIC on ABC80&ZX81 then Forth, Z80… https://scratch.mit.edu/users/mobluse/ https://github.com/mobluse/ https://twitter.com/mobluse/ https://YouTube.com/MOBiL4u/

John_Tan86
Posts: 2
Joined: Mon Apr 27, 2015 2:56 pm

Re: Headless setup: no keyboard, display or frustration

Wed Apr 29, 2015 11:45 am

Is this also work on Raspberry Pi 2?

John_Tan86
Posts: 2
Joined: Mon Apr 27, 2015 2:56 pm

Re: Headless setup: no keyboard, display or frustration

Wed Apr 29, 2015 2:03 pm

"Type the following, substituting the disk number for X and the name of your image file where you see "2014-01-07-wheezy-raspbian.img"

How to substituting the disk number for X?? in terminal or outside or terminal?
I struck at here....

Code: Select all

Johns-MacBook-Pro:~ JohnTan$ df -h
Filesystem      Size   Used  Avail Capacity  iused    ifree %iused  Mounted on
/dev/disk1     112Gi   52Gi   60Gi    47% 13716830 15617713   47%   /
devfs          183Ki  183Ki    0Bi   100%      634        0  100%   /dev
map -hosts       0Bi    0Bi    0Bi   100%        0        0  100%   /net
map auto_home    0Bi    0Bi    0Bi   100%        0        0  100%   /home
/dev/disk2s1    30Gi  2.3Mi   30Gi     1%        0        0  100%   /Volumes/BOOT
Johns-MacBook-Pro:~ JohnTan$ sudo dd bs=1m if=./2015-02-16-raspbian-wheezy.img of=/dev/rdiskX
Password:
dd: ./2015-02-16-raspbian-wheezy.img: No such file or directory
Johns-MacBook-Pro:~ JohnTan$ sudo diskutil unmount /dev/diskXs1
Unmount failed for /dev/diskXs1
Johns-MacBook-Pro:~ JohnTan$ 

sharadcseth
Posts: 1
Joined: Wed Apr 29, 2015 11:05 pm

Re: Headless setup: no keyboard, display or frustration

Wed Apr 29, 2015 11:34 pm

I get successfully past Step 5 and on my MacBook Air running Maverick (OS X 10.9.5) I am able to get "ssh [email protected]" to work but when I try to get to the Windows interface using vnc://1xx.x.x.xx in the Finder Go command, I get the following message:

"Connection failed to “xx.x.x.xx”.

Please make sure that Screen Sharing (in the Sharing section of System Preferences) is enabled on the computer to which you are attempting to connect. Also make sure your network connection is working properly."

I do not know how to enable Screen Sharing on RP (if that is the problem). Also, since I am able to get ssh to work correctly my network connection should be working correctly.

Thanks!

neonecho
Posts: 1
Joined: Sat Jun 27, 2015 10:23 pm

Re: Headless setup: no keyboard, display or frustration

Sat Jun 27, 2015 10:34 pm

I too got the "Connection failed to “xx.x.x.xx” error after attempting to connect with VNC on my Macbook Pro.

Found out that you have to install and start a VNC server on your Pi before you're able to connect. I followed these steps and was able to connect with vnc://xxx.xxx.xxx.xxx on my Macbook Pro:

On your Pi (using a monitor or via SSH), install the TightVNC package:

Code: Select all

sudo apt-get install tightvncserver
Next, run TightVNC Server which will prompt you to enter a password and an optional view-only password:

Code: Select all

tightvncserver
Start a VNC server from the terminal. This example starts a session on VNC display zero (:0) with full HD resolution:

Code: Select all

vncserver :0 -geometry 1920x1080 -depth 24
Code taken from: https://www.raspberrypi.org/documentati ... ccess/vnc/

GrampaMike
Posts: 5
Joined: Thu Jun 25, 2015 7:04 am

Re: Headless setup: no keyboard, display or frustration

Mon Jun 29, 2015 6:15 pm

In step 5 What is the "Hit" command? :?

GrampaMike

User avatar
DougieLawson
Posts: 42748
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: Headless setup: no keyboard, display or frustration

Mon Jun 29, 2015 7:02 pm

GrampaMike wrote:In step 5 What is the "Hit" command? :?

GrampaMike
That's just part of the sample output from running sudo apt-get update. Try it, it doesn't do any harm.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

subhajit
Posts: 6
Joined: Tue Nov 10, 2015 10:23 am

Re: Headless setup: no keyboard, display or frustration

Wed Nov 11, 2015 8:33 pm

Hi,

Created a bash script for Linux which embeds a SSID and Password to the Raspbian Image so that you can directly use an wi-fi dongle to connect with a wi-fi hotspot after burning the image on the SD card and then use SSH to connect with the board.

The script also provides the option to give a static IP to the Raspbian Image so that you can use a LAN cable to connect your PC with the Raspberry Pi board directly and SSH to it. Youtube videos are linked on the page. Please refer to the link below
http://glowingthumb.com/raspimgconfig/

tfountain
Posts: 1
Joined: Sat Nov 21, 2015 3:23 am

Re: Headless setup: no keyboard, display or frustration

Sat Nov 21, 2015 3:26 am

I plugged my Raspberry Pi into my Airport Extreme Router and ran the arp -a command however I am not quite sure how I identify which one of these it is, or if its even connecting properly.

Any tips?

User avatar
DougieLawson
Posts: 42748
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: Headless setup: no keyboard, display or frustration

Sat Nov 21, 2015 10:07 am

If your RPi is wired to your router the MAC address starts "B8:27:EB:". The second half of the MAC address is the right hand six digits from the CPU serial.

Code: Select all

#!/bin/bash
raspberry="B8:27:EB:"
cpuid=$(cat /proc/cpuinfo | grep Serial | cut -c 21-26 | sed 's/\(..\)/\1:/g')
echo $raspberry$cpuid
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

KartikSL
Posts: 1
Joined: Fri Dec 11, 2015 11:55 am

Re: Headless setup: no keyboard, display or frustration

Fri Dec 11, 2015 12:03 pm

Hi,

I've been trying to setup a Raspberry Pi 2 headless. I'm using Windows and Advanced IP Scanner to detect the IP of the Pi. The ACT light on the Pi was blinking intermittently after inserting the SD loaded with Raspbian for some time. The lights on the ethernet port are also functioning as expected.

In spite of this, I cannot detect the Pi's IP address. The ACT light is now blinking faintly at what seem to be regular intervals. What could be wrong?

pankajb64
Posts: 1
Joined: Thu Feb 18, 2016 7:48 pm

Re: Headless setup: no keyboard, display or frustration

Thu Feb 18, 2016 7:57 pm

Hi,

I got this thing working on Ubuntu 14.04 with Raspberry Pi 2. Basically follow the same steps as described in the post. For VNC Client, i used "Remmina Remote Desktop Client" which comes pre-installed in Ubuntu 14.04 (atleast it was for me). One small thing to note is that you need to create an SSH tunnel in order to access raspi 2. I tried doing that via Remmina by configuring its SSH tunnelling settings without any access. So I created a SSH tunnel via command line and made my client connect to this tunnel.

You can create an SSH tunnel via the following command (assuming your VNC server is running on the default port 5901)

Code: Select all

ssh -L 5901:127.0.0.1:5901 -N -f -l <user> <server_ip_address>
where <user> is the username (which is "pi" by default) and <server_ip_address> is ip address of your pi

You can then point Remmina to connect to the VNC server at 127.0.0.1:5901 with the required credentials (if any)

Cheers!

RokShox
Posts: 1
Joined: Tue Mar 01, 2016 8:16 am
Location: Loveland, CO, USA

Re: Headless setup: no keyboard, display or frustration

Tue Mar 01, 2016 8:31 am

I have done all the setup with an attached mouse/keyboard/monitor.

Now I can ssh into my Pi 2 B with no problem and point X apps back at my desktop machine.

I'd like to use the Pi headless from now on. So, no need to start up a windowing environment at boot.

What's the best way to do that? Perhaps it just sees no keyboard/mouse/monitor attached and skips starting a window environment? If not, I assume it's some script in /etc/init.d being invoked from /etc/rc.? that starts the X server?

What's the best way to disable the windowed environment from starting, but ideally have at least a pty login available in case of emergency?

Thanks, noob here.

dgordon42
Posts: 807
Joined: Tue Aug 13, 2013 6:55 pm
Location: Dublin, Ireland

Re: Headless setup: no keyboard, display or frustration

Tue Mar 01, 2016 11:48 am

These days the Pi boots into the GUI by default. To stop this, and get it to boot to a terminal instead, you can either:
In the GUI select Menu > Preferences > Raspberry Pi Configuration, and select Boot: To CLI in the System Tab.
OR
From a terminal, sudo raspi-config, select 3 Boot Options, and select option B1 or B2.

Hope this helps,
Dave.

sanyam.bhutani
Posts: 26
Joined: Sun Mar 13, 2016 4:42 am

Re: Headless setup: no keyboard, display or frustration

Sun Mar 13, 2016 3:44 pm

I know the assumption.
Still, Is there a possibility of using the Pi by directly connecting it via an ethernet cable to my Macbook ?

Rob73
Posts: 8
Joined: Thu Mar 10, 2016 3:34 pm

Re: Headless setup: no keyboard, display or frustration

Fri Apr 01, 2016 11:01 am

Headerless configuration of RaspberryPi using a 2nd "Controlling" RaspberryPi (using an ethernet cable)
[Works with Raspbian Jessie v4.1 and Headerless RasPi_B+, and probably RasPi_2B and RasPi_3B.]
[Update: Note that this does NOT seem to work with Raspbian Wheezy, as the original Wheezy-Image does not setup a default 169.254.x.x eth0-ip-address when it can't find a dhcp server - so for Wheezy you would probably need to connect both RaspberryPi's to an ethernet-router with a dhcp-server, as detailed by other posts elsewhere.]

To configure a Headerless RaspberryPi (ie. with no keyboard, mouse or screen connected) using a 2nd RaspberryPi as follows:

1) Download the Raspbian .zip file from the Foundations Website (eg. Raspbian Jessie v4.1 March 2016). (Note that you might be able to modify the Noobs software to auto-install as per other posts elsewhere, but I've not tried this, and suggest the Raspbian download is simpler anyway.)

2) Unzip the .zip file to get the .img file

3) Use "Win32DiskImager" (for windows) or other (eg. as per the Foundations "Installation Guide") to copy the .img file to your micro-SD card

4) Use this micro-SD card to boot your Headerless RaspberryPi

5) Use an ethernet cable to connect your 2 RaspberryPis. Note that the RaspberryPi ethernet port has auto-MDIX, which means you can use a straight-ethernet-cable (ie. you don't need to use a crossover-ethernet-cable). As there is no DHCP server in this setup, once the ethernet cable is connected, both RaspberryPis will set their own eth0 ethernet address to IP=169.254.x.x/mask=255.255.0.0 - I am unsure how the RaspberryPi chooses which IP-address to use, but for me each RaspberryPi seem to choose a different default IP-address.)

6) On your "Controlling" RaspberryPi, use "ifconfig" to check the IP-address it has assigned to it's eth0 interface

7) If necessary, install "nmap" on your "Controlling" RaspberryPi (using "sudo apt-get install nmap")

8) On your "Controlling" RaspberryPi, use "nmap -sn 169.254.1.1/16" to find the IP-address of your Headerless RaspberryPi (this scans the 169.254.x.x address space looking for the new Headerless RaspberryPi)
[Note that this can take 40+ minutes for a full scan, but you can interrupt it using ctrl-c as soon as it finds your new Headerless RaspberryPi (eg. reporting "Nmap scan report for 169.254.17.18"). But note that it will also find your "Controlling" RaspberryPi IP-address, so if it finds this first wait until it also finds your new Headerless RaspberryPi IP-address.]

9) On your "Controlling" RaspberryPi, now use "ssh [email protected]" (or whatever IP-address you found) to connect to your new Headerless RaspberryPi (using the default password of "raspberry")

10) Now you can setup your new Headerless RaspberryPi as required (eg. using "passwd" to change the default password, using "sudo raspi-config" to Expand-Filesystem and Change-Hostname, editing "/etc/wpa_supplicant/wpi_supplicant.conf" to setup WiFi, etc).

Return to “Beginners”