DEV Community

Cover image for Beyond Physical SIMs: A Developer’s Guide to eSIM Provisioning and Geo-Testing
BossyBigBoss
BossyBigBoss

Posted on

Beyond Physical SIMs: A Developer’s Guide to eSIM Provisioning and Geo-Testing

TL;DR & Disclosure

Managing connectivity for globally distributed dev teams shouldn't require a hardware supply chain. eSIM shifts this to a software provisioning problem.

Disclosure: I am a Saily affiliate. If you want to try their eSIM service for your next hackathon, remote work setup, or geo-testing, use the promo code **Sahrzad15* for a discount. It supports my writing, and you get a better deal.*


The Bottleneck: Physical SIMs in a Distributed World

As developers, we face two main connectivity challenges in modern workflows:

  1. Onboarding remote talent: Sending a physical SIM to a new developer in another country takes weeks, involves logistics, and creates a terrible Day 1 experience.
  2. Geo-testing & CI/CD: Testing how your mobile web app behaves on a local carrier network. VPNs often change the IP but fail to change the carrier metadata (MCC/MNC), which strict apps detect and block.

Enter eSIM (Embedded SIM). It solves this by treating connectivity as a software provisioning task rather than a hardware one.

Under the Hood: How eSIM Provisioning Actually Works

You don't need to be a telecom engineer, but understanding the GSMA SGP.22 standard helps you debug connection issues.

When you "buy" an eSIM, the provider doesn't just give you a phone number; they generate an Activation Code (often formatted as a QR code or an LPA string). This code contains three critical pieces of data:

  • SM-DP+ Address: The Secure Messaging - Data Preparation server. This is the secure vault that holds your encrypted carrier profile.
  • Activation Code: The unique match ID for your specific profile on that server.
  • Confirmation Code: (Optional) A secondary PIN used to authorize the download.

Your device's LPA (Local Profile Assistant) reads this string, establishes a secure TLS connection to the SM-DP+ server, downloads the encrypted carrier profile, and installs it into the eUICC (embedded Universal Integrated Circuit Card). No physical swapping required.

Why Saily Stands Out for Developer Experience (DX)

While many eSIM providers focus purely on massive enterprise APIs, Saily has nailed the end-user and small-team Developer Experience.

  • Instant Provisioning: No waiting for email approvals or manual KYC delays. The app generates the LPA string/QR code instantly upon purchase.
  • Transparent Data Plans: Clear regional and global data caps. Perfect for short-term hackathons, conference travel (like Web Summit or WWDC), or temporary geo-testing environments.
  • Multi-Device Management: Easy to top up, manage, or switch profiles directly from the dashboard without contacting support.

For a dev team, this means you can literally send a Saily eSIM QR code via Slack or Notion to a new hire or a QA tester, and they are online before their first stand-up meeting.

Practical Dev Tip: Verify Your eSIM Connection Programmatically

Don't just trust the UI. When you activate a new eSIM for geo-testing, you need to verify that your traffic is actually routing through the local carrier and not leaking through a background VPN or default SIM.

Here's a quick Python snippet to check your current ASN (Autonomous System Number) and ISP. This is highly useful to include in your automated testing scripts or pre-deployment checklists.

import requests
import json

def verify_esim_routing(target_country_code="JP"):
    """
    Verifies if the current network traffic is routing through the target country.
    """
    try:
        response = requests.get("https://ipapi.co/json/", timeout=5)
        data = response.json()

        ip = data.get('ip')
        country = data.get('country_name')
        country_code = data.get('country_code')
        asn = data.get('org')

        print(f"--- eSIM Connection Verification ---")
        print(f"IP Address : {ip}")
        print(f"Country    : {country} ({country_code})")
        print(f"Carrier/ASN: {asn}")

        if country_code == target_country_code:
            print(f"✅ Status: SUCCESS - Traffic is routing through the target local carrier.")
            return True
        else:
            print(f"❌ Status: FAILED - Expected {target_country_code}, but got {country_code}.")
            return False

    except Exception as e:
        print(f"❌ Connection check failed: {e}")
        return False

if __name__ == "__main__":
    verify_esim_routing("JP")
Enter fullscreen mode Exit fullscreen mode

Expected Terminal Output

When you run this script on a device connected to a Saily eSIM in Japan, you should see output similar to this:

$ python verify_esim_routing.py
--- eSIM Connection Verification ---
IP Address : 103.152.220.xx
Country    : Japan (JP)
Carrier/ASN: AS131445 KDDI CORPORATION
✅ Status: SUCCESS - Traffic is routing through the target local carrier.
Enter fullscreen mode Exit fullscreen mode

If you see your home ISP or a generic VPN ASN here, you know your eSIM isn't handling the data traffic correctly, saving you hours of debugging your app's geo-location logic!


Final Thoughts

eSIMs are not just a consumer convenience; they are a vital productivity tool for modern, distributed software teams. By treating connectivity as software, we eliminate hardware friction, speed up QA testing, and make remote work truly borderless.

If you're heading to a conference, setting up a remote workspace, or need to test geo-fenced features, check out Saily. Remember to use the code Sahrzad15 at checkout.

Have you integrated eSIM testing into your mobile dev workflows, or do you have scripts to verify carrier routing? Let me know in the comments below!

Top comments (0)