element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Just Encase
  • Challenges & Projects
  • Design Challenges
  • Just Encase
  • More
  • Cancel
Just Encase
Blog Blog 5 - Getting started with the MKR 1300 (and LoRa Sender Starting LoRa failed!)
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Just Encase to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: christophesky
  • Date Created: 19 Dec 2021 12:21 PM Date Created
  • Views 3352 views
  • Likes 9 likes
  • Comments 7 comments
  • helpful
  • MKR1300
  • Lora Send / Receive
  • just encase
Related
Recommended

Blog 5 - Getting started with the MKR 1300 (and LoRa Sender Starting LoRa failed!)

christophesky
christophesky
19 Dec 2021
Blog 5 - Getting started with the MKR 1300 (and LoRa Sender Starting LoRa failed!)

Gettting Started

Arduino IDE installed.

Libraries installed - read more here for instaling the SAMD boards and required libraries https://www.arduino.cc/en/Guide/MKRWAN1300

Antennas for the win. - suprisingly the MKR1300 doesnt come with an antenna in the box and you are going to want one. I specifically went with a Dipole Pentaband Waterproof Antenna, $4 each and they have arrived in time (hurrah), there is lots of guidance out there on rolling your own if you are so inclined.

Next suprise was the Grove Shield, this is well suited for the larger form factor Uno et.al type boards and one the MKR feather sized ones. Curently working out if the sensor shield can be plumbed to the MKR1300, will post an update once this is finished later today.

Sensors have arrived and the enclosure bucket test is to commence shortly.

Sensors so far

So this is my selection of sensors so far, running left to right we have:

  • DHT22 temp and humidity sensor. A better choice that the DHT11 which is limited at 0C, it gets cold than that here. I managed to get hold of some Grove breakout boards so can make up my own sensors to use with the sensor shield.
  • pH probe, waiting on a bit level shifter to arrive to take this down to 3.3 from its current 5v which the MKR 1300 will not like
  • Turbidity sensor - very much aligned at being installed in something, say a dishwasher or washing machine and not exposed to the outside world. Will need to make up a waterproof back cover for this, some 3D printing now required :)
  • Total disolved solids meter
  • Ambient light sensor, high precision but inexpensive, so why not
  • High temp waterproof probe, this is the Adafruit one, ideally I am going to measure water temp and 2 depths.

No luck with am ORP sensor at the moment, having checked my reef tank kit, so one for salt water, alas this would be no good for me in fresh water, a shame.

image

LoRa Sender Starting LoRa failed!

If this helps someone else, great.

The LoRa Sender Starting LoRa failed! messages on the serial monitor has had me stuck for a while. Advice seems to be upgrade the board firmware using the MKRWANFWUpdate_standalone.ino as included in the MKRWAN examples.

Having updated, run the example sender / reciever code I was still getting stuck on the LoRa Sender Starting LoRa failed! message.

A single comment in github sandeepmistry / arduino-LoRa repo advised trying to downgrade the MKRWAN library and firmware from the latest 1.1.0 to the previous version 1.0.15.

Having done so, and then running the previous release of MKRWANFWUpdate_standalone.ino ... I now have a working sender / receiver set up.

image

MKRWAN library version.

image

Sending Lora

image

Receiving Lora and not a LoRa Sender Starting LoRa failed! in sight :)

Sender Code:

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

int counter = 0;

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

  Serial.println("LoRa Sender");

  if (!LoRa.begin(868E6)) {
    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);
}

Reciever Code:

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

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

  Serial.println("LoRa Receiver");

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

void loop() {
  // try to parse packet
  int packetSize = LoRa.parsePacket();
  if (packetSize) {
    // received a packet
    Serial.print("Received packet '");

    // read packet
    while (LoRa.available()) {
      Serial.print((char)LoRa.read());
    }

    // print RSSI of packet
    Serial.print("' with RSSI ");
    Serial.println(LoRa.packetRssi());
  }
}

  • Sign in to reply

Top Comments

  • christophesky
    christophesky over 3 years ago +1
    I am fairly sure I have a GPS module >< somewhere, it might be interesting to get this hooked up and go roaming with the MKR1300 sender to road test range, keep posted for updates on this :)
  • skruglewicz
    skruglewicz over 3 years ago +1
    Hi christophesky I will keep your solutions with LoRa in mine.Just wondering if you tried the example using Lora connected directly to Arduino IOT cloud? and onto the dash board? I don’t have the exact…
  • christophesky
    christophesky over 3 years ago in reply to skruglewicz +1
    I did give this a try but do not seem to be in range of a Gateway, perhaps something to think about come the new year Tutorial link: docs.arduino.cc/.../cloud-lora-getting-started
  • gracemcnally
    gracemcnally over 3 years ago

    Wow thank you so much!!!! I was also having trouble with the LoRa sender failing. My husband and I were looking at it for hours before I found your blog. Good luck on the rest of your project!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • feiticeir0
    feiticeir0 over 3 years ago

    Thank you . I've read your post and when stuck, did upgrade the firmware. But you need to press a key ! Smiley and the latest version works fine ! Merry Christmas

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • christophesky
    christophesky over 3 years ago in reply to DAB

    Thank you. As I am now officially on holiday and not beholden to work until the new year I can now actually spend some proper time on this (hurrah) and so tommorrow will be completing the connectivity for sensors (and calibration), subject to not being given a list of jobs from my wife or son!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 3 years ago

    Nice update.

    I look forward to your future posts to see how well the sensors work.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • christophesky
    christophesky over 3 years ago in reply to skruglewicz

    I did give this a try but do not seem to be in range of a Gateway, perhaps something to think about come the new year Slight smile

    Tutorial link: docs.arduino.cc/.../cloud-lora-getting-started

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube