ULS-DeCoNet Quick Reference Guide

Reference Guide ULSDC-PBDS041125, version 1.0.0

ULSDC-PBDS041125 · version 1.0.0 · issued November 13, 2025
The numbered PDF is the controlled copy: download it from the portal.

Protocol Stack

Application Layer    │ Objects, Blitz Messages, Device Data
Connection Layer     │ Routing, Object Access, System Commands
Interface Layer      │ Network Management, Device Discovery
Framing Layer        │ UART: ESC/COBS  |  CAN: Multi-frame
Physical Layer       │ UART 115200+    |  CAN 1Mbps

Addressing

ComponentSizeRangeDescription
Device ID (DID)6 bits0-63Local device address
Connection ID (CID)2 bits0-3Interface identifier
CNRID8 bits0-255Combined routing ID: (CID<<6)|DID

Special Addresses:

  • 0: Master device
  • 63: Broadcast / Uninitialized
  • 1-62: Regular devices

UART Framing Modes

ModeDelimiterCRCOverheadBest For
RAWNoneNone0%Custom protocols
ESC0x55 0x01/0x03CRC-16~15-25%General purpose
ESC_SIMPLE0x55 0x01/0x038-bit sum~12-20%Low-power
COBS0x00CRC-16~0.4-2%Binary data

Frame Examples

ESC Mode:

[0x55][0x01][DATA...][CRC_L][CRC_H][0x55][0x03]

COBS Mode:

[0x00][CODE][DATA...][CRC_L][CRC_H][0x00]

CAN Frame Structure

Single-Frame (≤10 bytes payload)

[CMD][DID][PAYLOAD(6 bytes)]

Multi-Frame (>10 bytes)

Frame N:   [CMD][DID][FRMCTL][PAYLOAD(5 bytes)]
Last Frame: FRMCTL = 0x80 | frame_number

Frame Control (FRMCTL):

  • Bit 7: End flag (1 = last frame)
  • Bits 6-0: Frame number (0-127)

IF Layer Commands

CodeNameDescription
0x00SYSSystem command
0x01NM_HBHeartbeat (1000ms interval)
0x02NM_GET_STATUSGet device status
0x03NM_REQUEST_IDRequest ID allocation
0x04NM_SET_IDAssign device ID
0x05NM_RESET_IDReset device ID
0x06BLITZSensor data message

Packet Structure:

[CMD][SRC_LID][PAYLOAD]

CN Layer Commands

CodeNameDescription
0x10EXPLORERNetwork discovery
0x11ACK_EXPLORERDiscovery response
0x12SYSSystem operation
0x13ACK_SYSSystem response
0x14GETOBJRead object
0x15ACK_GETOBJObject data response
0x16SETOBJWrite object
0x17ACK_SETOBJWrite acknowledgment

Packet Structure:

[CMD][SRC_DID][HOP][ROUTE...][PAYLOAD]

HOP byte:
  Bits 7-4: Current hop index
  Bits 3-0: Route size

System Sub-Commands

CodeNameDescription
0PINGDevice ping
1SETMODESet APP/LOADER mode
2ERASEErase flash memory
3WRITEWrite flash memory
4SETSIGNATURESet firmware signature
5SAVECFGSave configuration

Result Codes:

  • 0: UNDEFINED
  • 1: OK
  • 2: ERROR
  • 3: WRONGKEY

Blitz Messages

Message Types

IDNameSizeDescription
0x0010XCG1_RAW8BLegacy ±30° measurement
0x0011RAW_MEASURMENT8B±180° measurement
0x0012POS_TX_FRAME8B3D position (cm)
0x0013MRX6BMulti-receiver data
0x0014DACS8BContinuous yaw
0x0020GIMU8BGround IMU data
0x0030IMU_OVERRIDE8BOverride IMU
0x0031MAG_OVERRIDE8BOverride magnetometer

Status Bits

BitFlagDescription
0CARRIER_OKIR signal present
1SQ_OKSignal quality OK
2POS_OKPosition valid
3VEL_OKVelocity valid
4GU_IMU_OKGround IMU OK
5MRX_OKMRX received
6MRXDATA_OKMRX data valid

Data Encoding

Angles (±180°):

int16_t = (degrees / 180.0) * 32767.0
degrees = (int16_t / 32767.0) * 180.0

Position/Distance (cm):

value_cm = int16_t or uint16_t
value_m = value_cm * 0.01

Object Permissions

ValueNameReadWrite
0READONLY✓✗
1WRITEONLY✗✓
2READWRITE✓✓
3PROTECTED✓✓*
4CONFIG✓✓*
5SYSCONFIG✓✓*
6ADMIN✓✓*

*Requires authorization


Network States

Device States

UNINITIALIZED (DID=63)
    ↓ Send REQUEST_ID
    ↓ Receive SET_ID
OK (DID assigned)
    ↓ Send HB every 1000ms
    ↓ Timeout 3000ms
