Skip to content

1004: LoRa โ€‹

๐Ÿงช Alpha

LoRa API is being modernized. payload field 2 is preserved for alpha compatibility.

LoRa action/status/event API. NONE and SET with payload transmit raw LoRa bytes. GET returns LoRa runtime status (not radio configuration). SUBSCRIBE controls LoRa event streaming and receive window behavior. UNSUBSCRIBE cancels receiver-owned queued/infinite receive windows and restores low-power idle when appropriate. Alpha migration notes: - Alterations made in FW 2578+ - LoRa config moved to MT_LoraConfig (1005). - MT_Lora SET now transmits when payload is present. - MT_Lora GET now returns status, not config. - Old alpha config field numbers on MT_Lora are no longer valid. - payload field key 2 is preserved.

FieldNameDescriptionType
5MethodRequest a service to be perform an action
Possible values:
  • 1: SETโ€” Set one or more values that are provided in the message payload.
  • 2: GETโ€” Get values for the associated message type.
  • 3: SUBSCRIBEโ€” Subscribe to values for the associated message type. Can be used in conjunction with other header fields to define the subscription parameters, such as Interval, Duration, Timeout, Storage Level and Message Level. If no interval is provided, messages will be sent as and when new data is available. Some data, such as GPS position, may require a set interval to be provided.
  • 5: UNSUBSCRIBEโ€” Unsubscribe from a previous subscription.
uint8
7DurationTo be used with the SUBSCRIBE method, or actions that can be timed.

When used with a timed action:
This defines how long the action should go on for.

When used with the SUBSCRIBE method:
This defines a duration to keep the subscription active for.
A value of 0 means the subscription is indefinite until explicitly unsubscribed.
An ACK with EXPIRED status code will be sent if the subscription duration elapses without being renewed with a new subscription request.
uint32
8TimeoutWhen requesting data or services that can take time to acquire (such as a GPS fix), this defines how long to try for before abandoning the action.
An ACK with ABANDONED status code will be sent in this case.
For actions that support it, timeout instead defines how long to wait before performing the action.

When used with a SUBSCRIBE method, with a Message Level header field:
This defines the time to wait for a message of the given level, before cancelling the subscription.
Example: GPS subscribe with Message Level 'Valid' and Timeout 60000ms
uint32
This is an extract of header fields that are relevant to this message type, you can find them all documented in the Headers section.

Payload โ€‹

FieldNameDescriptionTypeUnit
1V4 Message TypePossible values:
  • 0: Reserved
  • 1: ACK
  • 2: Announce
  • 10: Position Update Basic
  • 11: Config Update Basic
  • 12: LORA Config Basic
  • 13: Tracker Status
  • 20: Position Update Encrypted
uint8
2Payloadbytes
40StatePossible values:
  • 0: Sleep
  • 1: Receiving
  • 2: Transmitting
  • 3: Unknown
uint8
41EventPossible values:
  • 0: None
  • 1: RX Done
  • 2: RX Timeout
  • 3: TX Done
  • 4: TX Timeout
uint8
42Status FlagsBitfield (listening, busy, queuedRx, subscriptionActive).uint32
43Active Config Slotuint8
44Pending RX Window Countuint8
45Next RX Window IDWindow ID for the earliest queued finite RX window.
Set to 0 when no finite RX window is queued.
uint16
46Next RX Config SlotConfig slot for the earliest queued finite RX window.
Only meaningful when pendingRxWindowCount is greater than 0.
uint8
50RX DurationRX window duration.
On SUBSCRIBE, explicit value 0 means infinite RX (only valid when explicitly supplied on this field).
uint32ms
51RX Start TimeAbsolute module-local Timer::millis() target time for RX start.uint32ms
52Event TimeModule-local Timer::millis() at TX/RX/timeout event time.uint32ms
53RX Window IDuint16
54Config Slotuint8

Code โ€‹

For convenience, the following constants can be used to reference this message type.