LoRaWAN packet generator is a command line tool for generation of UDP packets that can be sent from the PC host to the LoRa Network Server. It simulates LoRaWAN gateway and sends the UDP packages defined by the "Gateway to Server Interface Protocol" defined in Semtech document ANNWS.01.2.1.W.SYS. Protocol is also described here.
Basically, lora-pktgen
acts as a LoRa node + LoRa GW, i.e. it generates a package from a user-defined payload and adds service information in JSON that are injected by Packet Forwarder during the packet traversing through GW. This way LoRa Network Server get a properly shaped UDP packet, like the one that would come from a real HW.
lora-pktgen
is used to test the LoRa Network Server deployments and integrations in the absence of expensive HW (gateways and nodes) and tedious HW network set-up.
If not set already, please set your GOPATH
and GOBIN
environment variables. For example:
mkdir -p ~/go
export GOPATH=~/go
export GOBIN=$GOPATH/bin
# It's often useful to add $GOBIN to $PATH
export PATH=$PATH:$GOBIN
Use go
tool to "get" (i.e. fetch and build) lora-pktgen
package:
go get github.com/mainflux/lora-pktgen
This will download the code to $GOPATH/src/github.com/mainflux/lora-pktgen
directory,
and then compile it and install the binary in $GOBIN
directory.
Now you can run the program with:
lora-pktgen
if $GOBIN
is in $PATH
(otherwise use $GOBIN/lora-pktgen
)
Development documentation can be found here.
mainflux Google group.
This tool is crafted by @drasko and @manuIO for the benefit of mankind.