diff --git a/README.md b/README.md index 6bdb839f..991fc0a0 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,8 @@ packet_forwarder UDP protocol versions: | LoRa Gateway Bridge | packet_forwarder protocol version | Note | |---------------------|-----------------------------------|---------------------------------------------------------------------| | 1.x.x | 1 | | -| 2.x.x | 2 | This protocol is used since version 3.0.0 of the `packet_forwarder` | - - -LoRa Gateway Bridge v1.x.x will be update with bugfixes for the near future as -not all gateways are using packet_forwarder v3.0.0+ yet. +| 2.0.x | 2 | This protocol is used since version 3.0.0 of the `packet_forwarder` | +| >= 2.1.x | 1 & 2 simultaneously | Both protocol versions are supported and auto-detected | ## Downloads diff --git a/cmd/lora-gateway-bridge/main.go b/cmd/lora-gateway-bridge/main.go index ea5c2a26..525f16c0 100644 --- a/cmd/lora-gateway-bridge/main.go +++ b/cmd/lora-gateway-bridge/main.go @@ -19,6 +19,11 @@ var version string // set by the compiler func run(c *cli.Context) error { log.SetLevel(log.Level(uint8(c.Int("log-level")))) + log.WithFields(log.Fields{ + "version": version, + "docs": "https://docs.loraserver.io/lora-gateway-bridge/", + }).Info("starting LoRa Gateway Bridge") + pubsub, err := mqttpubsub.NewBackend(c.String("mqtt-server"), c.String("mqtt-username"), c.String("mqtt-password")) if err != nil { log.Fatalf("could not setup mqtt backend: %s", err) diff --git a/docs/changelog.md b/docs/changelog.md index ced4f258..94919980 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,9 @@ # Changelog +## 2.1.0 + +* Support protocol v1 & v2 simultaneously. + ## 2.0.2 * Rename from `lora-semtech-bridge` to `lora-gateway-bridge` diff --git a/docs/getting-started.md b/docs/getting-started.md index a0fea415..556d92bf 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -51,10 +51,6 @@ to set your gateway up and create a pull-request! ## Installing the LoRa Gateway Brige -!!! warning "Compatibility" - Please check the [Compatibility](index.md#compatibility) to make sure you - download the correct LoRa Gateway Bridge version. - ### Download Download and unpack a pre-compiled binary from the @@ -105,18 +101,21 @@ After changing the LoRa gateway configuration (and restarting the packet_forwarder!), you should see received packets in the logs. Example: ``` -INFO[0000] backend/mqttpubsub: connecting to mqtt broker server=tcp://127.0.0.1:1883 +INFO[0000] starting LoRa Gateway Bridge docs=https://docs.loraserver.io/lora-gateway-bridge/ version=2.1.0 +INFO[0000] backend: connecting to mqtt broker server=tcp://127.0.0.1:1883 INFO[0000] gateway: starting gateway udp listener addr=0.0.0.0:1700 -INFO[0000] backend/mqttpubsub: connected to mqtt broker -INFO[0006] gateway: received udp packet from gateway addr=192.168.1.8:45082 type=PullData -INFO[0006] backend/mqttpubsub: subscribing to topic topic=gateway/1dee08d0b691d149/tx -INFO[0006] gateway: sending udp packet to gateway addr=192.168.1.8:45082 type=PullACK -INFO[0016] gateway: received udp packet from gateway addr=192.168.1.8:45082 type=PullData -INFO[0016] gateway: sending udp packet to gateway addr=192.168.1.8:45082 type=PullACK -INFO[0021] gateway: received udp packet from gateway addr=192.168.1.8:45738 type=PushData -INFO[0021] gateway: stat packet received addr=192.168.1.8:45738 mac=1dee08d0b691d149 -INFO[0021] gateway: sending udp packet to gateway addr=192.168.1.8:45738 type=PushACK -INFO[0021] backend/mqttpubsub: publishing packet topic=gateway/1dee08d0b691d149/stats +INFO[0000] backend: connected to mqtt broker +INFO[0001] gateway: received udp packet from gateway addr=192.168.1.10:51013 protocol_version=2 type=PullData +INFO[0001] backend: subscribing to topic topic=gateway/1dee08d0b691d149/tx +INFO[0001] gateway: sending udp packet to gateway addr=192.168.1.10:51013 protocol_version=2 type=PullACK +INFO[0007] gateway: received udp packet from gateway addr=192.168.1.10:42125 protocol_version=2 type=PushData +INFO[0007] gateway: stat packet received addr=192.168.1.10:42125 mac=1dee08d0b691d149 +INFO[0007] backend: publishing packet topic=gateway/1dee08d0b691d149/stats +INFO[0007] gateway: sending udp packet to gateway addr=192.168.1.10:42125 protocol_version=2 type=PushACK +INFO[0011] gateway: received udp packet from gateway addr=192.168.1.10:51013 protocol_version=2 type=PullData +INFO[0011] gateway: sending udp packet to gateway addr=192.168.1.10:51013 protocol_version=2 type=PullACK +INFO[0021] gateway: received udp packet from gateway addr=192.168.1.10:51013 protocol_version=2 type=PullData +INFO[0021] gateway: sending udp packet to gateway addr=192.168.1.10:51013 protocol_version=2 type=PullACK ``` For an explanation of the different types of data you can receive from and diff --git a/docs/index.md b/docs/index.md index e3ab2381..da9dbfa3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,11 +14,8 @@ packet_forwarder UDP protocol versions: | LoRa Gateway Bridge | packet_forwarder protocol version | Note | |---------------------|-----------------------------------|---------------------------------------------------------------------| | 1.x.x | 1 | | -| 2.x.x | 2 | This protocol is used since version 3.0.0 of the `packet_forwarder` | - - -LoRa Gateway Bridge v1.x.x will be update with bugfixes for the near future as -not all gateways are using packet_forwarder v3.0.0+ yet. +| 2.0.x | 2 | This protocol is used since version 3.0.0 of the `packet_forwarder` | +| >= 2.1.x | 1 & 2 simultaneously | Both protocol versions are supported and auto-detected | ## Downloads diff --git a/mkdocs.yml b/mkdocs.yml index f48f6987..6b3262e0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -14,7 +14,7 @@ pages: - Kerlink IoT Station: gateways/kerlink-iot-station.md extra: - version: '2.0.2' + version: '2.1.0' github: download_release: true