Deep_sleep example

I am trying to get the RAK4631-DeepSleep-LoRaWan example to work on my WisBlock Starter kit. I am able to get other examples working, like the Environment example, but not this one. I do have to update the LORAMAC_REGION to US915, I am in Canada, and register it on TTN V.3 and copy the keys but the device never contacts my gateway. The firmware posts on the serial monitor that the OVER_THE_AIR_ACTIVATION failed! Is there anything special I need to do when selecting LORAMAC_REGION_US915? I did read another post about this very issue but trying everything recommended did not help. I am using all the most current SX126x-Arduino library (v2.0.8) and Arduino IDE 1.8.19 and downloaded the example from your github repository. This is the serial monitor output:

00:04:28.833 → =====================================
00:04:28.833 → RAK4631 LoRaWan Deep Sleep Test
00:04:28.833 → =====================================
00:04:28.949 → Start network join request
00:04:28.992 → LoRaWan init success
00:04:28.992 →
00:04:28.992 → BSP Library : 1.0.1
00:04:28.992 → Bootloader : s140 6.1.1
00:04:28.992 → Serial No : 6169E9D57E2F3789
00:04:28.992 →
00:08:58.312 → OVER_THE_AIR_ACTIVATION failed!
00:08:58.312 → Check your EUI’s and Keys’s!
00:08:58.312 → Check if a Gateway is in range!

Any help would be greatly appreciated.

US915 and TTN are using subband 2.
In lora_handler.cpp change the lines

  // For some regions we might need to define the sub band the gateway is listening to
  // This must be called AFTER lmh_init()
  if (!lmh_setSubBandChannels(1))
  {
    return -3;
  }

to

  // For some regions we might need to define the sub band the gateway is listening to
  // This must be called AFTER lmh_init()
  if (!lmh_setSubBandChannels(2))
  {
    return -3;
  }
1 Like

Thanks so much for the quick response, that did resolve my issue. I have run into similar configuration differences with other libraries where an example is written for EU868 and I am trying to make it work with US915 and it is never as simple as just changing the frequency band!

Thanks so much!!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.