UDP packet-forwarder for the ChirpStack Concentratord.
Find a file
2025-10-14 16:55:42 +01:00
.cargo Update Rust + change arm-unknown-... to armv7-unknown-... 2023-01-16 12:07:43 +00:00
.github Update (dev) dependencies. 2025-06-16 14:23:19 +01:00
cross Update cross-rs containers to :main. 2024-08-15 11:23:24 +01:00
packaging/debian Update build to create distributables. 2024-05-10 11:21:20 +01:00
src Fix cargo clippy warnings. 2025-10-14 16:55:42 +01:00
.dockerignore Update development environment. 2023-01-11 13:56:37 +00:00
.gitignore Update test workflow. 2023-06-06 13:25:03 +01:00
Cargo.lock Tune dependency features. 2025-10-14 16:55:03 +01:00
Cargo.toml Tune dependency features. 2025-10-14 16:55:03 +01:00
Cross.toml Update build to create distributables. 2024-05-10 11:21:20 +01:00
docker-compose.yml Update test workflow. 2023-06-06 13:25:03 +01:00
Dockerfile-devel Add rust-toolchain.toml + shell.nix files. 2023-06-06 13:11:04 +01:00
LICENSE Rename to ChirpStack UDP Forwarder. 2022-08-05 14:35:01 +01:00
Makefile Update build to create distributables. 2024-05-10 11:21:20 +01:00
README.md Update README with build commands. 2024-05-10 11:31:14 +01:00
rust-toolchain.toml Update dependencies + Rust toolchain. 2025-10-14 15:30:38 +01:00
shell.nix Update (dev) dependencies. 2025-06-16 14:23:19 +01:00

ChirpStack UDP Forwarder

The ChirpStack UDP Forwarder is an UDP forwarder for the ChirpStack Concentratord and is compatible with the Semtech UDP protocol.

Configuration

Configuration example:

# UDP Forwarder configuration.
[udp_forwarder]

  # Log level.
  #
  # Valid options are:
  #   * TRACE
  #   * DEBUG
  #   * INFO
  #   * WARN
  #   * ERROR
  #   * OFF
  log_level="INFO"

  # Log to syslog.
  #
  # When set to true, log messages are being written to syslog instead of stdout.
  log_to_syslog=false

  # Prometheus metrics bind.
  #
  # E.g. '0.0.0.0:9800', leave blank to disable the metrics endpoint.
  metrics_bind="0.0.0.0:9800"


  # Servers to forward the data to using UDP.
  # This section can be repeated.
  [[udp_forwarder.servers]]
    # Server (hostname:port).
    server="localhost:1700"

    # Keepalive interval (seconds).
    #
    # In this interval, the ChirpStack UDP Forwarder will send keepalive
    # frames to the server, which must be answered by an acknowledgement.
    keepalive_interval_secs=10

    # Max. allowed keepalive failures.
    #
    # After the max. number has been reached, the ChirpStack UDP Forwarder will
    # 're-connect' to the server, meaning it will also re-resolve the DNS in case
    # the server address is a hostname.
    keepalive_max_failures=12

	# Forward CRC OK.
	forward_crc_ok=true

	# Forward CRC invalid.
	forward_crc_invalid=false

	# Forward CRC missing.
	forward_crc_missing=false


# Concentratord configuration.
[concentratord]

  # Event API URL.
  event_url="ipc:///tmp/concentratord_event"

  # Command API URL.
  command_url="ipc:///tmp/concentratord_command"

Building from source

Requirements

Building ChirpStack UDP Forwarder requires:

Nix

Nix is used for setting up the development environment which is used for local development and for creating the binaries.

If you do not have Nix installed and do not wish to install it, then you can use the provided Docker Compose based Nix environment. To start this environment execute the following command:

make docker-devshell

Note: You will be able to run the test commands and run cargo build, but cross-compiling will not work within this environment (because it would try start Docker within Docker).

Docker

Docker is used by cross-rs for cross-compiling, as well as some of the make commands.

Starting the development shell

Run the following command to start the development shell:

nix-shell

Or if you do not have Nix installed, execute the following command:

make docker-devshell

Running tests

Execute the following command to run the tests:

make test

Building binaries

Execute the following commands to build the ChirpStack UDP Forwarder binaries and packages:

# Only build binaries
make build

# Build binaries + distributable packages.
make dist

License

ChirpStack UDP Forwarder is distributed under the MIT license. See LICENSE.