I want to send messages with the LoRa frequency and protokoll without all the TTN stuff.
I try to use the LoRa Lib with the MKRWAN1310. Everythings seems fine, the EndPackage() returns 1, witch means success.
When I watch the frequency with my HackRF radio receiver, no signal goes out.
I suspect, that the default PINS are wrong. Witch are the SS, RESET and DIo0 Pins at the MKRWAN1310?
Has someone experience with this combination?
#include <SPI.h>
#include <LoRa.h>
String message;
int counter = 0;
int err;
void setup()
{
Serial.begin(9600);
Serial.println("LoRa message service");
LoRa.setFrequency(867400000);
LoRa.setSpreadingFactor(7);
LoRa.setSignalBandwidth(100000);
if (!LoRa.begin(868E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
delay(1000);
Serial.println("Starting LoRa !");
}
void loop()
{
message = "hello world from me ";
if (message.length() > 0)
{
Serial.println();
Serial.print("Me("); Serial.print(counter);
Serial.print("): " + message);
LoRa.beginPacket();
LoRa.print(message);
err = LoRa.endPacket(1);
message = "";
counter++;
Serial.print(" err="); Serial.print(err); // 1= success
}
delay(1000);
}