Skip to content

3. Connect to your computer

Frank1119 edited this page Apr 6, 2019 · 24 revisions

Booting your Raspberry Pi Zero

  1. Eject the SD card from your computer
  2. Insert the card into the Raspberry Pi Zero
  3. Connect the Raspberry with an otg USB cable to your computer. Do not use the connector marked with PWR, but the one marked with USB
  4. After some time the boot of Raspberry Pi Zero has finished. A new network connection should appear
  5. You should be able to connect with e.g. Putty to your Pi Zero. When you have 'Bonjour' installed, the name of the Pi is raspberrypi.local, but without 'Bonjour' you cannot not connect using this name. In that case you have to connect to the ip-address, provided you know the address. To find this address you could use a tool like Wireshark. When capturing packets from the new connection you might see ARP requests like Who has <ip address>? Tell <ip address>. The last ip-address is the address of the Pi
  6. Login with Putty: Default username/password: pi/raspberry

Connecting your Raspberry Pi Zero to the internet

  1. Edit /etc/network/interfaces e.g. with sudo nano /etc/network/interfaces. Replace it with the following lines:

    source-directory /etc/network/interfaces.d
    allow-hotplug usb0
    
    iface usb0 inet static
      address 192.168.137.22
      netmask 255.255.255.0
      gateway 192.168.137.1
    
  2. Edit /etc/resolv.conf e.g. with sudo nano /etc/resolv.conf. Replace it with the following lines:

    nameserver 192.168.137.1
    
  3. Now, in Windows, go to the network connections and select the connection that is connected to the internet. Right-click -> properties. The properties dialog opens

  4. Click on the tab 'Sharing'

  5. Enable 'Allow other network users to connect...'

  6. Select the network adapter associated with your Raspberry Pi Zero from the dropdown-box 'Home networking connection:'

  7. Click Ok. This configures your computer to act like a router. Its address will be 192.168.137.1.

  8. In Putty, enter reboot. This will make your Pi do just that. Close Putty

  9. After the Pi has rebooted you should be able to connect to 192.168.137.22. Connect and login

  10. Try to ping an address on the internet e.g. ping github.com. If this works, you have a (temporary) working connection, which enables you to install all software