| Internet-Draft | SOLEC | March 2026 |
| bt | Expires 30 September 2026 | [Page] |
This document describes working principles, features and network protocol of SOLEC system.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 30 September 2026.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document.¶
SOLEC is currently under development for PWR group project and as part of my engineering thesis.¶
System of Lightweight Electronic Communication or SOLEC is a system for decentralised communication designed for low-speed networks. It uses binary protocol to keep required bandwidth as low as possible.¶
Current implementation works on top of TCP/IP stack. In future, SOLEC will be adapted to work over LoRa.¶
Recurring problem with modern day instant messaging is its centralization. SOLEC solves is it in similair fashion to XMPP or SMTP. SOLEC servers exchange messages between each other so the users using server A can reach out users using server B.¶
User can exchange messages with other users of the network if they are both in their contacts group. Messages from untrusted users are not forwarded by the server. If users are using different servers chat history is stored on both.¶
In current version session is provided by TCP connection. Security of client-server connection can be achieved using TLS.¶
SOLEC is using Type Length Value (TLV) structure for data exchange.¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | Payload ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+¶
Figure: SOLEC PDU Layout¶
Type (8): Payload type is indicated by 1 octed which gives 256 types that can be represented.¶
Length (16): Payload length is 2 octets. It indicates lenght of the payload field. The length does not include type and length fields.¶
Payload (variable): Payload stores set of fields determined by its type.¶
Payload usually consist of one or more data fields but it is possible for payload to be empty. Some payload types are used only to signal some event and does not carry any data.¶
Data typres are basic types that are used in construction of more comples payload types.¶
Numeric types are Big-Endian. Numeric types names are taken from Go language spec. Following types are in use:¶
Uint64 containing Unix timestamp in UTC timezone.¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Timestamp | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+¶
String is prefixed with two octets indicating number of bytes that it occupies. Text is encoded using UTF-8.¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length | UTF-8 string ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+¶
Figure: String Layout¶
Payload type attributes describes following characteristics:¶
| Type | Name | Attributes |
|---|---|---|
| 0x00 | R | |
| 0x01 | Success | SCE |
| 0x02 | Error | S |
| 0x03 | Handshake | SC |
| 0x04 | Auth | C |
| 0x05 | Message | SC |
| 0xFF | Test | R |
0 0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ | Error Type | +-+-+-+-+-+-+-+-+¶
| Type | Description |
|---|---|
| 0x01 | Auth failed. Invalid username or password. |
0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ver_major | ver_minor | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+¶
0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | username (string) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | password (string) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | source_address (string) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | target_address (string) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | timestamp | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | message_content (string) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+¶
Test payload is used for encoder and decoders testing. Clients and servers should ignore this kind of payload.¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | num1 (uint8) | time1 (timestamp) | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| | | str1 (string) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | num2 (uint16) | str2 (string) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | num3 (uint32) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | str3 (string) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | num4 (uint64) | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+¶
Some perations require multiple rounds of communication. In this case payloads are send in a sequence. Payload that is not part of this specific operation (for example incomming message) cannot interrupt this process.¶