Mesh Networking, Part 2

Mesh nodes
Mesh nodes
A few mesh nodes I’ve been experimenting with

A few weeks ago I wrote a post about setting up a mesh network using Broadband-Hamnet. Once you get a few nodes set up, though, the bigger question is what to do with it. After all, having some nodes set up and talking to each other, silently, and unnoticed, is not particularly helpful. We need some apps and services running on the mesh to make it worthwhile.

Video Streaming

I got a comment from a reader, Tracy KD6VZQ, who sent a link to his blog in which he chronicles his own adventures in ham radio mash networking. I was particularly intrigued by his idea to get a video stream from a smart phone onto the mesh. You should see Tracy’s write up for the details, but the important part to know is that you can connect two routers together, with one set as a mesh node, and the other configured as a WiFi access point. Once you get that put together, you can connect a smartphone running an IP webcam app to the access point, and the video stream can be shared through the mesh. Again, see Tracy’s blog for the details on how to actually set all of this up.

OpenFire

Given that communication is one of obvious reasons to build a mesh net, I wanted a reliable means of sending messages and files across the mesh. I came across an open source project called Open Realtime that seems very promising. The project comprises several components. I only needed two of these (so far). The first is an XMPP server called OpenFire. This is the piece that does all the heavy lifting behind the scenes. It’s an ideal use case for a Raspberry Pi running HSMM-Pi. If you use a Linksys or Ubiquiti node, you’ll need a separate computer running the OpenFire server connected to the mesh node. You only need OpenFire running on one node.

Get OpenFire here. To install on a Raspberry Pi, select the Linux version and download the Debian .deb package. I used the gdebi package manager (sudo apt-get install gdebi) to install the package on my Pi. If you would rather put it on a different type of node, get whichever package is appropriate.

If you do use a Raspberry Pi for OpenFire, you’ll need to adjust the ports used for the web-based admin console. There are parts of the HSMM-Pi admin system that uses port 9090, which OpenFire also uses by default. You can change this in the OpenFire configuration file:

sudo su
cd /etc/openfire
nano openfire.xml

Scroll down a little bit until you see the entries for the OpenFire admin port and secure admin port. By default these should be 9090 and 9091, respectively. I changed mine to 9390 and 9391, respectively. I haven’t noticed any problems with this. Once you save the file, you’ll need to restart the OpenFire server:

service openfire restart

Be sure to exit out superuser mode: just type exit at the command prompt to return to your normal user.

You should now be able to access the admin console in a web browser by navigating to localhost:9390 (or whatever port number you set). If you’re working on your Pi remotely, you’ll change localhost to whatever your Pi’s host name is. Anyway, the first time you visit this page, you get a setup wizard. I left the defaults pretty much as they were. Don’t set an encryption key if you’re using this under FCC part 97. Once you get through the wizard, you can log in as an administrator. The administrator user name is admin, and whatever password you set in the setup wizard. From the admin console, you can create users, manage chat rooms, install and setup various optional plugins.

Spark

The other component is the client. The Open Realtime client is called Spark, and you can get it here. I have installed this on a Windows laptop, using the Windows .exe installer, as well as Raspberry Pi nodes using the .tar archive. The Windows version is like any other installer: run it, then launch it. The Linux version simply needs to be extracted into the location of your choice. You start it by going into the extracted folder and running the file called Spark. I have found that on the Raspberry Pi, Spark runs much better on Raspbian Jessie than on Wheezy.

Once you get it running, you can create a new user from within Spark using the Accounts button at the bottom of the login window. If you created users in the OpenFire admin console, you can enter the user name and password, and the name of your server (the hostname of the node you installed OpenFire on). Once you have a user created, you can log in.

Putting it All Together

I had a Linksys router that, it turns out, is not a model supported by Broadband Hamnet. But, as a WiFi access point connected to a router that is supported, I was able to connect a Windows laptop to the mesh wirelessly. I was also able to have a smartphone connected. I have OpenFire running an a Raspberry Pi mesh node, Spark running on another Raspberry Pi node and on the WiFi connected laptop. I also installed an Android app called Xabber on my phone that does what Spark does on the computer, except it doesn’t (yet) support file transfer. And it all works! Spark can trade instant messages, send files, create group chat rooms, and a lot more that I haven’t completely investigated yet. If you find some other clever uses, let me know about them.

73,

WZØW

4 thoughts on “Mesh Networking, Part 2

  1. Hi Scott:

    Thanks for mentioning my blog.

    I noticed your comment “Once you get a few nodes set up, though, the bigger question is what to do with it.”

    It just so happens that I attempted to answer that very question tonight within my own blog. I get local hams asking me the same question.

    Here are a few items that I listed:

    Text Chat

    Voice Chat

    VOIP (Voice Over Internet Protocol) Voip would be a phone system. Like Cisco phones at the office.

    Remote control link between house and Ham Shack.

    I gave a real quick general over view. I hope that it helps create some ideas for other folks using a Mesh Network.

    73s

  2. Another really nice option for integrating phones/tables, is to use the Ubiquiti AirGateway device. It’s a mini wifi AP that snaps onto the Ubiquiti PoE adapters. I use it often when I an demoing my AREDN mesh network. I run the AirGateway on standard Part 15 channels like 1 or 6 and my AREDN (2Ghz) nodes on Part 97 frequencies (2.397Ghz). The AirGateway is really cheap, around $15USD. Nice article.

    1. Thanks, Darryl. I’ll have to check out the AirGateway. I have used Nano Station Loco m2 devices and really like them.

Leave a Reply

Your email address will not be published. Required fields are marked *