Using sandeepmistry/arduino-LoRa

Hello,

I have a MKRWAN1300 and I would like to operate point to point as a proof of concept for a much larger project. I have tried using the Arduino MKRWAN_v2 library but I can't find a way to use it without connecting to a gateway. Then I saw something that suggested using the sandeepmistry/arduino-LoRa library.

I have installed the library and tried to get an example working but I just get Starting LoRa Failed!.

Here is the code I used:

#include <SPI.h>
#include <LoRa.h>

int counter = 0;

void setup() {
  Serial.begin(9600);
  while (!Serial);

  Serial.println("LoRa Sender");

  if (!LoRa.begin(915E6)) {
    Serial.println("Starting LoRa failed!");
    while (1);
  }
}

void loop() {
  Serial.print("Sending packet: ");
  Serial.println(counter);

  // send packet
  LoRa.beginPacket();
  LoRa.print("hello ");
  LoRa.print(counter);
  LoRa.endPacket();

  counter++;

  delay(5000);
}

I can get the module to start using the Arduino MKRWAN_v2 library so I don't think my board is broken. I know many other people have ran into this issue before but I haven't seen an answer yet. I thought I'd ask here. If this is a duplicate post on the forum.

Thanks

Hello.
I had the same problem and solved it by using the MKRWAN (without the V2) library and firmware upgrade accordingly.
My conclusion is that _V2 library does not allow to establish pont to point Lora connection.
With legacy (without V2), you have got access to radio, spreading factor, TX power, ...
Hope this helps.

2 Likes

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