Seeeduino Lorawan

Hello Seeed support team,



I am really hoping you may be able to assist me. I am very excited about what we may be able to achieve with this device however I’m having problems with OTAA.



The device works fine in ABP mode. I am trying to connect it to TTN and for obvious reasons I need it to work in OTAA mode.



The below sketch will generate a Join request on my TTN application and TTN is sending a Join Accept back which the Seeeduino does not receive.



We are using AS923 Frequency plan. I have tried adjusting different parameters i.e. ABP etc. Is there any advice you can give me here?



There is the potential for us to use thousands of these devices in the residential and mining communities we currently supply internet services to. My boss wants to go with an out of the box solution, help me get this working so that I can prove to him this will be the better way to go.





[cid:[email protected]]





Seeeduino Lorawan Sketch





#include





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

char buffer[256];



void setup(void)

{

SerialUSB.begin(115200);

while(!SerialUSB);



lora.init();



memset(buffer, 0, 256);

lora.getVersion(buffer, 256, 1);

SerialUSB.print(buffer);



memset(buffer, 0, 256);

lora.getId(buffer, 256, 1);

SerialUSB.print(buffer);







// void setId(DevAddr, DevEUI, AppEUI);

lora.setId(NULL, “47DB558000300027”, “70B3D57ED001A447”);

// setKey(NwkSKey, AppSKey, AppKey);

lora.setKey(NULL, NULL, “047839001E5D3E0B63188CB063B93383”);



lora.setDeciveMode(LWOTAA);

lora.setDataRate(DR2, AS923);



lora.setChannel(0, 916.8);

lora.setChannel(1, 917.0);

lora.setChannel(2, 917.2);

lora.setChannel(3, 917.4);



lora.setReceiceWindowFirst(0, 923.3);

lora.setReceiceWindowSecond(923.9, DR0);



// lora.setDutyCycle(true);

// lora.setJoinDutyCycle(true);

// lora.setAdaptiveDataRate(true);



lora.setPower(10);



while(!lora.setOTAAJoin(JOIN));



}



void loop(void)

{

bool result = false;



result = lora.transferPacket(“Hello World!”, 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)

{

SerialUSB.print("Length is: ");

SerialUSB.println(length);

SerialUSB.print("RSSI is: ");

SerialUSB.println(rssi);

SerialUSB.print("Data is: ");

for(unsigned char i = 0; i