Prototype: Sending Bitcoin Transactions via SMS using Raspberry Pi Relay NodeFor the past months, I’ve been working on a functional prototype that allows
sending BTC without an internet connection, using SMS and a Raspberry Pi. This solution could help in remote areas, blackouts, or censorship scenarios where data access is unavailable.
ObjectiveBuild and test a working system to:
- Send BTC payment instructions via SMS from a basic phone or offline smartphone
- Use a Raspberry Pi relay node to process, sign, and broadcast the transaction
- Ensure basic security and confirmation via SMS
- Avoid dependency on internet-enabled mobile devices or UI interfaces
System ArchitectureSender Device (basic phone or smartphone without internet): Sends a structured SMS:
ENVIAR 0.0015 BTC A bc1qnxtsp0ew8vpkgt2u2k9ssy6s5mky8cqnzzpl6s PIN 1984
Relay Node (Raspberry Pi): - Receives the SMS via a GSM modem
- Parses and validates the message using a custom Python script
- Uses Electrum CLI to sign and broadcast the transaction
- Returns the TXID via SMS for confirmation
Technical SummaryHardware: - Raspberry Pi 4B (with Raspbian OS)
- GSM modem (e.g. Huawei E303, SIM800L)
- Active SIM card (Claro / Altice)
- Internet access via Wi-Fi or 5G dongle
Software: - Python 3
- gammu / python-gammu
- Electrum CLI (v4.4.6+)
- Custom Python script to manage parsing, validation, and signing
Key BenefitsThis system works even with basic mobile phones and doesn’t require mobile data or a smartphone. It’s low-cost, easy to build, and I’ve personally tested it in real conditions. It provides a working method for sending BTC when other communication methods fail, using only SMS and a small computer.
LimitationsThe private key is stored in a single node, which means if the Raspberry Pi is compromised, the funds could be stolen. The system also depends on GSM signal quality, so poor coverage will interrupt service. Each SMS has a cost, and if many transactions are done, it can become expensive. Inputting amounts and addresses manually increases the chance of human error. There’s no support yet for multisig or PIN validation per user. Fee estimation is basic, and UTXO handling is not optimized. The relay node must stay powered and online at all times.
Python Script (Prototype)import gammu, subprocess, re
sm = gammu.StateMachine(); sm.ReadConfig(); sm.Init()
msgs = sm.GetNextSMS(Start=True, Folder=0)
for msg in msgs:
if msg["Number"] != "+1XXXXXXXXXX": continue
match = re.match(r"ENVIAR ([0-9.]+) BTC A (\w+) PIN (\d+)", msg["Text"])
if match and match.group(3) == "1984":
monto, direccion = match.group(1), match.group(2)
cmd = f"electrum --wallet wallet_sms payto {direccion} {monto} --broadcast --password TU_PASS"
txid = subprocess.check_output(cmd.split()).decode().strip()
sm.SendSMS({'Text': f'TX enviada: {txid}', 'SMSC': {'Location': 1}, 'Number': msg["Number"]})
In
Dominican Republic or wordwide, imagine that during a political or social crisis, the authorities
decide to restrict or control internet access to limit citizen organization and the flow of information. These measures can affect digital financial services, leaving many people unable to send or receive money through common electronic means. In this situation, sending Bitcoin via SMS using a Raspberry Pi relay node can be a viable solution to maintain the flow of funds. Anyone with a basic phone can send simple instructions via SMS to make secure payments or transfers, without needing direct internet connection. This type of technology will become increasingly necessary in the future, not only for crisis situations but also to guarantee financial freedom and resistance to censorship. That’s why I believe it’s important to start learning and sharing these tools now. This is my contribution to the community so that together we build more resilient and accessible systems.