tech tutorial: connecting remotely to a raspberry pi (from a mac) using a mobile hotspot
For roboticists, architects, & artists
It’s convenient to connect to a microcontroller wirelessly when working on an IoT or robotics project (or really, anything with embedded systems). You can quickly update code without plugging and unplugging your laptop, which is especially helpful if you're building something that moves on boot.
Projects that benefit from wireless setup:
A walking robot (can’t troubleshoot if motion is limited by a micro USB cord!)
A moving sculpture (same issue)
Any DIY smart home accessory
Architectural exhibits, models & installations
Wearable tech
This tutorial is specifically written for Raspberry Pi, because of how accessible and beginner-friendly it is. If you’re new to integrating software with physical components, it can be intimidating—this tutorial should help.
What you’ll need:
A Raspberry Pi board
A micro-SD card (and a macro-SD adapter to write files from your laptop)
A Mac OS computer
A mobile hotspot (you’ll need the name/SSID and password)
download raspberry pi os onto the board
Most Raspberry Pi boards use a micro-SD card to store and run their operating system. In this step, you’ll load the card with the Raspberry Pi OS (the board’s operating system).
Go to https://www.raspberrypi.com/software/operating-systems/ and download the latest 32-bit version with recommended software.\
Rename the file to something simple like rpiimage.img.
Using a macro adapter, plug the micro-SD card into your Mac. It should appear under Locations in Finder.
Open Terminal (use Spotlight Search to find it), and list disks with:
diskutil list
Unmount the SD card (replace
disk2
with your SD card’s disk number):
sudo diskutil unmountdisk /dev/disk2
Write the image file to the SD card (replace filenames and disk numbers as needed):
sudo dd if=rpiimage.img of=/dev/rdisk2 bs=1m
The SD card should now reappear in Finder as boot.
configure /boot files
Now, we’ll add instructions to the SD card so the Pi knows how to connect to Wi-Fi and allow remote login.
Create a file in TextEdit (or any text editor) and name it wpa_supplicant.conf (make sure the extension is .conf and not .txt). Paste in the following, replacing the
ssid
andpsk
values with your hotspot name and password:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid=”phonebot”
psk=”botpass123"
priority=10
}
You can add more networks by duplicating the network={}
block with different SSIDs and priorities.
Create a new empty file and name it ssh (no file extension). This enables SSH login without a monitor.
Copy both wpa_supplicant.conf and ssh to the /boot directory on the SD card. If Terminal gives a “read-only” error, try dragging and dropping the files in Finder instead.
power the board & confirm connection
Eject the SD card, insert it into your Raspberry Pi, and connect the Pi to a power supply via micro USB. The red light should be on, the green light should be flashing.
Connect your laptop to your mobile hotspot.
Wait ~5–6 minutes for the Pi to connect to Wi-Fi based on your wpa_supplicant.conf instructions.
In terminal, run:
arp -a | grep b8:27:eb
If you’re curious: ‘arp -a’ asks the terminal to look at the devices that are connected to the same network, and ‘grep b8:27:eb’ asks terminal to look for devices with the MAC address b8:27:eb—b8:27:eb corresponds to the Pi’s MAC address.
Optional:
To find your laptop’s IP, type:
ifconfig
To ping a connected device:
ping [IP address]
If you see timeout errors, something isn’t connected correctly.
SSH into the board
Once you have the Raspberry Pi’s IP address, you can log in remotely:
ssh pi@172.20.10.8
Username: pi
Default password: raspberry
After logging in, you’ll be executing commands on the Pi itself, not your Mac (note the Terminal color change).
enable graphical desktop (optional)
To use a visual desktop environment on your Mac:
Download the VNC viewer for Mac: https://www.realvnc.com/en/connect/download/viewer/macos/
Enable VNC on the Pi:
raspi-config
Use the arrow keys to enable VNC in the System/Display options.
Launch VNC viewer and type the board IP address into the sign-in bar. You now have access to a graphical desktop!
done!
You can now wirelessly log in, upload code, and make updates to your Raspberry Pi without physically connecting to it. Perfect for any moving or embedded project setup.