1.0.9 • Published 7 months ago

packet-forwarder v1.0.9

Weekly downloads
17
License
MIT
Repository
github
Last release
7 months ago

Packet Forwarder (Node.js)

Build Statusnpm version

Virtual LoRa packet forwarder that forwards RF packets from API to a server through a IP/UDP link, and emits RF packets that are sent by the server. To be used for Node.js applications.

Getting Started

In LoRaWAN, you need real gateways and real devices for your real test case. However, it is simpler to using a simulated gateway and simulated devices in order to choose the best LoRaWAN Network Server that fulfills your real requirements.

Installation

npm install --save packet-forwarder

Usage

Send an uplink to remote Network Server using Packet Forwarder protocol. Fake gateway EUI, fake network server and fake message content have been used in the next usage example.

const PacketForwarder = require('packet-forwarder')

async function sendFakeUplink() {
  const gateway = 'DABBCCFFFF2A79CB'
  const target = 'network-server.foo-company.local'
  const port = 1234
  const packetForwarder = new PacketForwarder({ gateway, target, port })
  const message = {
    rxpk: [{
      time: '2018-05-01T12:00:00Z',
      tmms: null,
      tmst: 1525168800,
      freq: 868300000,
      chan: null,
      rfch: 0,
      stat: 0,
      modu: 'LORA',
      datr: 'SF8BW125',
      codr: '4/5',
      rssi: -97,
      lsnr: 12,
      size: 16,
      data: 'aGZkKQAAAAIAAAAAAAAAAA==',
    }]
  }
  await packetForwarder.sendUplink(message)
  await packetForwarder.close()
}

Testing

Clone repository, install dependencies and run tests npm test.

Deployment

Add additional notes about how to deploy this on a live system

Contributing

Respect standard rules.

Versioning

We use SemVer for versioning.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

1.0.9

7 months ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago