Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Sequence

Source

Message

Destination

1

Gumband Hardware

Subscribe Authenticate

Exhibit Server

2

Exhibit Server

Authenticate request

Gumband Hardware

3

Gumband Hardware

Authenticate token

Exhibit Server

4

Exhibit Server

Authenticate response true

Gumband Hardware

5

Gumband Hardware

Subscribe all peripheral topics

Exhibit Server

6

Gumband Hardware

Heartbeat (Every 16s)

Exhibit Server


...

...

Status
colourRed
titleDePrecated
- See “info” topic, “register” command

Gumband needs some way to make sure its knowledge of peripheral properties are up to date if the Gumband server or MQTT go down at any point and publication messages are missed. In these cases, a SYNC request will be made to each out of date board as soon as the server comes back up. 

  • Sync topic: <hardware_id>/sync

  • Immediately after registration every Gumband Hardware device subscribes to this sync topic so should always be ready to receive it.

  • In response to a sync topic the hardware will issue a registration and resubscribe to all topics.

  • If the cloud wants read the status of specific peripheral properties it can then poll all readable properties: <hardware_id>/{peripheral_name}/{property_name}/get

INFO Messages

Gumband Cloud Server needs a way to signal each hardware device to send simple control commands. In this case, the information is published to the device INFO topic to which each device subscribes first (before publishing its initial authentication/registration). The INFO topic is also used during the initial handshake to share the exhibit broker host details.

...

Command

Text

Description

host

xxx.xxx.xxx.xxx:xxxx

Exhibit server host IP and Port

reboot

-

Reboot the Gumband Hardware

register

-

Request the hardware to register with the Cloud Server (current functionality of the SYNC topic)

get

-

Request the hardware to publish all of it’s current property values

firmware

-

Enter Device Firmware Update (DFU) mode on Gumband Hardware using the existing Cloud MQTT socket 

firmware_socket

-

Enter Device Firmware Update (DFU) mode on Gumband Hardware using a dedicated TCP socket on port 23 (this only works if that port is not already connected)

control

true/false

Set to true to enable debug mode whereby peripheral control messages can be sent from the Cloud

identify

-

Blink the on board LED to identify this hardware device

error

(see below table)

Allows Gumband server to send error codes to the hardware

...

  • Board metrics

    • Uptime - Time in minutes since last reboot

    • Exhibit IP - The exhibit server IP currently saved on the hardware

    • Exhibit State - The state of the connection from the exhibit hardware to the exhibit server (0 = No connection, 1 = Connection, -1 = Not Set)

    • Temperature - Hardware temperature in degrees C (this is actually the Die temp for most current hardware)

    • Voltage - System supply voltage in V

  • The time of the last heartbeat should be loggedis displayed on the “Overview” page under “Last Updated”

Logs

  • Gumband debug, error and log messages are published to the Cloud Server at the topic:

    • <hardware_id>/log/debug

    • <hardware_id>/log/error

    • And should have the message body:

...

Property Data Packet

...

Dynamic Hardware ID

Status
colourYellow
titleFUTURE SPEC
- Note: This is future specification possibility and is not currently implemented.

If Hardware boots and no hardwareId exists in memory but an auth token exists, Hardware will attempt to assign itself directly to an Exhibit using this process. This can be used to mass-assign Hardware to an Exhibit.

Overview

  • Hardware listens to <mac_address>/new-hardware-id on Cloud Server

  • Hardware publishes hardwareId request to Cloud Server at topic new-hardware-id

  • Gumband uses auth token to lookup Exhibit and generate new Hardware assigned to that Exhibit

  • Gumband publishes hardwareId over Cloud Server at topic <mac_address>/new-hardware-id

  • Hardware can proceed with normal registration flow

Message Outline

  • Data flow = Hardware -> Cloud Server -> Gumband

  • Topic = new-hardware-id

Code Block
{
  "mac": "MAC_ADDRESS",
  "auth": "AUTH_TOKEN"
}
  • Data flow = Gumband -> Cloud Server -> Hardware

  • Topic = <mac_address>/new-hardware-id

Code Block
{
  "hardwareId": "HARDWARE_ID"
}