Skip to content
markqvist edited this page Jun 2, 2024 · 7 revisions

This page is under heavy construction. -- Even official fields are considered experimental

Official

(1) Embedded LXMs

Constant Index Description Content
FIELD_EMBEDDED_LXMS 0x01

Not yet fully implemented, and spec is likely to change

(2) Telemetry

Constant Index Description Content
FIELD_TELEMETRY 0x02 Node telemetry, all enabled sensors

See the Sideband application source code for telemetry format info

(3) Telemetry Stream

Constant Index Description Content
FIELD_TELEMETRY_STREAM 0x03 Aggregated downstream telemetry for bulk transfer

See the Sideband application source code for telemetry format info

(4) Appearance

Constant Index Description Content
LXMF.FIELD_ICON_APPEARANCE 0x04 Defines the icon that represents this node on the situation map. [string ICON, byte[3] FG_COLOR, byte[3] BG_COLOR]

Icon is a string with the name of a Material Symbol. Searchable list

FG/BG Color is an RGB color code from 000000 to FFFFFF.

Example code
# Displays a yellow hiker on a blue background
lxm_fields = { LXMF.FIELD_ICON_APPEARANCE: ["hiking",\xff\xff\x00,\x00\x00\xff] }
lxm = LXMF.LXMessage(dest, source, message_content, desired_method=LXMF.LXMessage.DIRECT, fields=lxm_fields)

(5) File Attachment

Constant Index Description Content
FIELD_FILE_ATTACHMENTS 0x05 List of file attachments
Example code
# Attach a file
file_name = "some_file.pdf"
with open(file_name, "rb") as att_file:
  file_attachment_1 = [file_name, att_file.read()]
  lxm_fields = { LXMF.FIELD_FILE_ATTACHMENTS: [file_attachment_1] }
  lxm = LXMF.LXMessage(dest, source, message_content, desired_method=LXMF.LXMessage.DIRECT, fields=lxm_fields)

(6) Image Attachment

Constant Index Description Content
FIELD_IMAGE 0x06 Image container
# Include an image
image = ["webp", image_data]
lxm_fields = { LXMF.FIELD_IMAGE: image }
lxm = LXMF.LXMessage(dest, source, message_content, desired_method=LXMF.LXMessage.DIRECT, fields=lxm_fields)

image = ["webp", buf.getvalue()]

(7) Audio Attachment

Constant Index Description Content
FIELD_AUDIO 0x07 Audio container See below

Usage from RVoice CODEC2 system. Experimental:

Key Content
CODEC Codec in use (ex: Codec2)
MODE Mode (ex: 1200)
BYTES Data as packed bytes

(8) Thread

Constant Index Description Content
FIELD_THREAD 0x08

Not yet fully implemented, and spec is likely to change

(9) Commands

Constant Index Description Content
FIELD_COMMANDS 0x09 Direct commands

Custom commands are sent in this field. Built in commands include: Ping Echo Signal

(A) Results

Constant Index Description Content
FIELD_RESULTS 0x0A

(B) Group

Constant Index Description Content
FIELD_GROUP 0x0B

Not yet fully implemented, and spec is likely to change

Clone this wiki locally