How to setup a Raspberry Pi without keyboard, external monitor, mouse, power adapter and Ethernet cable?
I'm new to Raspberry Pi.
Here I'm sharing few experience, which I faced while setting Raspberry Pi board.
After receiving pi, I started collecting all the required cables to setup. Then realized I don’t have either ethernet port in my MacBook or type-c adapter for ethernet plug. Also, I don’t have an external monitor, keyboard and mouse.Actually, we don’t required any of these components to connect Raspberry Pi.
All we need is to enable SSH in Raspberry Pi board.
Here is the steps to enable SSH in Raspberry Pi with Mobile Hotspot. And also steps to connect VNC to Raspberry Pi desktop access.
Step 1: Download Required OS and softwares
- Download Raspberry Pi OS from https://www.raspberrypi.org/downloads/
- Download and install SD card formatter from https://www.sdcard.org/downloads/formatter/
- Download and install Etcher from – https://www.balena.io/etcher/
- Download and install from https://www.realvnc.com/en/connect/download/viewer/
Step 2: Installing Raspberry Pi OS into SD card
- Format SD card using SD card formatter
Flash Raspberry Pi OS into SD card by selecting previously downloaded pi OS image and SD card volume using Etcher
Step 3: (Must) Important to follow
- Unplug and re-insert the SD card reader in machine(macbook), open SD card volume. Mostly, by default you can find folder name boot, in my case I got “recovery” as a boot folder name.
Some files need to be added before inserting SD card into Raspberry Pi.
- SSH access is disabled by default in model 4. To enable ssh, create an empty file named
sshin SD card folder
- Create a file named wpa_supplicant.conf. Paste the following piece of code in it. And update Hotspot name and password in respective fields
Step 4: Find IP address
- Connect MacBook with Mobile Hotspot
- Install any preferred IP scanner to find IP
- or Open HotSpot setting in your Android/iOS mobile, in that you can see connected devices, from that you can get Raspberry Pi IP and there are other methods like nmap also there.
Step 5: Enable GUI access for Raspberry Pi
- Insert SD card into pi board. Connect usb to c-type cable from your Macbook to power up the board.
- Open terminal in Mac, replace ip address of your raspberry pi attained from step 4.
- You will be prompted for the password, default pi password is – raspberry
- In the pi terminal run sudo raspi-config and select option 5. Interfacing Options
In that select option 3. VNC to enable Graphic remote access to Pi
step 6: Connect GUI from MacBook VNC viewer
- Create “New connection”, enter Raspberry Pi IP address in “VNC server field” and connect.
Select “continue”, Finally you will get GUI access to Raspberry Pi
You can connect GUI and enable ssh without an external monitor, keyboard, mouse, ethernet cable and even power adapter.