|
| 1 | +[general] |
| 2 | +# debug=5, info=4, warning=3, error=2, fatal=1, panic=0 |
| 3 | +log_level = 4 |
| 4 | + |
| 5 | + |
| 6 | +# Gateway backend configuration. |
| 7 | +[backend] |
| 8 | + |
| 9 | +# Backend type. |
| 10 | +# |
| 11 | +# Valid options are: |
| 12 | +# * semtech_udp |
| 13 | +# * basic_station |
| 14 | +type="semtech_udp" |
| 15 | + |
| 16 | + |
| 17 | + # Semtech UDP packet-forwarder backend. |
| 18 | + [backend.semtech_udp] |
| 19 | + |
| 20 | + # ip:port to bind the UDP listener to |
| 21 | + # |
| 22 | + # Example: 0.0.0.0:1700 to listen on port 1700 for all network interfaces. |
| 23 | + # This is the listeren to which the packet-forwarder forwards its data |
| 24 | + # so make sure the 'serv_port_up' and 'serv_port_down' from your |
| 25 | + # packet-forwarder matches this port. |
| 26 | + udp_bind = "0.0.0.0:1700" |
| 27 | + |
| 28 | + # Skip the CRC status-check of received packets |
| 29 | + # |
| 30 | + # This is only has effect when the packet-forwarder is configured to forward |
| 31 | + # LoRa frames with CRC errors. |
| 32 | + skip_crc_check = false |
| 33 | + |
| 34 | + # Fake RX timestamp. |
| 35 | + # |
| 36 | + # Fake the RX time when the gateway does not have GPS, in which case |
| 37 | + # the time would otherwise be unset. |
| 38 | + fake_rx_time=false |
| 39 | + |
| 40 | + # Managed packet-forwarder configuration. |
| 41 | + # |
| 42 | + # By configuring one or multiple managed packet-forwarder sections, the |
| 43 | + # LoRa Gateway Bridge updates the configuration when the backend receives |
| 44 | + # a configuration change, after which it will restart the packet-forwarder. |
| 45 | + # |
| 46 | + # Example (this configuration can be repeated): |
| 47 | + # |
| 48 | + # [[backend.semtech_udp.configuration]] |
| 49 | + # # Gateway ID. |
| 50 | + # # |
| 51 | + # # The LoRa Gateway Bridge will only apply the configuration updates for this |
| 52 | + # # gateway ID. |
| 53 | + # gateway_id="0102030405060708" |
| 54 | + |
| 55 | + # # Base configuration file. |
| 56 | + # # |
| 57 | + # # This file will be used as base-configuration and will not be overwritten on |
| 58 | + # # a configuration update. This file needs to exist and contains the base |
| 59 | + # # configuration and vendor specific |
| 60 | + # base_file="/etc/lora-packet-forwarder/global_conf.json" |
| 61 | + |
| 62 | + # # Output configuration file. |
| 63 | + # # |
| 64 | + # # This will be the final configuration for the packet-forwarder, containing |
| 65 | + # # a merged version of the base configuration + the requested configuration |
| 66 | + # # update. |
| 67 | + # # Warning: this file will be overwritten on a configuration update! |
| 68 | + # output_file="/etc/lora-packet-forwarder/local_conf.json" |
| 69 | + |
| 70 | + # # Restart command. |
| 71 | + # # |
| 72 | + # # This command is issued by the LoRa Gateway Bridge on a configuration |
| 73 | + # # change. Make sure the LoRa Gateway Bridge process has sufficient |
| 74 | + # # permissions to execute this command. |
| 75 | + # restart_command="/etc/init.d/lora-packet-forwarder restart" |
| 76 | + |
| 77 | + |
| 78 | + # Basic Station backend. |
| 79 | + [backend.basic_station] |
| 80 | + |
| 81 | + # ip:port to bind the Websocket listener to. |
| 82 | + bind=":3001" |
| 83 | + |
| 84 | + # TLS certificate and key files. |
| 85 | + # |
| 86 | + # When set, the websocket listener will use TLS to secure the connections |
| 87 | + # between the gateways and LoRa Gateway Bridge (optional). |
| 88 | + tls_cert="" |
| 89 | + tls_key="" |
| 90 | + |
| 91 | + # TLS CA certificate. |
| 92 | + # |
| 93 | + # When configured, LoRa Gateway Bridge will validate that the client |
| 94 | + # certificate of the gateway has been signed by this CA certificate. |
| 95 | + ca_cert="" |
| 96 | + |
| 97 | + # Ping interval. |
| 98 | + ping_interval="1m0s" |
| 99 | + |
| 100 | + # Read timeout. |
| 101 | + # |
| 102 | + # This interval must be greater than the configured ping interval. |
| 103 | + read_timeout="1m5s" |
| 104 | + |
| 105 | + # Write timeout. |
| 106 | + write_timeout="1s" |
| 107 | + |
| 108 | + # Region. |
| 109 | + # |
| 110 | + # Please refer to the LoRaWAN Regional Parameters specification |
| 111 | + # for the complete list of common region names. |
| 112 | + region="EU868" |
| 113 | + |
| 114 | + # Minimal frequency (Hz). |
| 115 | + frequency_min=863000000 |
| 116 | + |
| 117 | + # Maximum frequency (Hz). |
| 118 | + frequency_max=870000000 |
| 119 | + |
| 120 | + # Filters. |
| 121 | + [backend.basic_station.filters] |
| 122 | + |
| 123 | + # NetIDs to filter on when receiving uplinks. |
| 124 | + net_ids=[ |
| 125 | + "000000", |
| 126 | + ] |
| 127 | + |
| 128 | + # JoinEUIs to filter on when receiving join-requests. |
| 129 | + join_euis=[ |
| 130 | + ["0000000000000000", "ffffffffffffffff"], |
| 131 | + ] |
| 132 | + |
| 133 | + |
| 134 | +# Integration configuration. |
| 135 | +[integration] |
| 136 | +# Payload marshaler. |
| 137 | +# |
| 138 | +# This defines how the MQTT payloads are encoded. Valid options are: |
| 139 | +# * protobuf: Protobuf encoding (this will become the LoRa Gateway Bridge v3 default) |
| 140 | +# * json: JSON encoding (easier for debugging, but less compact than 'protobuf') |
| 141 | +marshaler="protobuf" |
| 142 | + |
| 143 | + # MQTT integration configuration. |
| 144 | + [integration.mqtt] |
| 145 | + # Event topic template. |
| 146 | + event_topic_template="gateway/{{ .GatewayID }}/event/{{ .EventType }}" |
| 147 | + |
| 148 | + # Command topic template. |
| 149 | + command_topic_template="gateway/{{ .GatewayID }}/command/#" |
| 150 | + |
| 151 | + |
| 152 | + # MQTT authentication. |
| 153 | + [integration.mqtt.auth] |
| 154 | + # Type defines the MQTT authentication type to use. |
| 155 | + # |
| 156 | + # Set this to the name of one of the sections below. |
| 157 | + type="generic" |
| 158 | + |
| 159 | + # Generic MQTT authentication. |
| 160 | + [integration.mqtt.auth.generic] |
| 161 | + # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) |
| 162 | + server="tcp://127.0.0.1:1883" |
| 163 | + |
| 164 | + # Connect with the given username (optional) |
| 165 | + username="" |
| 166 | + |
| 167 | + # Connect with the given password (optional) |
| 168 | + password="" |
| 169 | + |
| 170 | + # Quality of service level |
| 171 | + # |
| 172 | + # 0: at most once |
| 173 | + # 1: at least once |
| 174 | + # 2: exactly once |
| 175 | + # |
| 176 | + # Note: an increase of this value will decrease the performance. |
| 177 | + # For more information: https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels |
| 178 | + qos=0 |
| 179 | + |
| 180 | + # Clean session |
| 181 | + # |
| 182 | + # Set the "clean session" flag in the connect message when this client |
| 183 | + # connects to an MQTT broker. By setting this flag you are indicating |
| 184 | + # that no messages saved by the broker for this client should be delivered. |
| 185 | + clean_session=true |
| 186 | + |
| 187 | + # Client ID |
| 188 | + # |
| 189 | + # Set the client id to be used by this client when connecting to the MQTT |
| 190 | + # broker. A client id must be no longer than 23 characters. When left blank, |
| 191 | + # a random id will be generated. This requires clean_session=true. |
| 192 | + client_id="" |
| 193 | + |
| 194 | + # CA certificate file (optional) |
| 195 | + # |
| 196 | + # Use this when setting up a secure connection (when server uses ssl://...) |
| 197 | + # but the certificate used by the server is not trusted by any CA certificate |
| 198 | + # on the server (e.g. when self generated). |
| 199 | + ca_cert="" |
| 200 | + |
| 201 | + # mqtt TLS certificate file (optional) |
| 202 | + tls_cert="" |
| 203 | + |
| 204 | + # mqtt TLS key file (optional) |
| 205 | + tls_key="" |
| 206 | + |
| 207 | + # Maximum interval that will be waited between reconnection attempts when connection is lost. |
| 208 | + # Valid units are 'ms', 's', 'm', 'h'. Note that these values can be combined, e.g. '24h30m15s'. |
| 209 | + max_reconnect_interval="10m0s" |
| 210 | + |
| 211 | + |
| 212 | + # Google Cloud Platform Cloud IoT Core authentication. |
| 213 | + # |
| 214 | + # Please note that when using this authentication type, the MQTT topics |
| 215 | + # will be automatically set to match the MQTT topics as expected by |
| 216 | + # Cloud IoT Core. |
| 217 | + [integration.mqtt.auth.gcp_cloud_iot_core] |
| 218 | + # MQTT server. |
| 219 | + server="ssl://mqtt.googleapis.com:8883" |
| 220 | + |
| 221 | + # Google Cloud IoT Core Device id. |
| 222 | + device_id="" |
| 223 | + |
| 224 | + # Google Cloud project id. |
| 225 | + project_id="" |
| 226 | + |
| 227 | + # Google Cloud region. |
| 228 | + cloud_region="" |
| 229 | + |
| 230 | + # Google Cloud IoT registry id. |
| 231 | + registry_id="" |
| 232 | + |
| 233 | + # JWT token expiration time. |
| 234 | + jwt_expiration="24h0m0s" |
| 235 | + |
| 236 | + # JWT token key-file. |
| 237 | + # |
| 238 | + # Example command to generate a key-pair: |
| 239 | + # $ ssh-keygen -t rsa -b 4096 -f private-key.pem |
| 240 | + # $ openssl rsa -in private-key.pem -pubout -outform PEM -out public-key.pem |
| 241 | + # |
| 242 | + # Then point the setting below to the private-key.pem and associate the |
| 243 | + # public-key.pem with this device / gateway in Google Cloud IoT Core. |
| 244 | + jwt_key_file="" |
| 245 | + |
| 246 | + |
| 247 | + # Azure IoT Hub |
| 248 | + # |
| 249 | + # This setting will preset uplink and downlink topics that will only |
| 250 | + # work with Azure IoT Hub service. |
| 251 | + [integation.mqtt.auth.azure_iot_hub] |
| 252 | + |
| 253 | + # Device connection string. |
| 254 | + # |
| 255 | + # This connection string can be retrieved from the Azure IoT Hub device |
| 256 | + # details. |
| 257 | + device_connection_string="" |
| 258 | + |
| 259 | + # Token expiration. |
| 260 | + # |
| 261 | + # LoRa Gateway Bridge will generate a SAS token with the given expiration. |
| 262 | + # After the token has expired, it will generate a new one and trigger a |
| 263 | + # re-connect. |
| 264 | + sas_token_expiration="24h0m0s" |
| 265 | + |
| 266 | + |
| 267 | +# Metrics configuration. |
| 268 | +[metrics] |
| 269 | + |
| 270 | + # Metrics stored in Prometheus. |
| 271 | + # |
| 272 | + # These metrics expose information about the state of the LoRa Gateway Bridge |
| 273 | + # instance like number of messages processed, number of function calls, etc. |
| 274 | + [metrics.prometheus] |
| 275 | + # Expose Prometheus metrics endpoint. |
| 276 | + endpoint_enabled=false |
| 277 | + |
| 278 | + # The ip:port to bind the Prometheus metrics server to for serving the |
| 279 | + # metrics endpoint. |
| 280 | + bind="" |
| 281 | + |
| 282 | + |
| 283 | +# Gateway meta-data. |
| 284 | +# |
| 285 | +# The meta-data will be added to every stats message sent by the LoRa Gateway |
| 286 | +# Bridge. |
| 287 | +[meta_data] |
| 288 | + |
| 289 | + # Static. |
| 290 | + # |
| 291 | + # Static key (string) / value (string) meta-data. |
| 292 | + [meta_data.static] |
| 293 | + # Example: |
| 294 | + # serial_number="A1B21234" |
| 295 | + |
| 296 | + |
| 297 | + |
| 298 | + # Dynamic meta-data. |
| 299 | + # |
| 300 | + # Dynamic meta-data is retrieved by executing external commands. |
| 301 | + # This makes it possible to for example execute an external command to |
| 302 | + # read the gateway temperature. |
| 303 | + [meta_data.dynamic] |
| 304 | + |
| 305 | + # Execution interval of the commands. |
| 306 | + execution_interval="1m0s" |
| 307 | + |
| 308 | + # Max. execution duration. |
| 309 | + max_execution_duration="1s" |
| 310 | + |
| 311 | + # Commands to execute. |
| 312 | + # |
| 313 | + # The value of the stdout will be used as the key value (string). |
| 314 | + # In case the command failed, it is ignored. In case the same key is defined |
| 315 | + # both as static and dynamic, the dynamic value has priority (as long as the) |
| 316 | + # command does not fail. |
| 317 | + [meta_data.dynamic.commands] |
| 318 | + # Example: |
| 319 | + # temperature="/opt/gateway-temperature/gateway-temperature.sh" |
| 320 | + |
0 commit comments