We offer a free MQTT broker that uses message signing and blockchain for authentication. It is designed for prototyping and testing. It is not to be used for production and we cannot promise 100% uptime. Data is not encrypted.
MQTT is a very lightweight IoT protocol that uses a publish/subscribe model. It is designed for low bandwidth networks and well suited for machine-to-machine communication. MQTT runs on TCP/IP. If you are new to MQTT please check out this resource.
Traditionally a client would register a username and password with the broker. Our service is unique in that access is authenticated using blockchain. We are developing this authentication scheme as part of our own research into novel uses of blockchain and IoT. The user will sign a message using their blockchain private keys and the resulting message signature will be used as part of the MQTT client credentials. When the MQTT client sends a connect message, the broker will verify the message signature and query the blockchain to see if the client has registered.
The broker currently supports Solar Mainnet, Solar Testnet, and ARK Mainnet blockchains.
Solar.org and ARK.io are open-source blockchains operating via a Delegated Proof of Stake(DPoS) consensus. DPos is a very efficient architecture and does not suffer from the high CPU requirements and cost associated with proof of work blockchains.
Connection Settings
There are currently two variations of the authentication that are appropriate for different use cases. Each connection method uses a unique port.
Guides for signing messages using blockchain wallets:
Connection Method #1
Host: mqttauth.littleyus.com
Port: 1883
Use the steps below to generate the 3 parameters to connect to the broker.: Username, password, and clientID.
- Create wallet on one of the following blockchains.
- Solar Mainnet
- Solar Testnet
- ARK Mainnet
- Register by voting for delegate friendsoflittleyus.
- Broker will verify this registration when MQTT client requests connection.
- There is no minimum balance required in your wallet except for the minimum fee amount needed for voting.
- MQTT Username = your wallet’s public key
- MQTT ClientID = first four digits of your wallet address | additional characters
- ClientID is also the message that you will sign using the wallet’s sign function
- MQTT Password = Message Signature
MQTT Topic Access Control
The broker derives your wallet’s address from the received public key and address prefix sent during connection. Your client is then given publish/subscribe privileges to the base topic equal to your address. You will not be able to publish or subscribe to other wallet’s base topic.
A special topic called group is available that all users can publish and subscribe to.
Connection Method #2
Host: mqttauth.littleyus.com
Port: 1884
Use the steps below to generate the 2 parameters to connect to the broker.: Username and password.
- Create wallet on the following blockchain. Currently only Solar Testnet is available
- Solar Testnet
- Register by voting for delegate friendsoflittleyus.
- Broker will verify this registration when MQTT client requests connection.
- There is no minimum balance required in your wallet except for the minimum fee amount needed for voting.
- MQTT Username = your wallet’s public key
- MQTT ClientID = not used as part of the authentication algorithm. Standard practice is to make this a random/unique value.
- MQTT Password = 8 character Message | Message Signature
- Create the signature by signing the 8 character message. Signature is then appended to the message.
MQTT Topic Access Control
The broker derives your wallet’s address on the Solar Testnet from the received public key sent during connection. Your client is then given publish/subscribe privileges to the base topic equal to your address. You will not be able to publish or subscribe to other wallet’s base topic.
A special topic called group is available that all users can publish and subscribe to.
Realtime Blockchain Events Topics
We provide realtime blockchain event topics for Solar Mainnet and Solar Testnet networks.
4 type of blockchain events are emitted.
- block_appplied : sent when a new block is processed
- transaction_applied : sent when a new transaction is processed
- round_applied : sent when a new round has started
- round_missed : sent when a delegate has missed a block
You can subscribe to these read only topics: solar_testnet/events and solar_mainnet/events to receive all of the events on the same topic.
Alternatively each event type is sent in it’s own sub topic of the solar_testnet/events or solar_mainnet/events base topic.
These events are generated by running a special plugin installed on a light blockchain node called a relay.