Wednesday, July 15, 2009

July 15, 2009 - XS Setup Cont'd.

In order to get the XS to qualify its hostname, its hostname had to be mapped in both /etc/resolv.conf and /etc/hosts. I implanted the following code into /etc/resolv.conf:

search ict.gctaa.net
nameserver 158.59.254.12
nameserver 158.59.255.11

("nameserver" refers to DNS servers, which feed the server web pages. The "search" command above is for the domain suffix, which I believe we needed for network routing.)

The following went into /etc/hosts:

192.168.209.254 schoolserver.ict.gctaa.net

With the hostname now resolved, ejabberd was finally able to run.

Next, we had to setup an administrative account on the Jabber server, via the following command ("admin" is the new username and "password" is the new password):

ejabberdctl --node ejabberd@schoolserver register user admin schoolserver.ict.gctaa.net password

The command given on the OLPC Wiki page didn't have the "--node ejabberd@schoolserver" bit. When I tried it, the command failed. Apparently, the node has to be specified (at least as long as it isn't localhost).

Next we had to grant administrative privileges to our new account (manually). This was done with the following line implanted into ejabberd's config files, /etc/ejabberd/ejabberd.cfg and /etc/ejabberd/ejabberd-xs.cfg:

{acl, admin, {user, "admin", "schoolserver.ict.gctaa.net"}}.

(Don't forget the period at the end of the line.)

For some reason, we couldn't connect to the web interface, albeit that we had an account, and a connection to the XS. Turns out that the hostname also had to be set in ejabberd's config files:

{hosts, ["schoolserver.ict.gctaa.net"]}.

The above line had to replace a similar line that had "schoolserver.random.xs.org" in place of our new hostname. (Again, don't forget the period at the end of the line.)

After all that, we were finally able to connect to the Jabber server via the administrative web interface at the following address (on port 5280, with the administrator's username behind it):

http://schoolserver.ict.gctaa.net:5280/admin/

This opened the (almost useless) Jabber web interface, from which we were able to create a Shared Roster Group with the following attributes:

Name: Online
Members: @online@
Displayed Groups: Online

The above attributes cause the server to show all connected users in a normal XMPP (instant messaging) client, such as Pidgin.



Pidgin really fits the bill perfectly here, since any user (like a teacher using the administrator account) can log on to the XS from their desktop and will immediately be able to see all of the students that have logged on. Furthermore, being that XMPP is a messaging protocol, the teacher can select any student from their "Buddy List" and send them a message over the server. This causes a Chat Activity icon to appear on the student's XO and thus enables private communication. It can then be postulated that the teacher could create a chatroom from Pidgin and invite all of the students to join, thus creating a unified chatroom from the teacher's desktop. The students can communicate and collaborate to their hearts' content, and afterwards a transcript of the chatroom can be saved on the teacher's computer for later reference.

A wee bit of troubleshooting:

Some of the XOs were initially unable to connect to the Jabber server. Connecting to the server requires two elements:

1) The XO must be connected to the same wireless network as the XS (in our case, the "sugar" AP at 192.168.209.1).
2) The XO's collaboration (Jabber) server must be set to the XS's hostname or IP address (schoolserver.ict.gctaa.net, or 192.168.209.254).

The first element can be achieved from the "Neighborhood" window on the XO, by clicking on the correct access point. The second element can be achieved in one of two ways:

From the Favorites (Home) view of the XO, right-click on the stick figure (I don't know a better word for it), and select "Control Panel". Click on "Network" and set the Collaboration Server to the XS' hostname.

OR

From the Terminal Activity, type

sugar-control-panel -s jabber YOUR.XS.HOST.NAME

(But I prefer the GUI tool.)

After ALL that, the majority of the XOs (with one faulty-hardware exception) were visible from a Pidgin client, and were able to receive and send messages to/from the admin account. Success!

1 comment:

  1. Awesome! We need to share this with the folks at Sugar Labs.

    Great work!

    ReplyDelete