1- # Getting started
1+ ## Strategies
2+
3+ There are multiple ways that you can deploy the LoRa Semtech Bridge:
4+
5+ ### Single instance
6+
7+ The most basic strategy is to connect all your gateways to a single instance
8+ of the LoRa Semtech Bridge.
9+
10+ ### Multiple instances
11+
12+ To make the LoRa Semtech Bridge HA, you can run a cluster of instances
13+ (connecting to the same MQTT broker).
14+ ** Important:** make sure that each gateway connection is always routed to the
15+ same instance!
16+
17+ ### On each gateway
18+
19+ Depending on the capabilities of your gateway, you can deploy the LoRa Semtech
20+ Bridge on each of your gateways. This enables you to encrypt all traffic from
21+ your gateway by connecting to the MQTT broker over SSL/TLS.
22+
23+
24+
225
326## Requirements
427
5- Before you install the LoRa Semtech Bridge, make sure you've installed the following requirements:
28+ Before you install the LoRa Semtech Bridge, make sure you've installed the
29+ following requirements:
630
7- #### MQTT server
31+ ### MQTT broker
832
9- LoRa Semtech Brige makes use of MQTT for communication with the gateways and applications.
10- [ Mosquitto] ( http://mosquitto.org/ ) is a popular open-source MQTT server.
11- Make sure you install a ** recent** version of Mosquitto (the Mosquitto project provides
12- repositories for various Linux distributions).
33+ LoRa Semtech Brige makes use of MQTT for communication with the gateways and
34+ applications. [ Mosquitto] ( http://mosquitto.org/ ) is a popular open-source MQTT
35+ server. Make sure you install a ** recent** version of Mosquitto (the Mosquitto
36+ project provides [ repositories for various Linux distributions] ( http://mosquitto.org/download/ ) ).
1337
14- ## Install LoRa Semtech Brige
38+ ### LoRa Gateway with packet_forwarder
1539
16- #### Compatibility
40+ See [ packet_forwarder] ( packet-forwarder.md ) for instructions about how to
41+ setup the packet_forwarder on your gateway.
1742
18- The table below shows the compatibility between LoRa Semtech Bridge and the
19- available Semtech UDP protocol versions:
43+ ## Install LoRa Semtech Brige
2044
21- | LoRa Semtech Bridge | Semtech UDP protocol version | Note |
22- | ---------------------| ------------------------------| ---------------------------------------------------------------------|
23- | 1.x.x | 1 | |
24- | 2.x.x | 2 | This protocol is used since version 3.0.0 of the ` packet_forwarder ` |
45+ !!! warning "Compatibility"
46+ Please check the [ Compatibility] ( index.md#compatibility ) to make sure you
47+ download the correct LoRa Semtech Bridge version.
2548
26- #### Download
49+ ### Download
2750
2851Download and unpack a pre-compiled binary from the
29- [ releases] ( https://github.com/brocaar/lora-semtech-bridge/releases ) page. Alternatively,
30- build the code from source.
52+ [ releases] ( https://github.com/brocaar/lora-semtech-bridge/releases ) page.
53+ Alternatively, build the code from source (not covered) .
3154
32- #### Configuration
55+ ### Configuration
3356
3457All configuration is done by either environment variables or command-line
3558arguments. Arguments and environment variables can be mixed.
3659
37- Run `` ./semtech-bridge --help `` for a list of available arguments.
60+ To get a list (and explanation) of all the available arguments, execute:
61+
62+ ``` bash
63+ $ ./semtech-bridge --help
64+ ```
3865
39- #### Starting LoRa Semtech Bridge
66+ ### Starting LoRa Semtech Bridge
4067
4168Assuming you have a MQTT broker running on the same host without authentication,
4269starting LoRa Semtech Bridge is as simple as:
4370
44- ``` bash
45- ./semtech-bridge
71+ ``` bash
72+ $ ./semtech-bridge \
73+ --udp-bind 0.0.0.0:1700 \ # this is the port you must use in the packet_forwarder
74+ --mqtt-server tcp://127.0.0.1:1883
4675```
4776
48- #### LoRa gateway configuration
77+ ### LoRa gateway configuration
4978
50- Now you have the LoRa Semtech Bridge running, it is time to configure the gateway.
51- Assuming you have the [ `` packet_forwarder `` ] ( https://github.com/Lora-net/packet_forwarder/ )
52- already setup, edit the file `` local_config.json `` :
79+ Now you have the LoRa Semtech Bridge running, it is time to configure the
80+ packet_forwarder on your gateway. Edit the file `` local_config.json `` :
5381
54- ``` json
82+ ``` json
5583{
56- /* Put there parameters that are different for each gateway (eg. pointing one gateway to a test server while the others stay in production) */
57- /* Settings defined in global_conf will be overwritten by those in local_conf */
5884 "gateway_conf" : {
5985 "gateway_ID" : " ..." , /* you must pick a unique 64b number for each gateway (represented by an hex string) */
6086 "server_address" : " ..." , /* the IP address on which the LoRa Semtech Bridge is running */
@@ -64,10 +90,10 @@ already setup, edit the file ``local_config.json``:
6490}
6591```
6692
67- #### Verify data is coming in
93+ ### Verify data is coming in
6894
69- After changing the LoRa gateway configuration (and restarting the ` packet_forwarder ` !),
70- you should see received packets in the logs. Example:
95+ After changing the LoRa gateway configuration (and restarting the
96+ packet_forwarder!), you should see received packets in the logs. Example:
7197
7298```
7399INFO[0000] backend/mqttpubsub: connecting to mqtt broker server=tcp://127.0.0.1:1883
@@ -84,10 +110,10 @@ INFO[0021] gateway: sending udp packet to gateway addr=192.168.1.8:45738
84110INFO[0021] backend/mqttpubsub: publishing packet topic=gateway/1dee08d0b691d149/stats
85111```
86112
87- When using a MQTT client, you should be able to see all data sent by the
88- gateways by subscribing to the topic ` gateway/# ` .
113+ For an explanation of the different types of data you can receive from and
114+ send to the LoRa Semtech Bridge see [ topics ] ( topics.md ) .
89115
90116## Setup LoRa Server
91117
92118Now you have your LoRa Semtech bridge instance up and running, it is time to
93- setup [ LoRa Server] ( https://github.com/brocaar/loraserver ) !
119+ setup [ LoRa Server] ( https://github.com/brocaar/loraserver ) .
0 commit comments