Skip to main content

open_wor_ack

Function open_wor_ack 

Source
pub fn open_wor_ack(
    bytes: &[u8],
    keys: &WorKeys,
    dev_addr: u32,
    wfcnt: u32,
    ack: Carrier,
    uplink: Carrier,
) -> Result<StateSync, LorawanError>
Expand description

Checks and reads a WOR ACK, TS011-1.0.1 section 6.2.

§Arguments

  • bytes - the acknowledgment the end device received.
  • keys - the device’s keys.
  • dev_addr - its address.
  • wfcnt - the 32-bit counter of the WOR frame it sent.
  • ack - the carrier the acknowledgment arrived on.
  • uplink - the carrier the WOR frame named for the uplink.

§Returns

What the relay said about itself.

§Errors

Returns LorawanError::MalformedFrame for a frame that is not seven bytes or a reserved periodicity, and LorawanError::MicMismatch when its integrity code does not verify.