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

    Class LorawanSession

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

    Index
    • Creates a session from a device address and its two 16-byte session keys.

      nwkSKey authenticates frames and appSKey encrypts payloads.

      Parameters

      • devAddr: number
      • nwkSkey: Buffer
      • appSkey: Buffer

      Returns LorawanSession

    • get devAddr(): number

      The device address this session is bound to.

      Returns number

    • Verifies a received frame, then decrypts it.

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

      Parameters

      • bytes: Buffer
      • fcnt: number

      Returns LorawanRxData

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

      Parameters

      • fcnt: number
      • fport: number
      • payload: Buffer
      • Optionaloptions: LorawanOptions | null

      Returns Buffer

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

      Parameters

      • fcnt: number
      • fport: number
      • payload: Buffer
      • Optionaloptions: LorawanOptions | null

      Returns Buffer