ERROR

Common Operations

Device Discovery

1. Master sends CN_CMD_EXPLORER
2. Devices forward and respond with ACK_EXPLORER
3. Master builds topology map

Read Object

1. Send CN_CMD_GETOBJ with object ID
2. Receive CN_ACK_GETOBJ with data

Write Object

1. Send CN_CMD_SETOBJ with object ID and data
2. Receive CN_ACK_SETOBJ confirmation

Firmware Update

1. SETMODE → LOADER
2. ERASE flash region
3. WRITE firmware blocks (512 bytes each)
4. SETSIGNATURE with metadata
5. SAVECFG
6. SETMODE → APP

Timing Parameters

ParameterValueDescription
HB_INTERVAL1000 msHeartbeat send interval
DEVICE_TIMEOUT3000 msDevice disconnection timeout
REQUEST_ID_INTERVAL100 msID request interval
REQUEST_ID_RETRIES5Max ID request attempts
CAN_DEV_TIMEOUT128 framesCAN multi-frame timeout
CAN_POOL_SIZE256 slotsCAN frame buffer pool

Performance Metrics

UART @ 115200 bps

ModeThroughputLatency
RAW11.5 KB/s~0 ms
ESC9.6 KB/s~0.17 ms
COBS11.3 KB/s~0.09 ms

CAN @ 1 Mbps

MessageFramesTimeThroughput
10 bytes1108 µs92.6 KB/s
256 bytes525.6 ms45.6 KB/s

Error Handling

UART

  • CRC errors → discard frame, increment counter
  • Framing errors → resync to next delimiter
  • Buffer overflow → flush and restart

CAN

  • Missing frames → timeout and cleanup
  • Pool overflow → emergency cleanup
  • Bus-Off → automatic recovery

Code Examples

Initialize Connection (UART)

ULSSerial serial(&rxFifo, &txFifo);
serial.mode(SERIAL_MODE_COBS);
ULSBusInterface interface("UART1", static_did);
interface.open();

Initialize Connection (CAN)

ULSBusConnectionCAN can(&hfdcan1, &device, 
                        &connections, "CAN1", 
                        static_did, cid);
can.setSpeed(1000000);
can.open();

Send Blitz Message

__uls_blitz_msg_rx_raw_measurmet msg;
msg.status = calc_status();
msg.counter = counter++;
msg.aX = (angle_x / 180.0) * 32767;
msg.aY = (angle_y / 180.0) * 32767;
msg.distance = distance_m * 100;

interface->ifSendBLITZ(
    ULS_BLITZ_MSG_ID_RX_RAW_MEASURMENT,
    (uint8_t*)&msg, sizeof(msg)
);

Receive Blitz Message

interface->ifclbkBlitzReceived = &onBlitz;

void onBlitz(ULSBusInterface *iface) {
    uint16_t msg_id = iface->ifRxPacket->blitz.msg_id;
    uint8_t *data = iface->ifRxPacket->blitz.data;
    
    switch(msg_id) {
        case ULS_BLITZ_MSG_ID_RX_RAW_MEASURMENT:
            process_measurement(data);
            break;
    }
}

Read Object

uint8_t route[] = {0x05};  // DID=5
connection->cnSendGetObject(route, 1, 0x0100);

// In callback
connection->cnclbkObjReceived = &onObjReceived;

System Command

uint8_t route[] = {0x05};
uint32_t key = _ULS_OPERATION_KEY;
connection->cnSendSysSetMode(route, 1, 
                            CN_SYS_MODE_LOADER);

Troubleshooting

IssueCheckSolution
No communicationBaud rate, wiringMatch settings, check connections
CRC errorsNoise, cable qualityAdd shielding, lower baud rate
Device timeoutHB intervalCheck network connectivity
Pool overflowTraffic loadIncrease pool size, reduce rate
Missing framesBus loadReduce message rate

Key Definitions

// Operation Key
#define _ULS_OPERATION_KEY 0x24041982

// Buffer Sizes
#define IF_PACKET_SIZE 1324
#define CN_CAN_POOL_SIZE 256
#define CN_CAN_DEV_SIZE 64

// Timeouts
#define IF_NM_DVICE_HB_TIMEOUT 3000
#define IF_NM_PING_HB_TIMEOUT 1000
#define IF_NM_REQUESTID_TIMEOUT 100

Document References

  • Overview: ULS-DeCoNet_Protocol_Overview.md
  • UART: ULS-DeCoNet_UART_Protocol.md
  • CAN: ULS-DeCoNet_CAN_Protocol.md
  • Blitz: ULS-DeCoNet_Blitz_Messages.md

Copyright © 2020-2026 UAVLAS
License: LGPL-3.0+
Version: 1.0


Copyright © 2020-2026 UAVLAS <www.uavlas.com>
License: GNU Lesser General Public License v3.0+