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.
npm install packet-forwarder
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.
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.
``sh`
npm install --save packet-forwarder
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.
`javascript
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()
}
`
Clone repository, install dependencies and run tests npm test.
Add additional notes about how to deploy this on a live system
Respect standard` rules.
We use SemVer for versioning.
Antonio Bustos - Initial work* - antoniobusrod
This project is licensed under the MIT License - see the LICENSE file for details