Invalid RX1 data-rate offset

I’ve recently had an issue where my Chirpstack system isn’t able to respond to JoinRequest or ConfirmedDataUp packets. At first, I thought it was an MQTT thing, because I never saw any command topics showing up, but after looking at the logs for a long time, I saw this:

chirpstack-network-server[4600]: level=error msg=“uplink: processing uplink frame error” error=“run uplink response flow error: get rx1 data-rate index error: lorawan/band: invalid RX1 data-rate offset”

I googled for invalid RX1 data-rate offset, but the only thing I came up with was the source code where that error is set.

func (b *band) GetRX1DataRateIndex(uplinkDR, rx1DROffset int) (int, error) {
	offsetSlice, ok := b.rx1DataRateTable[uplinkDR]
	if !ok {
		return 0, errors.New("lorawan/band: invalid data-rate")
	}

	if rx1DROffset > len(offsetSlice)-1 {
		return 0, errors.New("lorawan/band: invalid RX1 data-rate offset")
	}

	return offsetSlice[rx1DROffset], nil
}

I believe that my offset is zero, as I have it set this way in the network.toml file, as well as the service profile in the web app, so that seems to me that it’s likely caused by the b.rx1DataRateTable[uplinkDR] being empty? I’m not sure how this could be.

Any help or advice would be much appreciated!

Could you share the region that you have configured and the uplink data-rate?

US-915, and the uplink is DR0.

I was able to get past it by shotgunning a lot of things, but I think it might have been related to RegParamsRevision

That is odd, as the rx1 data-rate offset is the same for all revisions: lorawan/band_us902_928.go at master · brocaar/lorawan · GitHub

Anyway, good that it works now :slight_smile: