How to eliminate "Code: DOWNLINK_GATEWAY Level:ERROR"?

Hi all,

I am uploading Confirmed data. However, I am getting a lot of “Code: DOWNLINK_GATEWAY Level:ERROR” and the terminal is resending with the same Fcnt because the ACK is not returning.

I want to eliminate unnecessary retransmissions.

Can you please tell me how to eliminate this error?

As a test, I incorporated the following code into “Chirpstack.toml”.
I changed the "get_downlink_data_delay=“100ms” setting from 100ms → 75ms and so on.

However, there was no improvement.

Code incorporated in "Chirpstack.toml

# Network related configuration.
[network]

# Time to wait for uplink de-duplication.
  #
  # This is the time that ChirpStack will wait for other gateways to receive
  # the same uplink frame. Please note that this value affects the
  # roundtrip time. The total roundtrip time (which includes network latency)
  # must be less than the (first) receive-window.
  deduplication_delay="200ms"

  # Get downlink data delay.
  #
  # This is the time that ChirpStack waits between forwarding data to the
  # integration(s) and reading data from the queue. A higher value means that
  # an end-application has more time to schedule a downlink queue item which
  # can be processed within the same uplink / downlink transaction.
  # Please note that this value has influence on the uplink / downlink
  # roundtrip time. Setting this value too high means ChirpStack will be
  # unable to respond to the device within its receive-window.
  get_downlink_data_delay="100ms"

Best Regards,
Hiroshi Mori

  1. Seem you have some issues with downlink.
    That is why the device doesnot receive ack downlink from server.

You can send a dowlink from ChirpStack to device to confirm.

  1. You can send unconfirmed uplink instead.
    You dont need ack back. So no error.

Btw, the root problem is still there for downlink.

Please note you can expand the log by clicking on the blue log button. That will show you more details about the error.

Hi Mr.Brocaar,

Thank you for your advice. I clicked on the blue button to see the details of the error. The log is as follows
The error description is “TOO_EARLY”.

•	time:"2024-05-09T05:14:39.032817546+00:00"
•	▶
deviceInfo:{} 10 keys
    tenantId:"52f14cd4-c6f1-4fbd-8f87-4025e1d49242"
    tenantName:"ChirpStack"
    applicationId:"d77f05e9-c36f-458a-bf91-4cfdafc9c4cc"
    applicationName:"ST_BootCamp"
    deviceProfileId:"7c886a5e-af8c-4906-91d2-98c529f5721f"
    deviceProfileName:"ST_EVB"
    deviceName:"X-Nucleo-IKS01A2"
    devEui:"aa00cc01ee020040"
    deviceClassEnabled:"CLASS_A"
    tags:{} 0 keys
•	level:"ERROR"
•	code:"DOWNLINK_GATEWAY"
•	description:"TOO_EARLY"
•	context:

As a countermeasure, I set the NTP settings of the Linux machine where ChirpStack is installed and the Gateway (made by Browan) to the same server (ntp.nict.jp).
And I also set the time zone to “Asia/Tokyo (JST, +0900)”.

However, the error rate is 12/60 packets = 20%.
There is no change. I can’t use it as it is.

How and what should I do?
Is there any part of ChirpStack that can be adjusted?

Could you please give me some kind and gentle advice?

Best Regards,
Hiroshi Mori

Usually, this is an indication that that the network latency is too high between the GW <> NS to complete the uplink / downlink in time. What you can do is increase the rx1_delay to for example 3, e.g. rx1_delay=3. ChirpStack will send mac-commands to your devices to make them aware of the RX1 delay change. It might take some time before all devices will adapt to the new setting. See also:

Hi Mr.Brocaar,

Thank you for your advice. Your very high technical skills and precise advice are very helpful.

I adjusted the value of “rx1_delay=” as you suggested and it dramatically reduced the errors. I changed the value little by little and patiently evaluated it over time. As a result, we were able to reduce the error to zero for about 3,000 packets of communication.

I will now close this question.

Best Regards,
Hiroshi Mori

1 Like