XMPP is a communications protocol for message-oriented middleware. The protocol was originally designed for near real-time, instant messaging (IM), presence information, and contact list maintenance. Designed to be extensible, the protocol has also been used for publish-subscribe systems, signalling for VoIP, video, file transfer, gaming, Internet of Things applications such as the smart grid.
With other protocols (Ice4J) it will support the following scenario :
  • I have a robot - it does a login
  • remotely on a completely different network I login
  • I see the status of my robot and "connect" to it
  • I have full control, and streaming audio & video from my robot (needs implementation)

Right now the service allows a sign-on to GTalk or any other XMPP / Jabber server and can send and recieve text messages.  The next step (before audio & video streaming) is to allow MyRobotLab messages to be sent and recieved through this protocol - allowing full control of robots or devices through a remote MRL instance.


  • XMPP - Wikipedia description
  • Jitsi (formerly SIP Communicator) is an audio/video and chat communicator that supports protocols such as SIP, XMPP/Jabber, AIM/ICQ, Windows Live, Yahoo! and many other useful features.
  • LibJitsi - media library for secure real-time audio/video communication
  • Java-Bells: A Jingle implementation for Java based on LibJitsi, Ice4J and Smack
  • Ice4J - The Interactive Connectivity Establishment (ICE) protocol combines various NAT traversal utilities such as the STUN and TURN protocols in order to offer a powerful mechanism that allows Offer/Answer based protocols such as SIP and XMPP to traverse NATs.
  • SerialXMPP - neat project of sending and recieving serial port bytes over xmpp
  • XMPP and OpenFire - excellent tutorial to make a client and setup a private XMPP server
  • OpenFire video conferencing - Installation Instructions
  • XMPP IM with Smack for Java applications – Infrastructure for Instant Messaging
  • Getting started with Smack
  • SASL Authorization
  • Discovering Services
  • Jabber.org - the original xmpp server
  • xmpp.net - list of XMPP servers around the internet


#file : service/Xmpp.py edit raw
# simple script to show how to send a message to and recieve a message from
# using a robot with the Xmpp service 

# create an xmpp service
xmpp = Runtime.createAndStart("xmpp","Xmpp")

# adds the python service as a listener for messages

# there is a big list of different xmpp/jabber servers out there
# but we will connect to the big one - since that is where our robots account is
xmpp.connect("talk.google.com", 5222, "robot01@myrobotlab.org", "xxxxxxx")

# gets list of all the robots friends
print xmpp.getRoster()

# set your online status
xmpp.setStatus(True, "online all the time")

# add auditors you want this robot to chat with
# auditors can issue commands and will be notified of 
# commands being sent by others and what those commands return
xmpp.addAuditor("Joe Smith")
xmpp.addAuditor("Jane Smith")

# send a message
xmpp.sendMessage("hello this is robot01 - the current heatbed temperature is 40 degrees celcius", "Joe Smith")

def publishMessage():
	msg = msg_xmpp_publishMessage.data[0]
	print msg.getFrom(), " says " , msg.getBody()

bensonofjohn's picture

Error on latest build of MRL,

Error on latest build of MRL, line 8 of the Python code above comes back with "TypeError: addListener(): expected 1 or 3 args; got 2"