Four Ways Devices Connect for File Transfer
Before any file moves between your phone and computer, the two devices need to find each other. This pairing step is where most people hit their first wall. The transfer itself is usually fast. Getting connected in the first place is the bottleneck.
I've been building OpenDrop for a while now, and pairing is the feature I've spent the most time on. Not because the code is complicated, but because different network environments break different pairing methods. What works flawlessly on your home WiFi fails silently at a hotel. What works at the office fails at the airport.
There are four common approaches to device pairing for file transfer: mDNS auto-discovery, QR code scanning, manual IP/URL entry, and proximity protocols like Bluetooth or NFC. Each has a clear best-case scenario and specific situations where it falls apart. This guide will help you pick the right one for where you actually are, not where you wish you were.
mDNS Auto-Discovery: The Default Choice
Multicast DNS is how devices find each other without any manual input. Your phone broadcasts a question on the local network asking "who's running a file transfer server?" and the server responds with its address. OpenDrop advertises itself as _opendrop._tcp.local. on port 8000, and mobile apps pick this up within a few seconds of opening.
mDNS is the same technology behind Apple's Bonjour, which is how AirDrop and AirPrint find nearby devices. It's also how Chromecast, smart speakers, and most IoT devices announce themselves on your network. The protocol is battle-tested.
When mDNS works: home WiFi networks, small office networks, any network where the router allows multicast traffic between devices. If both devices are on the same WiFi and the router isn't running client isolation, mDNS will find the server in 2-5 seconds automatically.
When mDNS fails: the list is longer than you'd expect. Hotel WiFi almost always blocks multicast traffic. University eduroam networks typically enable client isolation. Corporate guest networks, airport lounges, conference venue WiFi, co-working spaces with managed access points. I ran into this at a conference in Greenville, SC, where my iPhone 15 and Windows PC were both on the same network, but the access point had AP isolation turned on. Both devices were online, but invisible to each other.
mDNS also doesn't work across different networks. If your phone is on cellular and your PC is on home WiFi, there's no shared network for multicast traffic. The protocol is local-only by design.
Recommendation: mDNS should be your default. Don't change it, don't think about it. If it works, you're done in seconds with zero effort. Only move to another pairing method when mDNS can't find your device.
QR Code Pairing: When Discovery Fails
QR code pairing exists to solve the exact situations where mDNS breaks down. Instead of devices finding each other over the network, you point your phone's camera at a code on your computer screen. The code contains everything needed to connect: the server URL and the authentication secret.
In OpenDrop, the QR code encodes a compact JSON payload with two fields. The server URL (either a local IP address for LAN connections, or a Cloudflare tunnel URL for remote connections) and the HMAC shared secret used for request signing. Every API call after pairing is authenticated with HMAC-SHA256 and a 30-second timestamp window. One scan bootstraps the entire authentication chain.
The scan takes 1-3 seconds. Modern iPhones and Android phones have QR scanning built into the default camera app, so no extra software is needed on the phone side.
When QR pairing works best: networks with blocked mDNS (hotels, universities, corporate guest WiFi), first-time remote connections where the phone is on cellular and needs the tunnel URL, and onboarding someone else's device where you want zero-explanation setup.
When QR pairing doesn't work: if you can't physically see the other device's screen. Remote pairing where you're in a different location from the computer requires sending the QR code as a screenshot (which works, but adds a step). Also not ideal for fully headless servers with no display attached.
The QR code carries the authentication secret through light, from screen to camera. No secret is transmitted over the network during pairing. This makes QR pairing more secure than methods that exchange credentials wirelessly, since an attacker would need physical line of sight to intercept it.
I tested QR pairing with my M5 MacBook Pro displaying the code and my Redbeat D5 Android phone scanning it on cellular data. The phone connected to the remote Cloudflare tunnel within three seconds of scanning. Dictating the tunnel URL would have taken a minute and at least one typo.
Recommendation: QR pairing is your second-line method. When mDNS fails to find a device within 10-15 seconds, switch to QR. It's also the best method for first-time connections and guest devices.
Manual IP and URL Entry: The Fallback
Every file transfer app supports typing in an IP address or URL directly. It's the most reliable method because it works regardless of what the network allows or blocks. If you have the address, you can connect.
For LAN connections, you need the server's local IP address and port. In OpenDrop's case, that looks like http://192.168.1.47:8000. For remote connections, it's the Cloudflare tunnel URL. You can find both in the server's dashboard.
When manual entry works best: headless servers with no display for QR codes, scripted or automated connections where you're using the CLI, and situations where you already know the server's address from a previous session.
When manual entry is painful: on phone keyboards. Typing an IP address with port number requires switching between the letter keyboard, number keyboard, and symbol keyboard multiple times. I time this at 8-12 seconds on a phone with zero typos, and most people make at least one mistake. Tunnel URLs are even worse, with 30+ characters of randomized words and hyphens.
Manual entry also requires you to know the IP address, which changes when your router reassigns it. DHCP lease times vary, and what worked yesterday might not work today. You can set a static IP on the server to solve this, but that's extra configuration most people won't bother with.
Recommendation: reserve manual IP entry for CLI usage, headless servers, and scripted automation. For interactive use on a phone, QR scanning is faster and less error-prone. If you find yourself typing the same IP repeatedly, that's a sign you should either use mDNS (which handles address changes automatically) or set a static IP on the server.
Bluetooth and NFC: The Slow Alternatives
Some file transfer apps use Bluetooth or NFC for device pairing. These proximity-based protocols detect nearby devices without network infrastructure. AirDrop uses a combination of Bluetooth for discovery and WiFi for the actual transfer. Android's Quick Share uses a similar approach.
Bluetooth pairing for file transfer has a well-known problem: it's slow. Bluetooth 5.0 maxes out at about 2 Mbps in practice. A 100MB file takes nearly seven minutes over Bluetooth alone. Most apps that use Bluetooth only use it for discovery and initial handshake, then switch to WiFi for the data transfer. But even the discovery phase can be sluggish, with Bluetooth scans taking 5-15 seconds depending on the devices.
NFC pairing requires physically tapping devices together, which limits it to phone-to-phone transfers. Your phone doesn't have NFC range to reach your desktop across the room. NFC is also unavailable on most laptops and desktops.
When Bluetooth/NFC works: when both devices support it and you're standing right next to them. Phone-to-phone transfers in the same room. Apple-to-Apple transfers where AirDrop handles everything automatically.
When Bluetooth/NFC doesn't work: cross-platform scenarios (Bluetooth pairing protocols differ between ecosystems), transfers to desktop computers that lack Bluetooth, any distance beyond a few feet for NFC. OpenDrop doesn't use Bluetooth or NFC. The overhead of maintaining Bluetooth pairing across five operating systems wasn't worth it when mDNS and QR codes cover the same scenarios faster.
Recommendation: if you're in a single ecosystem (all Apple or all Android) and both devices have Bluetooth, the built-in platform tools handle this fine. For cross-platform transfers or any scenario involving a desktop PC, network-based pairing (mDNS or QR) is faster and more reliable.
Which Pairing Method to Use: A Decision Framework
After testing across my Windows 11 PC, M5 MacBook Pro, iPhone 15, Redbeat D5 Android, and my ParrotOS Linux laptop, here's the framework I use every time.
Step 1: Try mDNS first. Open the app, wait 5-10 seconds. If the server appears in the device list, tap it and you're connected. This works most of the time on home and small office networks. No action needed on your part.
Step 2: If mDNS fails, scan the QR code. Look for the QR code on the desktop app's dashboard. Point your phone camera at it. Connected in 1-3 seconds. This covers hotel WiFi, university networks, corporate guest networks, and first-time remote connections.
Step 3: If you can't see the screen, type the URL. This applies to headless servers, remote machines you're accessing via SSH, or CLI-based automation. Copy the server URL from the terminal output and paste or type it into the mobile app's manual connect field.
Step 4: Use Bluetooth/NFC only for same-ecosystem, phone-to-phone transfers. If both devices are iPhones, AirDrop with Bluetooth discovery is hard to beat. If both are Android, Quick Share handles it natively. For anything cross-platform, skip Bluetooth entirely.
The pattern is simple: automatic first, visual second, manual third, proximity last. Each step is a fallback for when the previous one doesn't apply. Most of the time, you'll never get past step 1. On tricky networks, step 2 handles it. Steps 3 and 4 are edge cases.
OpenDrop supports the first three methods across all five platforms. The design goal was to make sure there's always a way to connect, regardless of what the network throws at you. mDNS for the easy case, QR for the common failure case, manual entry for the power-user case. No single pairing method works everywhere, but the combination of these three covers every network I've tested on.
Connect Your Devices in Seconds
OpenDrop supports mDNS auto-discovery, QR code pairing, and manual connection across Windows, macOS, Linux, Android, and iOS. Pick the method that fits your network.
Download OpenDrop Free