Overview

About

Shackbus is an opioniated, vendor independent specification on how to inter-connect devices within an amateur radio station.

Purpose

Within an amateur radio station we have several devices which are interconnected, mostly through hard wired with cables. Some vendors have started to implement software interfaces, but they are mostly incompatible amongst each other. Either because they use different transportation protocols or have incompatible message protocols / formats.

Shackbus tries to solve this problem by providing common means of communication and interfaces. Shackbus is leveraging open source, industry proven protocols and services.

Shackbus is a collaborative effort and not owned by a person or commercial entity. The Shackbus specification is published under the very permissive MIT License.

Key Technologies

Transportation (MQTT)

For the transportation, Shackbus relies on Ethernet communications. However, instead of using raw TCP or UDP sockets, Shackbus uses at its heart the TCP based MQTT protocol. MQTT is a lightweight machine-to-machine (M2M)/ Internet of Things connectivity protocol. It was designed as an extremly lightweight publish/subscribe messaging transport.

All clients connect to a centralized MQTT Broker which is typically located (but doesn’t necessarily) has to be in the Local Area Network.

Through the publish and subscribe architecture, connected clients publish and/ or subscribe to topics relevant for them. Wildcard subscriptions are possible.

The Shackbus specification comes with a recommended topic topology:

    station/class/device/specific

An Antenna switch for example would subscribe (listen) on the following topic:

    mystation/antennas/6pack/request

and publish (respond) on the following topics:

    mystation/antennas/6pack/response
    mystation/antennas/6pack/status
    mystation/antennas/6pack/error

Message Protocol (Protocol Buffers)

Protocol Buffers is a programming language neutral, platform-neutral, extensible mechanizm for serializing structured data.

Protocol Buffers generates a low-bandwidth optimized binary representation of the serialized data. Due to the nature of it’s binary format, different versions of the same message are still compatible with each other. In other words: There is no need for message versioning. This guarantees maximum compatibility amongst the different services.

The content of a Protocol Buffers Protocol Buffers message is defined in easy understandable Interface Definition Language (IDL). The following example shows the antenna switch’s Request message in the Protocol Buffers’s IDL:

message Request {
    repeated Antenna antennas = 1;
}

message Antenna {
    int32 id = 1;
    name string = 2;
}

All Shackbus messages can be found in the Shackbus ICD repository at Github.com.

Protocol Buffers comes with a handy code generator which will create the convenience methods and data structures for the specified IDL message. Currently, the following programming languages are supported out of the box:

  • C++
  • C#
  • Go
  • Java
  • Python
  • PHP
  • Ruby
  • Objective C
  • Javascript

There are many third party plugins available for other programming languages.

For pure ANSI C code generation check out: