Using Ham Radio for Internet of Things
Now that billions of computers and mobile phones (which are handheld computers) are all connected by the Internet, the large growth is expected from the “Internet of Things.” What is a “thing?” It could be a temperature sensor, garage door opener, motion detector, flood water level, smoke alarm, antenna rotator, coffee maker, lights, home thermostat, …, just about anything you might want to monitor or control.
For example, a vending machine could report its inventory levels so the delivery schedule could be optimized. Farms can monitor soil moisture levels in different locations to optimize irrigation. The possibilities are endless.
We have a global APRS network with countless Digital Repeaters (Digipeaters) and Internet Gateway (IGate) stations joined by APRS-IS servers. We have an incredible communication resource that is mostly going to waste. ("My house is where it was 2 minutes ago. ... My house is still where it was 2 minutes ago. ...)
Maybe it is time to start using it for some more useful applications.
A few years ago, K7UDR gave a talk about the “APRS of Things.” In his real life example, there was cabin on an island with no electricity. A generator would automatically start up periodically and run for a while to charge batteries. It would be bad if the generator did not start and worse if it kept going and depleted the fuel. How could he know if there was a problem? Without Internet access on the island, Ham Radio was chosen to convey this important information.
There have been other occasional mentions of merging Ham Radio with the Internet of Things but only ad hoc incompatible narrowly focused applications. Here is a proposal for a standardized more flexible method so different systems can communicate with each other. I call it Ham Radio of Things (HRoT).
Internet of Things
"Things" are physical objects that can be monitored and controlled remotely.
How do these “things” all talk to each other? A popular protocol for connecting this together is called MQTT. Rather than everyone talking directly to everyone else, all communication goes through a “broker.”
All the sensors “publish” information to the broker. This information is in the form of a name, called a “topic,” and a value. Those who are interested in obtaining information “subscribe” to the desired topics and the broker passes along values provided by the sensors. Computing elements can monitor appropriate sensors and send commands to the actuators, commanding them to do something. It’s a simple and very flexible approach.
Topics
“Topic” names are composed of letters, numbers, and slashes. The slashes allow you to organize related information into a hierarchical structure, much like directories (or folders) in a computer file system.
building1/floor1/room101/temperature
building1/floor1/room101/humidity
building1/floor1/room101/lights
building2/floor3/room307/temperature
building2/floor3/room307/humidity
building2/floor3/room307/lights
This is useful for keeping things organized and allows use of pattern matching (wildcard characters) to select related information. For example, you could subscribe to the temperature for all rooms, on all floors, of building1 by specifying “building1/+/+/temperature”.
How to Send over Ham Radio
MQTT normally uses TCP/IP. Traditional AX.25 packet radio with “connected” mode would be one way to replace the transport layer. It is similar to TCP/IP in several ways:
· One-to-one communication between stations.
· Acknowledgment that data was received.
· Automatic retry if a transmission doesn’t get through.
· Notification if the other station disappears.
However, the infrastructure is not in place. Range would be limited without having existing digital repeaters (digipeaters) available in many places. There are countless APRS digipeaters everywhere but the traditional connected mode requires a different type of digipeater and they are about as rare as hen’s teeth nowadays.
Another alternative would be APRS “messages.” This is a very attractive approach because there are APRS digipeaters everywhere and they are joined into a global network through Internet Gateway (iGate) stations. You can send a “message” to someone across town or on the other side of the world. Simply construct a packet like this:
WB2OSZ>APZ::N2GH :Hello, Dave!
· Source – your station name.
· Destination doesn’t matter in this case. It is usually the system type.
· “:” data type indicator for “message.”
· Addressee, padded out with spaces to make 9 characters.
· Another “:” character.
· The message text.
There is also an option to put a message identifier at the end and receive acknowledgment that the message was received but we will get back to that later.
The global network of APRS-IS servers and gateway (IGate) stations connect the disjoint radio networks together.
In the message text part, we could encode: publishing values to topics, subscribing to topics, and receiving values for subscribed topics.
Here is a proposed method of encoding MQTT publish, subscribe, and values in APRS Messages. A working reference implementation provides an interface to an MQTT broker.
Conclusion
This has been an introduction into how the Internet of Things can be extended over Ham Radio. If we want to communicate, we need a common language. By incorporating industry standards at the core, we can take advantage of the MQTT ecosystem rather than having to reinvent everything and ending up with incompatible ad hoc approaches that don’t talk to each other.