A compact, battery-powered IoT device built from a Raspberry Pi Zero, a Huawei E173 USB 3G modem, and a prepaid SIM card. RBox — a lightweight Buildroot-based Linux distribution (~25 MB) — boots from the SD card, connects to the internet over 3G, and runs an XMPP chat-bot so you can monitor and control the device from your phone's chat app.
What happens at boot
usb_modeswitchswitches the 3G modem from mass-storage mode to modem modeumts-keeper+sakis3gestablish and maintain the 3G internet connection- The XMPP chat-bot daemon (built on gloox, a C++ XMPP library) logs in to a Jabber server
- You can now communicate with the Pi Zero from your Android Xabber app (or any XMPP client)
Features
- Total cost under ~50 EUR (Pi Zero + SD card + 3G stick + SIM + battery)
- Read-only root filesystem — power cuts do not corrupt the SD card
- Over-the-air Linux image upgrade via XMPP chat message (~25 MB per upgrade)
- No cloud service, port forwarding, or dynamic DNS required — just two Jabber accounts
- Send/receive SMS and dial USSD codes via chat messages
- Control GPIO pins with get/set commands
- Execute shell commands remotely via chat
- Multiple XMPP accounts can control the same device simultaneously
Use cases
- SMS gateway — deploy at home with a local prepaid SIM, access SMS from anywhere via Jabber
- Weather station — deploy in a 3G coverage area with solar panel and sensors
- Fleet management — place in vehicles with a GPS sensor, track from a central PC
- Wildlife monitoring — deploy with a camera in a GSM-covered area
- Digital signage — control display content remotely via chat
- Anti-theft tracker — for cars, boats, caravans — sends GPS coordinates when movement is detected
- Home automation — monitor temperature/humidity, control relays via GPIO
FAQ
How much 3G data does this use?
With no chat traffic, only XMPP heartbeat packets are sent — typically a few hundred kilobytes per day.
How long does the battery last?
A fully charged 5200 mAh battery keeps the setup running for 8–10 hours. Use a higher-capacity battery for longer runtime.
Can I deploy this off-grid?
Yes, with a larger battery and solar panel. Ensure the location has 3G coverage.
What happens if power fails during an OTA update?
RBox writes the new image to the non-active partition, then flips the boot flag and reboots. A power failure during the write leaves the active partition untouched.
Why the stacked form factor?
A compact rectangular brick is easier to enclose in a 3D-printed case than dangling cables.
How much does this cost to run?
Total hardware cost is under 50 EUR. A 100 MB / 30-day prepaid data plan (e.g. ~2 EUR/month with Congstar in Germany) is sufficient for basic I/O control and command traffic.
Items needed
- Raspberry Pi Zero v1.3
- Huawei E173 USB 3G modem
- 8 GB SD card
- Battery pack (5200 mAh or larger)
- Four pogo pins
- General-purpose PCB
- PCB-mountable USB male and female connectors
SD card setup
- Create two XMPP accounts on a public Jabber server (tested with jabber.de, xabber.de, ubuntu-jabber.de) and authorize them to chat with each other
- Download the RBox SD card image
- Decompress with 7-Zip or your preferred tool
- Write the image to the SD card using Win32DiskImager or similar
- Remove and re-insert the SD card — a
bootdrive appears - Create
xmpp-login.txton the boot drive using this template — replace the sample credentials with your device's XMPP username and password (update APN details for your carrier) - Insert the SD card into the Pi Zero and power on — wait 2–3 minutes for the 3G modem LED to glow solid blue
- On your phone, open Xabber and log in with the master XMPP account
- The Pi Zero should appear online — send
Helpto see the list of available commands - Send
Sysupdate;rebootto update to the latest RBox image — see the full command reference - For graceful shutdown, send
poweroffand wait for the 3G modem LED to turn off
SOURCE CODE
github.com/hackboxguy/brbox — RBox sources and build instructions
Pi Zero build instructions — generate the binary image from source