Downlink TX frequency is 0

Getting an issue when i send a downlink packet using the lora-app-server api.
i’m using the server version 2.3.0
I found that the packet is rejected at the gateway due to freq:0 parameter

Without more information like your loraserver.toml configuration, device-profile configuration etc… I’m unable to help you.

Sir,

Device profile configuration:
1)GENERAL
LoRaWAN MAC version * 1.0.1
LoRaWAN Regional Parameters revision * A
2) JOIN (OTAA/ABP)
Supports OTAA = FALSE (i.e does not supports otaa)
RX2 data-rate * 2
3) Class-C
Device supports class C

ONLY WORKING WITH ABP in CLASS C

loraserver.toml contents:

[general]

log_level=4

[postgresql]
dsn="postgres://loraserver_ns:dbpassword@localhost/loraserver_ns?sslmode=disable"

automigrate=true

[redis]
url="redis://localhost:6379"

max_idle=10
idle_timeout="5m0s"

[network_server]
net_id="000000"

deduplication_delay="600ms"
device_session_ttl="8760h0m0s"
get_downlink_data_delay="100ms"

  [network_server.band]
  name="IN_865_867"

  dwell_time_400ms=false

  repeater_compatible=false

  [network_server.network_settings]

  installation_margin=10

 
  rx_window=0
  rx1_delay=1
  rx1_dr_offset=0
  rx2_dr=-1
  rx2_frequency=-1
  downlink_tx_power=-1
  disable_mac_commands=false
  disable_adr=true
  enabled_uplink_channels=[]


  [network_server.network_settings.class_b]
  ping_slot_dr=0
  ping_slot_frequency=0



  [network_server.network_settings.rejoin_request]
  enabled=false

 
  max_count_n=0
  max_time_n=0


 
  [network_server.scheduler]
   scheduler_interval="1s"

    [network_server.scheduler.class_c]
 
    downlink_lock_duration="2s"


  [network_server.api]
  bind="0.0.0.0:8000"

  [network_server.gateway.stats]
  create_gateway_on_stats=true

  timezone=""
  aggregation_intervals=["minute", "hour", "day"]

  [network_server.gateway.backend]
    type="mqtt"
    uplink_topic_template="gateway/+/rx"
    downlink_topic_template="gateway/{{ .MAC }}/tx"
    stats_topic_template="gateway/+/stats"
    ack_topic_template="gateway/+/ack"
    config_topic_template="gateway/{{ .MAC }}/config"

    server="tcp://localhost:1883"
    qos=0
    clean_session=true


   uplink_retention_duration="24h0m0s"

server="http://localhost:8003"

@brocaar sir,

I’ve updated you with the configurations.

This issue begins to happen when I updated my loraserver, lora-app-server and lora-gateway-bridge to the latest release, also i’ve installed lora-geo-server, but not using it now.

From your information, I get that you left the RX2 frequency to 0 in the device-profile:

You should update it to the correct frequency and re-activate the device.

Yes, sir i’ve updated the RX2 frequencies!
And will update you soon for the same whether it worked or not.

Thank you!

Still getting the same issue, downlink tx frequency in some of the device downlink is found to be 0(zero).
RX2 frequency is 866550000 this time and also added the other frequencies, but still getting tx freq ZERO.

I have the same question, can anyone solve it??

Have you looked into the settings of your device-profile? Please note that you must re-activate your device before these changes are “activated” for your device.

Thanks a lot firstly, it is a class C device, so I need not to activated it, when I choose ABP type and give addr, nwskey and appskey, then I restart the device, I can see the uplinkdata and downlinkdata correctly, the frequency of the downlinkdata is ok, however, after these, both I send data via mqtt and api, the txinfo.frequency of the downlink change to 0. it too late in chinese now, I will paste som screenshot to you tomorrow, good night.


The first picture is the downlink frame, The second is related console log

Thanks for you reply, The Detailed description of my question is:
1、The device added to lorawan via ABP, the Addr, Nws, Apps are set correctly. then start the device, loraserver receive several uplink frame, after each uplink frame, the loraserver send a downlink frame (with correct txinfo.frequency) try to set Rxparameter(contain frequency set) of device, but the device didn’t reply these control downlink frame.
2、after step 1, I send dataframe via mqtt or api to device fail, when I check the downlink frame, I find the rxinfo.frequency is 0, and the console windows print some msgs as I paste above.
3、I check the device_profile and the network-server.toml repeatly, they are all correct, and I try modify the rx_window=1 or rx1_delay=1, rx2_dr=-1, rx2_frequency=-1 and so on, However the result no change.

I remember an important thing, this device once joined to another chirpstack-server several days ago, and it worked fine. but even I copy the chirpstack-server fully and then add the device, it can not receive downlink data, I want know if this is the key of the question? and if the ABP device must deleted form a lorawan firstly before join to another, even if the server which joined before is stoped now

Best wishes to you, the chirpstack is a great work.

I check the redis db, and find several “mac:pending” keys, show as follow
127.0.0.1:6380> keys *

  1. “lora:ns:device:ffffff100000a6c6:gwrx”
  2. “lora:ns:device:ffffff100000a6c6”
  3. “lora:ns:device:ffffff100000a6c6:mac:pending:8”
  4. “lora:as:metrics:gw:0005f041c8e3337f:MONTH:1572566400”
  5. “lora:as:metrics:gw:0005f041c8e3337f:HOUR:1574276400”
  6. “lora:ns:sp:5b85f111-be0d-4564-bf6e-63131c204478”
  7. “lora:as:metrics:gw:0005f041c8e3337f:HOUR:1574269200”
  8. “lora:ns:device:ffffff100000a6c6:mac:pending:5”
  9. “lora:as:metrics:gw:0005f041c8e3337f:DAY:1574208000”
  10. “lora:ns:devaddr:0769a471”
  11. “lora:as:metrics:gw:0005f041c8e3337f:HOUR:1574272800”

The frequency value of 0 comes from the device-profile. Upon activation (be it OTAA or ABP), these values are copied from the device-profile into the device-session. Therefore make sure:

  • The frequency is set correctly in your device-profile
  • After updating the device-profile, re-activate (OTAA or ABP) the device to make sure a new device-session is created with the updated values. Note that for ABP this is as simple as opening the activation tab and click activate :slight_smile:

Thanks a lot, It is fine now!
Best wishes to you, brocaar.