Showing posts with label RBox. Show all posts
Showing posts with label RBox. Show all posts

Sunday, January 03, 2016

RBox XMPP Command Reference for IoT Control

Complete command reference for RBox. Send Help to your RBox device and it will reply with the full list of available commands. For background on RBox, see the introductory post.

RBox Help command output on Xabber

Help command output shown in the Xabber Android app.

Commands are not case-sensitive — they are converted to lowercase internally before processing.

System commands

Version — returns the RBox version in the format MJ.Mn.BUILD (major, minor, 5-digit SVN revision). Run this before and after Sysupdate to confirm the upgrade.

Sysupdate — downloads and installs the latest RBox release from GitHub onto the non-active boot partition. A reboot is required for changes to take effect. Tip: send Sysupdate;reboot to update and reboot in one step.

Reboot — gracefully shuts down all services and restarts the device.

Poweroff — gracefully shuts down and halts the system. Always use this before cutting power — a hard power-off leaves the XMPP session stale (the server shows the device as online but it is unresponsive).

Uptime — returns the device uptime in hours.

Network commands

Publicip — returns the public IP address assigned to the router. Useful when dynamic DNS is unavailable or not updating correctly.

Localip — returns the local LAN IP address of the RBox device. Useful for SSH access on the same network.

Hostname commands

Hostname [name] — with an argument, sets a new persistent hostname (takes effect after reboot). Without an argument, prints the current hostname. Useful when SSH-ing into RBox on the local network.

Resethostname — resets the hostname to the default format brbox-1A2B3C4D5E6F (where the last 12 characters are the MAC address). Requires a reboot.

GPIO commands

Gpio <address> [value] — reads or writes a GPIO pin. Examples:

Gpio 2 1    # set GPIO2 high
Gpio 2 0    # set GPIO2 low
Gpio 2      # read current state of GPIO2

GPIO pin values are not retained across reboots — they revert to defaults.

SOURCE CODE

github.com/hackboxguy/brbox — RBox sources and build instructions

RBox: Lightweight Linux Distro for IoT Devices

RBox (RemoteBox) is a lightweight Linux distribution built with Buildroot, designed for IoT devices that need reliable connectivity over the public internet. It runs on low-cost hardware and uses XMPP chat messaging for remote control — no cloud services, port forwarding, or dynamic DNS required.

The Raspberry Pi image provided here works only on Raspberry Pi B+.

Key features

  • Runs on Raspberry Pi B+, BeagleBone Black, and BeagleBone Green
  • Small update image — under 20 MB for Raspberry Pi, under 10 MB for BeagleBone
  • Over-the-air updates with dual-boot failsafe against power outage or network failure
  • Always-on XMPP chat-bot keeps the device accessible via any Jabber server
  • Remote GPIO read/write via chat messages
  • Health monitoring commands
  • GSM SIM management with Huawei E173 USB modem — read/send/delete SMS, dial USSD codes, voice dialling
  • Open source — hosted on GitHub

Applications

Deploying RBox on Raspberry Pi B+

  1. 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
  2. Download the RBox SD card image
  3. Decompress with 7-Zip or your preferred tool
  4. Write the image to the SD card using Win32DiskImager
  5. Remove and re-insert the SD card — a boot drive appears
  6. Create xmpp-login.txt on the boot drive using this template — replace the sample credentials with your device's XMPP username and password
  7. Insert the SD card into the Raspberry Pi, connect an Ethernet cable, and power on
  8. On your phone, open Xabber and log in with the master XMPP account
  9. The Raspberry Pi should appear online — send Help to see the list of available commands
  10. Send Sysupdate;reboot to update to the latest RBox image — see the full command reference

RBox is in active development. Contributions and feedback are welcome — leave a comment or open an issue on GitHub.

SOURCE CODE

github.com/hackboxguy/brbox — RBox sources and build instructions