Seems the links are busted on this product. The links to the recipe as well as even this forum don’t work.
I found the wiki for the product but I guess all the documentation there is outdated as well. Even the code to get the firmware version doesn’t even work.
I’m completely brand new to Arduino.
When I paste the code given I get ‘SerialUSB’ was not declared in this scope
Googling that, others suggested just using Serial but that doesn’t return anything in the serial monitor.
Further down the page to connect via OTAA it says this:
Step 2. For seeeduino Lorawan, Please open your Arduino IDE and click on File > Examples > LoRaWAN > OTAA and refer the code.
Except there’s nothing called LoRaWaN under examples. I did add the board as advised uptop under If you can not find the Seeeduino LoRaWAN, please check How to Add Seeed boards to Arduino IDE
Any help would be appreciated
At what point did you get stuck? Did you successfully get the board added to your Arduino IDE? Did you get the LoRaWAN library installed correctly? Do you have an account at The Things Network or other provider with an Application to register the device? Do you have a gateway within range to make the connection (sounds like this isn’t the issue yet).
Are you using the Arduino app on a PC or other computer?
Finally, where are you located. Things are a bit different in different in different places.
Brady Aiello has an instructable at <LINK_TEXT text=“https://www.instructables.com/id/LoRaWA … ino-Motes/”>https://www.instructables.com/id/LoRaWAN-Gateway-Seeeduino-Motes/</LINK_TEXT> but I am still having difficulty, like my connection working for a while but then stopping. Wish I could help more but it is a struggle figuring everything out.
As near as I can tell there is serial communication from the computer to the Seeeduino on SerialUSB and communication to the LoRaWAN radio from the board on Serial. SerialUSB is what should show up when you open a serial monitor. You are correct that the instructions for installing the Driver aren’t correct. Frankly, I’m not sure how I got around it. I think Windows figured out most of it out itself. I just mucked around until it worked. Don’t forget to make sure you have the correct Com port chosen in the Arduino IDE.
My suggestion is to be sure the board is working first. Run the blink example. Then try activate the board using ABP. Finally, try to figure out how to get OTAA working.
I was able to finally get it to work using OTAA
Seems all the example files for the Lorawan board have been removed from the Boards Manager file after version 1.2.0
So basically I had to downgrade to 1.2.0 to find the example files.
sigh
If you would care to share your code, that would be great!
Hi There
maybe you can find it on <LINK_TEXT text=“http://wiki.seeedstudio.com/Seeeduino_L … ng-started”>http://wiki.seeedstudio.com/Seeeduino_LoRAWAN/#getting-started</LINK_TEXT> which is the newest wiki .
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]