Problem with band 433MHZ lorawan/band: invalid data-rate

Hello everyone, after checking the forum and weeks fo work trying to solve the issue I have decided to create a post to see if someone can give me a hand with this issue.

I am trying to use a nanogateway together with an end-device both hardwares are lopy4 433MHz

this is the error that the command window shows:

level=error msg=“uplink: processing uplink frame error” ctx_id=19a888c2-ceb3-4edb-9a3a-03fdc8ccbdfd error="run uplink response flow error: set downlink tx-info data-rate error: get data-rate error: lorawan/band: invalid data-rate"

I have checked the forum trying to find a solution that is valid to my specific case but none of the solutions made it work.

Will post some of the configuration of my server together with the code I am using on the end device:

Sorry for the quality but due to be a new member cannot post more than 1 image per post so I merged the configuration in a single image. (probably you will need to open the image in a new tab in order to read it :frowning: )

I am using abp mode to connect the end device, in the next step I will share the code I am using

End Device Code + Packet
“”" ABP Node example compatible with the LoPy Nano Gateway “”"

from network import LoRa
import socket
import ubinascii
import struct
import time
import config

import machine

lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.EU433, device_class = LoRa.CLASS_C )

#LORA_FREQUENCY = 433175000
# create an ABP authentication params 
dev_addr = struct.unpack(">l", ubinascii.unhexlify('01de6677'))[0]
nwk_swkey = ubinascii.unhexlify('48fe21bb4a23d10c0eed2855c2c0f3e4')
app_swkey = ubinascii.unhexlify('361a74940c2f756b70d143119881ed2f')

# remove all the non-default channels
# create a LoRa socket
s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)

# set the LoRaWAN data rate
s.setsockopt(socket.SOL_LORA, socket.SO_DR, config.LORA_NODE_DR)

# make the socket non-blocking

for i in range(3, 16):

# set the 3 default channels to the same frequency
lora.add_channel(0, frequency=433175000, dr_min=0, dr_max=5)
lora.add_channel(1, frequency=433375000, dr_min=0, dr_max=5)
lora.add_channel(2, frequency=433575000, dr_min=0, dr_max=5)

# join a network using ABP (Activation By Personalization)

lora.join(activation=LoRa.ABP, auth=(dev_addr, nwk_swkey, app_swkey), timeout=0, dr=5)     


for i in range (200):
    pkt = 'c0 9b dc fb 32 6b 68 '
    print('Sending:', pkt)
    rx, port = s.recvfrom(256)
    if rx:
        print('Received: {}, on port: {}'.format(rx, port))

I am using the docker-compose-master that is located in brocaar repo on github.
I have been dealing with this issue for a month today, so I finally decided to write a post and ask for help since I could not figure out how to solve the problem I am facing.

Thanks for your help.


Please enter proper DataRate on device-profile page in Rx2 DataRate field based on LoRaWAN Regional Parameter.

Hello @sagarpatel thanks for your fast answer, I took that parameter from the LoRaWAN Regional Parameter

Probably I had missunderstood the meaning of the RX2 here but thats the information I could find there.
Previously I had the value of both data rates and fq fixed to 0 and the problem was the same.

Well after checking the configuration I changed the RX2 DataRate as suggested ( placed a 5 instead), now atleast the error has changed to:
error="run uplink response flow error: set mac-command pending error: gob encode error: lorawan: Freq must be a multiple of 100"
Have checked the value of the frequency the gateway is sending to the server and the value is a multiple of 100 so I cannot find where the error is.

I will keep checking the forum to see if I find a possible solution for that issue, but any help would be kindly appreciated.

Thanks for all.

Could this be related to a frequency in your chirpstack-network-server.toml configuration, that is not a multiple of 100 Hz?

Hello @brocaar this is my configuration file, the value of the frequency seems to be correct.
Have been trying different configurations on the server leading to the same error.

Thanks for your answer.

Please check the number of 0s in the 3rd channel :wink:

Hi @loga1460
Could please you show me your gateway-bridge.toml and application-server.toml for the EU433 band?