I plan to use FUOTA Server to send multicast data to the device.
NS is working normally and the device can perform data uplink and downlink normally.
I deployed FUOTA Server and used DOTNET to make GRPC calls, and successfully saw the temporary multicast group on NS.
Subsequently, the data received on the device side is similar to: c8 02 00 08 d3 4d 7f f5 cb 0d 85 12 b1 88 d3 67 e4 e6 b1 fa 01 61 82 00 00 00 00 ff ff ff ff
Our embedded engineer responded to the data using fport 200 according to the protocol: 02 00
However, I did not see the relevant received log print in the FUOTA Server log, so FUOTA Server began to resend the data.
I doubt whether relevant configuration is required on the NS side, such as filling in the eventHandler address of FUOTA Server。
Here is some basic information:
NS Server
NS Config : chirpstack.toml
# Logging.
[logging]
# Log level.
#
# Options are: trace, debug, info, warn error.
level="trace"
# PostgreSQL configuration.
[postgresql]
# PostgreSQL DSN.
#
# Format example: postgres://<USERNAME>:<PASSWORD>@<HOSTNAME>/<DATABASE>?sslmode=<SSLMODE>.
#
# SSL mode options:
# * disable - no SSL
# * require - Always SSL (skip verification)
# * verify-ca - Always SSL (verify that the certificate presented by the server was signed by a trusted CA)
# * verify-full - Always SSL (verify that the certification presented by the server was signed by a trusted CA and the server host name matches the one in the certificate)
dsn="postgres://chirpstack:chirpstack@$POSTGRESQL_HOST/chirpstack?sslmode=disable"
# Max open connections.
#
# This sets the max. number of open connections that are allowed in the
# PostgreSQL connection pool.
max_open_connections=10
# Min idle connections.
#
# This sets the min. number of idle connections in the PostgreSQL connection
# pool (0 = equal to max_open_connections).
min_idle_connections=0
# Redis configuration.
[redis]
# Server address or addresses.
#
# Set multiple addresses when connecting to a cluster.
servers=[
"redis://$REDIS_HOST/",
]
# TLS enabled.
tls_enabled=false
# Redis Cluster.
#
# Set this to true when the provided URLs are pointing to a Redis Cluster
# instance.
cluster=false
# Network related configuration.
[network]
# Network identifier (NetID, 3 bytes) encoded as HEX (e.g. 010203).
net_id="000000"
# Enabled regions.
#
# Multiple regions can be enabled simultaneously. Each region must match
# the 'name' parameter of the region configuration in '[[regions]]'.
enabled_regions=[
"as923",
"as923_2",
"as923_3",
"as923_4",
"au915_0",
"cn470_10",
"cn779",
"eu433",
"eu868",
"in865",
"ism2400",
"kr920",
"ru864",
"us915_0",
"us915_1",
]
# API interface configuration.
[api]
# interface:port to bind the API interface to.
bind="0.0.0.0:8080"
# Secret.
#
# This secret is used for generating login and API tokens, make sure this
# is never exposed. Changing this secret will invalidate all login and API
# tokens. The following command can be used to generate a random secret:
# openssl rand -base64 32
secret="you-must-replace-this"
[integration]
enabled=["mqtt"]
[integration.mqtt]
server="tcp://$MQTT_BROKER_HOST:1883/"
json=true
FUOTA Server Config :
[general]
# Log level
#
# debug=5, info=4, warning=3, error=2, fatal=1, panic=0
log_level=5
# Log to syslog.
#
# When set to true, log messages are being written to syslog.
log_to_syslog=false
# gRPC default resolver scheme.
#
# Set this to "dns" for enabling dns round-robin load balancing.
grpc_default_resolver_scheme=""
# PostgreSQL settings.
#
# Please note that PostgreSQL 9.5+ is required with the 'hstore' extension
# enabled.
[postgresql]
# PostgreSQL dsn (e.g.: postgres://user:password@hostname/database?sslmode=disable).
#
# Besides using an URL (e.g. 'postgres://user:password@hostname/database?sslmode=disable')
# it is also possible to use the following format:
# 'user=chirpstack_ns dbname=chirpstack_ns sslmode=disable'.
#
# The following connection parameters are supported:
#
# * dbname - The name of the database to connect to
# * user - The user to sign in as
# * password - The user's password
# * host - The host to connect to. Values that start with / are for unix domain sockets. (default is localhost)
# * port - The port to bind to. (default is 5432)
# * sslmode - Whether or not to use SSL (default is require, this is not the default for libpq)
# * fallback_application_name - An application_name to fall back to if one isn't provided.
# * connect_timeout - Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely.
# * sslcert - Cert file location. The file must contain PEM encoded data.
# * sslkey - Key file location. The file must contain PEM encoded data.
# * sslrootcert - The location of the root certificate file. The file must contain PEM encoded data.
#
# Valid values for sslmode are:
#
# * disable - No SSL
# * require - Always SSL (skip verification)
# * verify-ca - Always SSL (verify that the certificate presented by the server was signed by a trusted CA)
# * verify-full - Always SSL (verify that the certification presented by the server was signed by a trusted CA and the server host name matches the one in the certificate)
dsn="postgres://chirpstack_fuota@192.168.2.187/chirpstack_fuota?sslmode=disable"
# Automatically apply database migrations.
#
# It is possible to apply the database-migrations by hand
# (see https://github.com/brocaar/chirpstack-fuota-server/tree/master/migrations)
# or let ChirpStack FUOTA Server migrate to the latest state automatically, by using
# this setting. Make sure that you always make a backup when upgrading ChirpStack
# FUOTA Server and / or applying migrations.
automigrate=true
# Max open connections.
#
# This sets the max. number of open connections that are allowed in the
# PostgreSQL connection pool (0 = unlimited).
max_open_connections=0
# Max idle connections.
#
# This sets the max. number of idle connections in the PostgreSQL connection
# pool (0 = no idle connections are retained).
max_idle_connections=2
# ChirpStack (integration) settings.
[chirpstack]
# Event handler integration settings.
[chirpstack.event_handler]
# Payload marshaler.
#
# This defines how the HTTP payloads are encoded. Valid options are:
# * protobuf: Protobuf encoding
# * json: JSON encoding (easier for debugging, but less compact than 'protobuf')
marshaler="protobuf"
# HTTP handler settings.
[chirpstack.event_handler.http]
# IP:Port to bind the event handler server to.
bind="0.0.0.0:8090"
# API integration settings.
[chirpstack.api]
# ChirpStack API server endpoint.
server="192.168.2.187:8081"
# API token.
token="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJjaGlycHN0YWNrIiwiaXNzIjoiY2hpcnBzdGFjayIsInN1YiI6Ijk2MWUwZjJkLTQwZGQtNDc1MC1hY2NmLWIzOWRlOTVmODVlYSIsInR5cCI6ImtleSJ9.hOHyqC7wspqbekBH3lCNuZdhrkkAo_6805yadyWZwOs"
# Endpoint uses TLS.
tls_enabled=false
# FUOTA server settings.
[fuota_server]
# FUOTA server API settings.
[fuota_server.api]
# IP:Port to bind the FUOTA server API to.
bind="0.0.0.0:8070"
# Optional TLS configuration.
ca_cert=""
tls_cert=""
tls_key=""
FUOTA Server Log:
time="2024-07-24T20:32:45+08:00" level=info msg="storage: deployment created" id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9
time="2024-07-24T20:32:45+08:00" level=info msg="storage: deployment device created" deployment_id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9 dev_eui=037980fffe079997
time="2024-07-24T20:32:45+08:00" level=debug msg="fuota: stepCreateMulticastGroup funtion called" deployment_id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9
time="2024-07-24T20:32:45+08:00" level=debug msg="[core]Subchannel Connectivity change to CONNECTING"
time="2024-07-24T20:32:45+08:00" level=debug msg="[core]Subchannel picks a new address \"192.168.2.187:8081\" to connect"
time="2024-07-24T20:32:45+08:00" level=debug msg="[core]pickfirstBalancer: UpdateSubConnState: 0x94101c0, {CONNECTING <nil>}"
time="2024-07-24T20:32:45+08:00" level=debug msg="[core]Channel Connectivity change to CONNECTING"
time="2024-07-24T20:32:45+08:00" level=debug msg="[core]Subchannel Connectivity change to READY"
time="2024-07-24T20:32:45+08:00" level=debug msg="[core]pickfirstBalancer: UpdateSubConnState: 0x94101c0, {READY <nil>}"
time="2024-07-24T20:32:45+08:00" level=debug msg="[core]Channel Connectivity change to READY"
time="2024-07-24T20:32:45+08:00" level=info msg="finished client unary call" grpc.code=OK grpc.method=Create grpc.service=api.MulticastGroupService grpc.time_ms=13.784 span.kind=client system=grpc
time="2024-07-24T20:32:45+08:00" level=info msg="fuota: multicast-group created" deployment_id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9 multicast_group_id=a06ed208-cc8d-4a81-9fdf-e3d12ee0fb3e
time="2024-07-24T20:32:45+08:00" level=info msg="fuota: add devices to multicast-group" deployment_id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9
time="2024-07-24T20:32:45+08:00" level=info msg="fuota: add device to multicast-group" deployment_id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9 dev_eui=037980fffe079997 multicast_group_id=a06ed208-cc8d-4a81-9fdf-e3d12ee0fb3e
time="2024-07-24T20:32:45+08:00" level=info msg="finished client unary call" grpc.code=OK grpc.method=AddDevice grpc.service=api.MulticastGroupService grpc.time_ms=4.163 span.kind=client system=grpc
time="2024-07-24T20:32:45+08:00" level=info msg="fuota: starting multicast-setup for devices" deployment_id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9
time="2024-07-24T20:32:45+08:00" level=info msg="fuota: initiate multicast-setup for device" attempt=1 deployment_id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9 dev_eui=037980fffe079997
time="2024-07-24T20:32:45+08:00" level=info msg="finished client unary call" grpc.code=OK grpc.method=Enqueue grpc.service=api.DeviceService grpc.time_ms=2.6 span.kind=client system=grpc
time="2024-07-24T20:32:45+08:00" level=info msg="storage: deployment log created" command=McGroupSetupReq deployment_id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9 dev_eui=037980fffe079997
time="2024-07-24T20:33:45+08:00" level=info msg="fuota: initiate multicast-setup for device" attempt=2 deployment_id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9 dev_eui=037980fffe079997
time="2024-07-24T20:33:45+08:00" level=info msg="finished client unary call" grpc.code=OK grpc.method=Enqueue grpc.service=api.DeviceService grpc.time_ms=3.395 span.kind=client system=grpc
time="2024-07-24T20:33:45+08:00" level=info msg="storage: deployment log created" command=McGroupSetupReq deployment_id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9 dev_eui=037980fffe079997
time="2024-07-24T20:34:45+08:00" level=info msg="fuota: initiate multicast-setup for device" attempt=3 deployment_id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9 dev_eui=037980fffe079997
time="2024-07-24T20:34:45+08:00" level=info msg="finished client unary call" grpc.code=OK grpc.method=Enqueue grpc.service=api.DeviceService grpc.time_ms=3.643 span.kind=client system=grpc
time="2024-07-24T20:34:45+08:00" level=info msg="storage: deployment log created" command=McGroupSetupReq deployment_id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9 dev_eui=037980fffe079997
time="2024-07-24T20:35:45+08:00" level=warning msg="fuota: multicast-setup reached max. number of attepts, some devices did not complete" deployment_id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9
time="2024-07-24T20:35:45+08:00" level=info msg="storage: deployment updated" id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9
time="2024-07-24T20:35:45+08:00" level=info msg="fuota: starting fragmentation-session setup for devices" deployment_id=e3ae07e8-aecd-4f39-82ae-f21ba97bf5c9
From the log above, we can see that the FUOTA Server did not respond to the data returned by the device, so it repeated the data sending.
What is certain is that the LoRaWAN module received the data McGroupSetupReq, and the device used fport 200 to return the data “02 00” (HEX). What should I do to keep the FUOTA process going?