Search

Electronic currency using SIM Access Profile

0 views

Understanding the SIM Access Profile: Architecture and Operations

The SIM Access Profile (SAP) is a Bluetooth specification that lets a mobile device’s SIM card talk to another Bluetooth‑enabled device over a local, wireless link. It builds on the existing GSM and Bluetooth stacks to create a secure channel where a client and a server exchange small command messages called APDUs (Application Protocol Data Units). The result is that a phone, a vending machine, or a telephone booth can read or write information on a SIM card without needing a wired connection to the cellular network.

At its core, SAP defines two logical roles: the client and the server. In the client‑server model, the client initiates a request and the server responds. In the server‑client model, the server can start the session. This duality lets designers choose the most convenient arrangement for a given application. For example, a vending machine can act as a client that asks a customer’s phone (the server) for permission to deduct money, whereas a public phone booth might act as a server that listens for incoming calls from a phone that initiates the link.

Both roles rely on an active Bluetooth connection. The devices discover one another using the Generic Attribute Profile (GATT) or the older Service Discovery Protocol (SDP), then negotiate the SAP session. Once the connection is established, the SAP service uses a lightweight transport layer that carries APDU commands and responses. The commands follow the ISO/IEC 7816 standard used by smart cards, making it straightforward for manufacturers to reuse existing SIM firmware and tooling.

When a client wants to control a SIM card, it sends three types of messages to the server. First, the client can manage the connection, telling the server to start or stop the SAP session. Second, it can send command APDUs that request actions like reading the accumulated call meter (ACM) or changing the service provider name (SPN). The server replies with a response APDU that contains the requested data or the status of the operation. Third, the client can transfer an ATR (Answer To Reset) to inform the server that the card is ready for communication, or it can instruct the server to toggle the SIM card’s power state.

In contrast, a server can issue status reports to inform a client of the current connection state, or it can send card reader status updates if the SIM is part of a multi‑card environment. These server‑initiated messages are less common but useful in scenarios where the server must signal a client about a change in the SIM’s state, such as a power outage or a tamper event.

Security is a critical concern because a mobile device’s SIM holds sensitive billing information. SAP provides four layers of protection. First, bonding creates a shared secret between two devices that persists for the life of the link. Second, baseband encryption encrypts the payload between the Bluetooth radios. Third, the server‑initiated authentication process allows the server to challenge the client with a nonce and verify that the client knows the SIM’s cryptographic key. Finally, link keys derived from the bonding process ensure that only the paired devices can access the SIM data. Together, these measures prevent eavesdropping, replay attacks, and unauthorized modifications to the SIM’s internal tables.

One of the most compelling use cases for SAP is the creation of an “electronic currency” that lives inside a SIM card. Because the SIM already stores the user’s credit balance, account number, and the accumulated call meter, it can serve as a wallet. A mobile device can, over Bluetooth, request the server to deduct an amount from the ACM and record the transaction in a secure log. The user can then use that balance to pay for vending machine items, phone calls, or public transportation tickets - all without carrying cash or a separate payment card.

The SIM’s built‑in authentication capabilities, such as Card Holder Verification (CHV) and biometric verification on modern devices, can be integrated into the SAP workflow. A device can send a Disable CHV APDU to allow a transaction, perform the deduction, and then send an Enable CHV APDU to lock the SIM again. This tight coupling of authentication and payment protects the user’s balance from being drained by malicious actors. It also simplifies the user experience because the device’s screen can display the updated balance in real time using the Personal Area Network (PAN) profile.

Because SAP operates over Bluetooth, it is ideal for short‑range scenarios where power consumption and cost are important. A customer standing next to a vending machine can complete a purchase in seconds, while a public phone booth can let a caller connect without the overhead of a cellular subscription. In each case, the customer’s device communicates with a local server that, in turn, updates the SIM’s internal state. The result is a frictionless, low‑cost transaction that mirrors the feel of an electronic cash system but is backed by the ubiquitous GSM network.

In the next section we will explore two concrete deployments that bring this technology into everyday life: smart telephone booths and Bluetooth‑enabled vending machines. These examples demonstrate how the SAP’s client‑server model, security features, and flexible command set can be used to create real‑world payment solutions.

Practical Applications: Smart Vending Machines and Phone Booths

Imagine walking down a busy street on a hot afternoon. A vending machine glows with bright colors, offering a cold soda. Traditionally, you would need a wallet, cash, or a prepaid card. With a Bluetooth‑enabled phone, you can make the same purchase in a few taps, without handling any physical money. This is the promise of the SIM Access Profile in action.

For the vending machine to accept a mobile payment, it must meet a few hardware and software requirements. First, it needs a SIM card and a connection to a cellular network, so it can write to the SIM’s billing tables. Second, it must include a Bluetooth radio that supports the PAN or LAN Access Profile, which creates a simple local network between the machine and the customer’s phone. Third, the vending machine’s firmware must support the SAP server role so it can receive and interpret APDUs from the phone’s SAP client. Finally, the machine should run an application that translates a customer’s selection into a monetary value and then issues the corresponding APDUs.

The customer’s phone acts as the SAP client. After launching a vending‑machine app, the phone discovers the machine’s Bluetooth service and initiates a PAN connection. The app presents the customer with a menu of items and prompts for authentication. Modern phones can use facial recognition, fingerprint scanners, or a PIN to disable the SIM’s CHV, enabling the machine to modify the ACM. The app then sends a series of command APDUs that request the vending machine to increment the ACM by the amount equivalent to the purchase. The machine reads the command, deducts the balance, and responds with an acknowledgment APDU. Once the acknowledgment is received, the machine dispenses the selected item and updates its internal log.

Because the vending machine does not have to route the transaction through the phone’s carrier for billing, the process is fast and cost‑effective. The machine can choose from three delivery models for the transaction data: a wired connection to a back‑end server, a direct wireless link that pushes the data to the carrier’s billing system, or a delayed mode where the machine stores the transaction locally and uploads it in bulk later. The last option is useful in rural or remote locations where connectivity is intermittent, but the machine must maintain enough memory to hold all pending transactions.

Beyond vending, the same architecture supports public telephone booths. Picture a weather‑proof booth that houses a Bluetooth radio and a SIM card. A user holding a phone steps up to the booth and opens a dedicated app. The app discovers the booth’s service, then initiates a connection. The booth, acting as the SAP server, checks the user’s SIM for a sufficient balance. If the balance is adequate, the booth authorizes the call and starts the billing process. Every minute of the conversation is logged by the booth’s firmware, which updates the ACM on the SIM and informs the user’s phone of the remaining balance in real time. When the call ends, the booth finalizes the transaction and logs the call record to the carrier’s system. The result is a low‑price, reliable public‑call option that saves both user time and money.

Smart vending machines and phone booths illustrate how the SIM Access Profile turns a SIM card into a versatile payment hub. By combining local Bluetooth communication, the SIM’s built‑in authentication, and the carrier’s billing infrastructure, developers can create secure, scalable payment solutions for a variety of consumer touchpoints. The same principles apply to parking meters, toll booths, or even automated toll‑free kiosks, opening the door to a future where every device can participate in electronic currency without the need for new payment cards or complex point‑of‑sale hardware.

Further Reading

Suggest a Correction

Found an error or have a suggestion? Let us know and we'll review it.

Share this article

Comments (0)

Please sign in to leave a comment.

No comments yet. Be the first to comment!

Related Articles