Seeduino Lorawan documentation?

The issue is the “Seeed SAMD Boards” package under Boards Manager in Aduino Studio… All the newer versions of this package after 1.2.0 do NOT work with the Seeeduino Lorawan board. You MUST roll this package back to 1.2.0



Once you do this everything works as it should. I did not use the example in the wiki for OTAA because it simply does not work.



I’ve pretty much given up on this product since there’s no official support and the documentation is so shoddy and I’m developing for a commericial application, we moved on to other products



Also the “OFFICIAL wiki” lists firmware version 2.10.0 and mine shipped with 3.3.1

good luck



Here’s the code I used:

Note it will fail the join several times before finally joining


[code]
#include “LoRaWan.h”
//set to true to send confirmed data up messages
bool confirmed=true;

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

char * deviceId =“0017F04FB57XXXXX”;
char * appKey=“2B7E151628AED2A6ABF7158809CXXXXX”;
char * appEui =“70B3D57ED00XXXXX”;

int lastCall=0;
int i=0;

void setup(void)
{
SerialUSB.begin(115200);
while(!SerialUSB);

lora.init();

lora.setId(NULL,deviceId , appEui);
lora.setKey(NULL, NULL, appKey);

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

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


lora.setDeciveMode(LWOTAA);
lora.setDataRate(DR0, US915HYBRID);
lora.setAdaptiveDataRate(true);

lora.setChannel(0, 903.9);

lora.setChannel(1, 904.1);
lora.setChannel(2, 904.3);
lora.setChannel(3, 904.5);
lora.setChannel(4, 904.7);
lora.setChannel(5, 904.9);

lora.setReceiceWindowFirst(0, 905.3);
lora.setReceiceWindowSecond(923.3, DR8);

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

lora.setPower(14);

while(!lora.setOTAAJoin(JOIN,60));

}

void loop(void)
{
if((millis()-lastCall)>30000){
lastCall=millis();
bool result = false;
String packetString = “Test Message”;

if(confirmed)
    result = lora.transferPacketWithConfirmed("Hello World", 10);
  else
    result = lora.transferPacket(data, 10);
i++;

if(result)
{
    short length;
    short rssi;
    
    memset(buffer, 0, 256);
    length = lora.receivePacket(buffer, 256, &rssi);
    
    if(length)
    {
        SerialUSB.print("Length is: ");
        SerialUSB.println(length);
        SerialUSB.print("RSSI is: ");
        SerialUSB.println(rssi);
        SerialUSB.print("Data is: ");
        for(unsigned char i = 0; i < length; i ++)
        {
                        SerialUSB.print( char(buffer[i]));

        }
        SerialUSB.println();
    }
}

}
}[/code]