https://github.com/lobaro/lora-packet-forwarder-client
Go Client application for the LoRa Net Packet-Forwarder
https://github.com/lobaro/lora-packet-forwarder-client
Last synced: 6 months ago
JSON representation
Go Client application for the LoRa Net Packet-Forwarder
- Host: GitHub
- URL: https://github.com/lobaro/lora-packet-forwarder-client
- Owner: lobaro
- License: mit
- Created: 2016-12-05T11:04:35.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-12T23:23:43.000Z (over 8 years ago)
- Last Synced: 2025-03-27T19:21:33.728Z (6 months ago)
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 11
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LoRa Packet Forwarder Client
Enables communication with the [LoRa Packet Forarder](https://github.com/Lora-net/packet_forwarder) from Semtech.
The code is based on the [LoRa Gateway Bridge](https://github.com/brocaar/lora-gateway-bridge) which is also used in the [TTN Packet Forwarder Bridge](https://github.com/TheThingsNetwork/packet-forwarder-bridge) but targets a more generic aproach to talk to the Gateway, e.g. you can receive packets with wrong CRC and there is no dependencie to LoRaWAN specifics like `lorawan.EUI64`.
# Usage
Make sure you have a [LoRa Packet Forarder](https://github.com/Lora-net/packet_forwarder) configured
to communicate with the client endpoint. You can find example configs and code in `/examples`:
[usage.go](https://github.com/Lobaro/lora-packet-forwarder-client/blob/master/examples/usage.go) and
[local_conf.json](https://github.com/Lobaro/lora-packet-forwarder-client/blob/master/examples/local_conf.json)```
func main() {
client, err := gateway.NewClient(
":1680",
func(gwMac gateway.Mac) error {
return nil
},
func(gwMac gateway.Mac) error {
return nil
},
)if err != nil {
panic(err)
}defer client.Close()
log.Info("Waiting for gateway packet ...")
msg := <-client.RXPacketChan()
log.Infof("Received packet from Gateway with phy payload %v", msg.PHYPayload)log.Info("Exit")
}
```## License
LoRa Gateway Bridge is distributed under the MIT license. See
[LICENSE](https://github.com/Lobaro/lora-packet-forwarder-client/blob/master/LICENSE).