pamoja for TypeScript - v0.1.17
    Preparing search index...

    An activated LoRaWAN session: a device address and its two session keys.

    Index
    • get devAddr(): number

      The device address this session is bound to.

      Returns number

    • Verifies a received frame, then decrypts it.

      Parameters

      • bytes: Uint8Array

        The frame exactly as it came off the radio.

      • fcnt: number

        The full 32-bit counter expected for this frame; its low 16 bits must match the counter the frame carries.

      Returns lorawan.RxData

      The decoded frame.

      If the MIC does not verify, the counter does not match, or the frame is not a data frame.

    • Encodes a downlink, encrypting the payload and appending the MIC.

      Parameters

      • fcnt: number

        The frame counter for this downlink.

      • fport: number

        The port; 0 for MAC commands, otherwise an application port.

      • payload: Uint8Array

        The application payload to carry.

      • Optionaloptions: lorawan.Options

        The header flags and frame options to set.

      Returns Buffer

      The frame to transmit.

      If the payload and options do not fit a single frame.

    • Encodes an uplink, encrypting the payload and appending the MIC.

      Parameters

      • fcnt: number

        The frame counter for this uplink.

      • fport: number

        The port; 0 for MAC commands, otherwise an application port.

      • payload: Uint8Array

        The application payload to carry.

      • Optionaloptions: lorawan.Options

        The header flags and frame options to set.

      Returns Buffer

      The frame to transmit.

      If the payload and options do not fit a single frame.