use MAXS to control your device via ejabberd(plus ssh, jingle voice talk as a bonus)

Let’s see what we have got here:
A xmpp server based on ejabberd on my host:
Windows client: Jitsi(Recommended), Pidgin.
(Optional)A Android client: Xabber.
MAXS on my Nexus 5 Android phone.

1. Prepare the server(Debian 7)

# apt-get install ejabberd
# cd /etc/ejabberd/; wget

Change hosts and admin section to your FQDN.
Here’s a example:

{hosts, [""]}.
{acl, admin, {user, "mypassword", ""}}.

Then you should restart ejabberd, and maybe a reboot is essential.

# /etc/init.d/ejabberd restart

Enable Jingle(voice and video)

You need JingleNodes module on your server.

# apt-get install erlang-tools
# git clone git:// exmpp
# cd exmpp; ./configure; make; make install
# svn checkout jinglenodes
# cd jinglenodes; ./configure --prefix=/usr/; make; make install

Add following content to your ejabberd.cfg in the modules section.

  {mod_jinglenodes, [
		     {host, "jinglenodes.@HOST@"},
		     {public_ip, ""},
		     {purge_period, 5000},
		     {relay_timeout, 60000}

Enable web register(optional)

Add to ejabberd.cfg, ‘modules’ section the basic configuration:

{modules, [
  {mod_register_web,     []},

In the ‘listen’ section enable the web page:

{listen, [
  {5281, ejabberd_http, [
    {certfile, "/etc/ejabberd/ejabberd.pem"},
    {request_handlers, [
      {["register"], mod_register_web}

Use your own certificate

openssl req -new -x509 -newkey rsa:1024 -days 3650 -keyout privkey.pem -out server.pem
openssl rsa -in privkey.pem -out privkey.pem
cat privkey.pem >> server.pem
rm privkey.pem

The port numbers you should open are: 5281(http://localhost:5281/register/) 5280(http://localhost:5280/admin) and 5222(for c2s).

Register users:

# ejabberdctl register admin mypassword
# ejabberdctl register myphone mypassword
# ejabberdctl register mypc mypassword

2. Pidgin and MAXS test

By the way, guarantee that there is only one running jabber client on your phone during this period.
Add a friend
Shell test
SMS test
And a msg to my GF.


您的电子邮箱地址不会被公开。 必填项已用*标注