I have one door sensor since few days. It was joining fine with OTAA out of the box but mess with the ADR at first try. It was stuck in SF9 after join. It did receive new frequencies from the chirpstack server, acknowledge them, and then when the server tried to set the device to DR6 (SF7 250kHz) it acknowledge again and just did not change the spread factor. It looks like a bug in the firmware of the device. I changed the service profile on chirpstack to stick between DR0 to DR5 (not DR6) and now it works like a charm and change spread factor on order.
I did not had time to dig further, I will try to put some capture of the join and the firsts ADR frames soon.
Here is the config that I programmed on the device using the serial interface (in this order, not all are needed).
123456
// enable log
AT+ILOGLVL=5
// Set AppEUI
AT+CAPPEUI=0000000000000000
// Set AppKey
AT+CAPPKEY=00000000000000000000000000000000
// enable OTAA (default)
AT+CJOINMODE=0
// frequencies mask (default)
AT+CFREQBANDMASK=0001
// ?? do not remember what it is
AT+CULDLMODE=1
// class A only (default)
AT+CCLASS=0
// unconfirmed uplinks (default)
AT+CCONFIRM=0
// disable ADR to change datarate
AT+CADR=0
// set default datarate to SF9 (default)
AT+CDATARATE=3
// uplink port (default)
AT+CAPPPORT=10
// send uplink every 24h
AT+TDC=86400
// downlink frequency (default)
AT+CRXP=0,0,86952500
// RX1 delay 1s (default)
AT+CRX1DELAY=1
// send message on door open-close (default)
AT+DISALARM=0
// enable ADR (default)
AT+CADR=1
// start auto join (60s delay, 255 retry) (256 like datasheet will overflow)
AT+CJOIN=1,1,60,255
// disable log
AT+ILOGLVL=0
// save config to EEPROM
AT+CSAVE
// go to deep sleep
AT+CLPM=1
Here is the chirpstack config:
Service profile:
Device profile:
-
version 1.0.3
-
rev B
-
default ADR
-
max EIRP 0
-
uplink interval 86400
-
join OTAA enabled
I just copy the device EUI from the device to chirpstack and generated a new application key from chirpstack that I copied on the device. But you can enter what is on the box of the device in chirpstack and this will works fine.
Hope this helps.