Wireless stick lite V3 - Boot loop

These are values for rssi and snr.
rssi:-34
loRaSNR:5.5

I did test with setADR(false) but I removed that later. I did not changed power.

In ChirpStack - there should be such device settings (will be set while create device):
image

Maybe here is other value?

On chirpstack v3 I can’t see that option. Only option I see about ADR is in device profile.


I tested some other boards like HTCC-AB02A with this server and they used correct SF if signal is strong. But I did not used radiolib on them.

RadioLib’s default datarate on EU868 is DR2 = SF10, so that is normal.
That RSSI is SHOUTING AT THE GATEWAY, you should definitely keep your device and gateway at a longer distance - best to put the gateway as far from your device/desk as possible (two rooms over if not in the shed in the backyard).
If you leave ADR enabled (default), your CS server should be able to steer your device into a more reasonable SF.

1 Like

I moved node away from gateway but it still uses SF12. Now RSSI and SNR are: rssi:-88, loRaSNR:-0.3
Payload is 1111110 .

@bns - really? I never have seen SF10 at my devices after joining - only while some experiments with bad conection. Using TTN of course, maybe different?

BTW: For testing all my devices were only 2-3 meters away from gateway, never had any problems…

@vladosam You could try state = node.beginOTAA(joinEUI, devEUI, nwkKey, appKey, 5);
(last is joinDr - The datarate at which to send the join-request ) maybe it could help, not sure…

For testing you could disable ADR and set a fixed DR:

node.setADR(false);
node.setDatarate(5);

// in order to save the datarate persistent across reboot/deepsleep, use the following:
  /*
   node.setDatarate(5, true);  
  */

If I disable ADR then it works.
With ADR.


Without ADR.

I meant that upon join, the default is SF10. Without ADR, it should stay at SF10 - with ADR, it is likely to move to something else.

@vladosam can you please share your code, because that looks really weird

I don’t have access to code right now but I will share it tomorrow. This is 100% my mistake in coding so don’t think about it too much. :slight_smile:

This is code with ADR disabled. I only added commands to disable ADR.

  state = node.beginOTAA(joinEUI, devEUI, nwkKey, appKey, 3);
  // disable the ADR algorithm
  node.setADR(false);
  node.setDatarate(3);

/*
// include the library
#include <RadioLib.h>
#include <SPI.h>
SPIClass spi(SPI);
SPISettings spiSettings(2000000, MSBFIRST, SPI_MODE0);
// SX1262 has the following pin order:
// Module(NSS/CS, DIO1, RESET, BUSY)
SX1262 radio = new Module(8, 14, 12, 13, spi, spiSettings);


// SX1278 has the following pin order:
// Module(NSS/CS, DIO0, RESET, DIO1)
//SX1278 radio = new Module(10, 2, 9, 3);

// create the node instance on the EU-868 band
// using the radio module and the encryption key
// make sure you are using the correct band
// based on your geographical location!
LoRaWANNode node(&radio, &EU868);

// for fixed bands with subband selection
// such as US915 and AU915, you must specify
// the subband that matches the Frequency Plan
// that you selected on your LoRaWAN console
/*
  LoRaWANNode node(&radio, &US915, 2);
*/

void setup() {
  Serial.begin(9600);
	// SCK/CLK, MISO, MOSI, NSS/CS,
	spi.begin(9, 11, 10, 8);
  // initialize SX1278 with default settings
  Serial.print(F("[SX1262] Initializing ... "));
  int state = radio.begin();
  if(state == RADIOLIB_ERR_NONE) {
    Serial.println(F("success!"));
  } else {
    Serial.print(F("failed, code "));
    Serial.println(state);
    while(true);
  }

  // start the activation
  Serial.print(F("[LoRaWAN] Attempting over-the-air activation ... "));
  uint64_t joinEUI = 0x;
  uint64_t devEUI  = 0x;
  uint8_t nwkKey[] = { 0x };
  uint8_t appKey[] = { 0x };
  state = node.beginOTAA(joinEUI, devEUI, nwkKey, appKey, 3);
  // disable the ADR algorithm
  //node.setADR(false);
  node.setADR(false);
  node.setDatarate(3);
  // set a fixed datarate
  //node.setDatarate(5);
  // on EEPROM-enabled boards, after the device has been activated,
  // the session can be restored without rejoining after device power cycle
  // by calling the same `beginOTAA()` or `beginABP()` function with the same keys
  // or call `restore()` where it will restore any existing session
  // `restore()` returns the active mode if it succeeded (OTAA or ABP)
  Serial.print(F("[LoRaWAN] Resuming previous session ... "));
  //state = node.restore();
  if(state >= RADIOLIB_ERR_NONE) {
    Serial.println(F("success!"));
    Serial.print(F("Restored an "));
    if(state == RADIOLIB_LORAWAN_MODE_OTAA)
      Serial.println(F("OTAA session."));
    else {
      Serial.println(F("ABP session."));
    }
  } else {
    Serial.print(F("failed, code "));
    Serial.println(state);
    while(true);
  }

}

// counter to keep track of transmitted packets
int count = 0;

void loop() {
  // send uplink to port 10
  Serial.print(F("[LoRaWAN] Sending uplink packet ... "));
  String strUp = "111111"+ String(count++);
  String strDown;
  int state = node.sendReceive(strUp, 10, strDown);
  if(state == RADIOLIB_ERR_NONE) {
    Serial.println(F("received a downlink!"));

    // print data of the packet (if there are any)
    Serial.print(F("[LoRaWAN] Data:\t\t"));
    if(strDown.length() > 0) {
      Serial.println(strDown);
    } else {
      Serial.println(F("<MAC commands only>"));
    }

    // print RSSI (Received Signal Strength Indicator)
    Serial.print(F("[LoRaWAN] RSSI:\t\t"));
    Serial.print(radio.getRSSI());
    Serial.println(F(" dBm"));

    // print SNR (Signal-to-Noise Ratio)
    Serial.print(F("[LoRaWAN] SNR:\t\t"));
    Serial.print(radio.getSNR());
    Serial.println(F(" dB"));

    // print frequency error
    Serial.print(F("[LoRaWAN] Frequency error:\t"));
    Serial.print(radio.getFrequencyError());
    Serial.println(F(" Hz"));
  
  } else if(state == RADIOLIB_ERR_RX_TIMEOUT) {
    Serial.println(F("no downlink!"));
  
  } else {
    Serial.print(F("failed, code "));
    Serial.println(state);
  }

  // on EEPROM enabled boards, you can save the current session
  // by calling "saveSession" which allows retrieving the session after reboot or deepsleep
  node.saveSession();

  // wait before sending another packet
  // alternatively, call a deepsleep function here
  // make sure to send the radio to sleep as well using radio.sleep()
  uint32_t minimumDelay = 900000;                  // try to send once every minute
  uint32_t interval = node.timeUntilUplink();     // calculate minimum duty cycle delay (per law!)
  uint32_t delayMs = max(interval, minimumDelay); // cannot send faster than duty cycle allows

  delay(delayMs);
}

Can you share sleep mode code examples from your devices? The ones I used on esp32 dev board do not work on WSLV3.

I fixed sleep mode. Sorry to bother you.