Seeeduino LoRaWAN RAK7249 - AU915

I’m trying to integrate Seeeduino LoRaWAN to TTN through using my own RAK7249 gateway which is registered and active on the TTN network successfully.



The gateway is programmed for AU915 second-band settings. Namely it’s using uplink channels 8-15 and 65 (916.8-918.2 MHz and 917.5 MHz).



I can see that the Join request is sent to the TTN and a response on 923.3 MHz (The downlink frequency) arrives but it is never acknowledged by the Seeeduino. See below:



Seeeduino Log:





Gateway packet logger:





The arduino code:
[code]#include <LoRaWan.h>

unsigned char data[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0xA,};
char buffer[256];

void setup(void)
{
  Serial.begin(115200);
  delay(5000);

  lora.init();

  memset(buffer, 0, 256);
  lora.getVersion(buffer, 256, 1);
  Serial.print(buffer);

  memset(buffer, 0, 256);
  lora.getId(buffer, 256, 1);
  Serial.print(buffer);

  // void setId(char *DevAddr, char *DevEUI, char *AppEUI);
  lora.setId(NULL, "00D433CC276F57D7", "70B3D57ED0024CCA");
  // setKey(char *NwkSKey, char *AppSKey, char *AppKey);
  lora.setKey(NULL, NULL, "32B31BDCB5CBFC4B04500D1BEA4F2F3E");

  lora.setDeciveMode(LWOTAA);
  lora.setDataRate(DR2, AU915);

  lora.setChannel(8, 916.8, DR0, DR5);
  lora.setChannel(9, 917.0, DR0, DR5);
  lora.setChannel(10, 917.2, DR0, DR5);
  lora.setChannel(11, 917.4, DR0, DR5);
  lora.setChannel(12, 917.6, DR0, DR5);
  lora.setChannel(13, 917.8, DR0, DR5);
  lora.setChannel(14, 918.0, DR0, DR5);
  lora.setChannel(15, 918.2, DR0, DR5);

  lora.setReceiceWindowFirst(0, 923.3);
  lora.setReceiceWindowFirst(1, 923.9);
  lora.setReceiceWindowFirst(2, 924.5);
  lora.setReceiceWindowFirst(3, 925.1);
  lora.setReceiceWindowFirst(4, 925.7);
  lora.setReceiceWindowFirst(5, 926.3);
  lora.setReceiceWindowFirst(6, 926.9);
  lora.setReceiceWindowFirst(7, 927.5);

  lora.setReceiceWindowSecond(923.3, DR8);

  lora.setDutyCycle(false);
  lora.setJoinDutyCycle(false);

  lora.setPower(14);

  while (!lora.setOTAAJoin(JOIN));
}

void loop(void)
{
  bool result = false;

  result = lora.transferPacket("{test: '1234', test2: '234'}", 10);
  //result = lora.transferPacket(data, 10, 10);

  if (result)
  {
    short length;
    short rssi;

    memset(buffer, 0, 256);
    length = lora.receivePacket(buffer, 256, &rssi);

    if (length)
    {
      Serial.print("Length is: ");
      Serial.println(length);
      Serial.print("RSSI is: ");
      Serial.println(rssi);
      Serial.print("Data is: ");
      for (unsigned char i = 0; i < length; i ++)
      {
        Serial.print("0x");
        Serial.print(buffer[i], HEX);
        Serial.print(" ");
      }
      Serial.println();
    }
  }
}<e>[/code]</e></CODE>

Any help in this matter will be very much appreciated. Thank you!

Two things you might try…


  • Hack LoRaWan library join function to only return true when it sees “+JOIN: Done” [to do with library vs. firmware versions]


  • Move your “lora.setReceiceWindowSecond(…” line to after the join sequence [I think, to do with using default Plan settings for the join transaction, which then establishes TTN-specific settings - (maybe this just applies to EU863-870 though)]



    These worked for me using TTN with EU868. Interested to hear if this helps with your app.



    Dave.