
So 192.168.1.2 should be the ip address of the pi. Nmap done: 256 IP addresses (5 hosts up) scanned in 2.58 seconds Nmap scan report for 192.168.1.2 Host is up (0.040s latency). Power it up using a power source (5v regular android charger) and try nmap -sn 192.168.1.0/24 again, to see which ipaddress newly appears Starting Nmap 7.01 ( ) at 18:39 IST Nmap scan report for 192.168.1.1 Host is up (0.0020s latency). Remove the micro SD card from your laptop and insert it into Pi. I get Starting Nmap 7.01 ( ) at 18:39 IST Nmap scan report for 192.168.1.1 Host is up (0.0020s latency). Run the command nmap -sn 192.168.1.0/24 to findout existing devices in the network in range 0 to 24 for the last portion of ipaddress. Say it is 192.168.1.8 then when connected your pi’s ip would be 192.168.1.x

Run the command hostname -I to find out your laptops’ ipaddress. Make sure your laptop is connected to the same wifi network as the one you configured on pi above. If you are on linux, use the touch command to do that.īefore switching on your raspberry pi, we need to findout the existing devices connected to the network. To enable SSH, create a file named ssh in the boot partition. We will later access the Pi using a secured shell (SSH), SSH is disabled by default in raspbian. So replace all the «item» fields in the above text The psk is the wifi password and your country code can be found here: To find out SSID on ubuntu, you can use the iwgetid command. This would overwrite any existing wifi configuration, so if you had already configured wifi on the pi, then that will be overwritten.Ī typical wpa_nf file is as follows ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=«your_ISO-3166-1_two-letter_country_code» network=

The copied file tells the Pi the WiFi setup information. Open the boot volume and create a file named wpa_nf On booting the RPi, this file will be copied to /etc/wpa_supplicant directory in /rootfs partition. The SD card mounts as two volumes boot and rootfs. So we are going to add a file to the SD card so that the Pi boots with a wifi pre-configured.

An ethernet cable can easily make your laptop’s network available to the Pi. Its easier to make two devices talk to each other if they are in the same network.
