A step-by-step guide to creating XMPP master and slave accounts on a public server (tested with xabber.de, jabber.de, ubuntu-jabber.de) using the Psi desktop client. These accounts enable remote control of embedded Linux devices over the public internet via XMPP chat protocol.
Shortcut: If you have two Google accounts, you can skip this guide entirely — just authorize both accounts as contacts and use one as the master (your phone/PC) and the other as the slave (chat-bot). In the second account's Google security settings, set "Allow less secure apps: ON".
Why XMPP for IoT?
XMPP is widely used as a chat protocol between humans. The technique described here repurposes it for remotely accessing and controlling embedded devices over the public internet. XMPP was chosen for its wide adoption, built-in security, and ease of connectivity.
Typical client-server communication over the public internet requires exposing a server port through a firewall and registering a dynamic DNS name — a common challenge for home routers or 3G-connected devices with non-static IPs. Using existing public XMPP server infrastructure sidesteps these connectivity challenges entirely.
In this setup, the master account is for the person controlling the device (from a smartphone app like Xabber or a PC client like Psi), while the slave account runs on the remotely deployed Linux machine (Raspberry Pi, BeagleBone, etc.) as a chat bot. As long as both devices have internet access, they can communicate regardless of location.
Creating the master account
Step 1: Install Psi XMPP client on your Windows machine.
Step 2: Start Psi, go to General → Account Setup.
Step 3: Click on "Add".
Step 4: Follow the numbered fields as shown below.
Step 5: Enter the public server as xabber.de and click "Next".
Steps 6–10: After pressing "Next", wait for the registration form to load. Fill in the fields:
- Field 1: Choose a username (e.g. "master")
- Field 2: Enter your password
- Field 3: Open the captcha link in a browser
- Field 4: Enter the captcha number shown by the browser
Click "Next".
Step 11: If registration succeeds, click "Ok" on the confirmation dialog.
Step 12: Click "Save" on the account properties dialog.
Step 13: Click "OK" on the next confirmation dialog.
Step 14: Back in the Psi main window, right-click on the "Master" entry → Status → Online.
Step 15: Enter your full name and nickname, then click "Close".
Step 16: Master account creation is done. Log out by right-clicking on the "Master" entry → Status → Offline.
Creating the slave account
Repeat steps 1–15 for the slave account. Pay attention to these differences:
- Step 4: Use the string "Slave" instead of "Master"
- Steps 7–8: Choose a different username and password
- Step 15: Use "Slave" as the full name and nickname
Pairing master and slave accounts
Once both accounts are created, go to General → Account Setup. Enable both the Master and Slave account checkboxes, then click "Close".
Right-click on "Slave" → Status → Online (wait for the grey star to turn yellow). Repeat for "Master". When both stars are yellow, both accounts are online.
The master and slave accounts now need to authorize each other — this is XMPP's standard mechanism to block unsolicited messages. Send a few test messages between the accounts to confirm bi-directional communication works.
Next step: Proceed to Rbox — A Lightweight Linux system for IoT to set up the slave device.
1 comment:
Good and very informative post. You have shown step by step procedure to create Xmpp account which will made it easy for people to create the account
Post a Comment