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.
Header โ
| Field | Name | Description | Type |
|---|---|---|---|
| 5 | Method | Request a service to be perform an action Possible values:
| uint8 |
| 7 | Duration | To 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 |
| 8 | Timeout | When 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 |
Payload โ
| Field | Name | Description | Type | Unit |
|---|---|---|---|---|
| 1 | V4 Message Type | Possible values:
| uint8 | |
| 2 | Payload | bytes | ||
| 40 | State | Possible values:
| uint8 | |
| 41 | Event | Possible values:
| uint8 | |
| 42 | Status Flags | Bitfield (listening, busy, queuedRx, subscriptionActive). | uint32 | |
| 43 | Active Config Slot | uint8 | ||
| 44 | Pending RX Window Count | uint8 | ||
| 45 | Next RX Window ID | Window ID for the earliest queued finite RX window. Set to 0 when no finite RX window is queued. | uint16 | |
| 46 | Next RX Config Slot | Config slot for the earliest queued finite RX window. Only meaningful when pendingRxWindowCount is greater than 0. | uint8 | |
| 50 | RX Duration | RX window duration. On SUBSCRIBE, explicit value 0 means infinite RX (only valid when explicitly supplied on this field). | uint32 | ms |
| 51 | RX Start Time | Absolute module-local Timer::millis() target time for RX start. | uint32 | ms |
| 52 | Event Time | Module-local Timer::millis() at TX/RX/timeout event time. | uint32 | ms |
| 53 | RX Window ID | uint16 | ||
| 54 | Config Slot | uint8 |
Code โ
For convenience, the following constants can be used to reference this message type.