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
Internet of Things
  • Technologies
  • More
Internet of Things
Forum Success connecting to Arduino Cloud / TTN with MKR WAN 13x0: share your experience (solved)
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Internet of Things to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 33 replies
  • Subscribers 501 subscribers
  • Views 10682 views
  • Users 0 members are here
  • ttn
  • cloud services
  • arduino
Related

Success connecting to Arduino Cloud / TTN with MKR WAN 13x0: share your experience (solved)

Jan Cumps
Jan Cumps over 3 years ago

update: solved - it was the coverage.

If you have been successful with sending data to The Things Network / Arduino Cloud, using an Arduino MKR WAN 1300 or 1310, please share your experience.

skruglewicz and I have tried this. The configuration worked for both of us (Arduino Cloud, TTN, customised sketch upload), but we don't get an active sub-1 GHz connection.

If you were able to exchange data, please share where you tried this, what Arduino/antenna combination, and where you placed your gizmo. And if you want, the sketch you uploaded (remove the Arduino-generated ID from the header comments).

Thank you

  • Sign in to reply
  • Cancel

Top Replies

  • Jan Cumps
    Jan Cumps over 3 years ago in reply to javagoza +5
    Success! Walking tour, and in RED where I had coverage: edit: data also arrived at the Arduino cloud, as expected:
  • Jan Cumps
    Jan Cumps over 3 years ago in reply to Jan Cumps +5
    touristic info: the walk was partly through the Louis Bertrandlaan. One of the prettiest lanes of the Brussels district. It's a protected view since 2020. source: https://www.bruxellesbavard.be/nl…
  • Jan Cumps
    Jan Cumps over 3 years ago in reply to shabaz +4
    Has your MKR board worked for any non-LoRaWAN communication, e.g. just plain LoRa? I suppose it could be a faulty MKR board. Yes they are functional. I have two MKR WAN 1310s, and they can perfectly…
Parents
  • shabaz
    shabaz over 3 years ago

    Hi Jan,

    What is in thingProperties.h? I can't see from the user docs where it suggests what to type in there, I may have missed it. Is that the only config file, or any other config elsewhere too?

    Could you paste it (with any sensitive stuff removed), in case anything can be spotted?

    Also, is it  just one order code for the MKR WAN, for both 868 and 915 MHz? Arduino, and Murata site is silent on that.. according to the schematic, the MKR board uses Murata CMWX1ZZABZ which uses the Semtech SX1276 chip, and I was wondering how they matched it to both 915 and 868 MHz, usually such wideband matching would require a more expensive design than if they just had two separate order codes for US and EU. 

    It could be worth buying a low-cost ready-made LoRaWAN device for your region band, just to be 100% sure that it is a MKR issue and not a coverage issue (as you say, coverage should be very good where you are according to what you mention). There are Dragino LoRaWAN sensors, they are reasonable price, and I've confirmed they work with TTN (it is 868 MHz in UK), maybe only slightly more expensive than the MKR, I've not checked prices.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Jan Cumps
    Jan Cumps over 3 years ago in reply to shabaz

    There are the properties and secret files:

    What is in thingProperties.h? I can't see from the user docs where it suggests what to type in there, I may have missed it. Is that the only config file, or any other config elsewhere too?

    These files are automatically generated by Arduino Cloud, based on things you answer in the Thing Creation Wizard, and partly by values that The Arduino registry process retrieves from TTN while completing that same wizard:

    Properties has, next to the variable I created, also the frequency. I selected the Europe range:

    image

    Secrets contain the keys that are relevant to connect to the correct app (geberated by Arduino when creating the first thing) on TTN

    image

    It could be worth buying a low-cost ready-made LoRaWAN device for your region band, just to be 100% sure that it is a MKR issue and not a coverage issue .

    Yes. I haven' made up my mind yet if I'll use TTN. This was a first attempt to evaluate.
    I'm actually looking for a solution that connects to AWS or Azure Cloud.

    Possibly with my own gateway. I have one currently that I can integrate of the internet with both AWS and Azure.
    And that supports BLE sensors.
    I could try to add sub-1 GHz / LoraWAN sensor collection.

    What I would not get is the coverage outside my own gateway's reach then.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 3 years ago in reply to Jan Cumps

    I see.. I didn't realize you were provisioning from an Arduino portal. I looked at the documentation a bit more, and it suggests you have access to the TTN portal too. What does the device config look like, if you can check it on the TTN portal? There's only a few fields there, I guess you have already checked them out, if you have access. Otherwise if you're not sure of any field but if you have access to that TTN portal, if you can paste a screenshot of that, I can take a look if you like, however I'm sure you would examine it to a high standard anyway.

    Maybe there is a slim chance the firmware on that Murata CMWX1ZZABZ  could need upgrading. There was some code here that displays the version:

    https://www.arduino.cc/en/Reference/MKRWANVersion

    But, also, the code there looks like it is for a generic LoRaWAN configuration, i.e. it could allow you to directly configure in TTN, and bypass the Arduino portal configuration, in case there is something weird going on between Arduino cloud and TTN cloud. Seems a long shot though.. but I guess eliminates one component (the Arduino cloud) just to reduce the possible things that could be causing this.

    It is also possible to confirm transmissions are being sent, and see if the band selection is functioning, this is possible with a RTL-SDR dongle (any cheap one will do, I am using one so cheap the USB connector barely works, it has to be pushed in just right. However they have gone up in price over the years, the typical price nowadays is maybe 25-30 Euro, but they used to cost half this) and SDR Sharp software. This is what it looks like when a Dragino device sends a packet, it is the wide mark indicated with the green arrow (not the narrower width one indicated with red arrow). The frequency will change, but it's possible to set up a wide span like this in order to spot it.

    image

    When the network is joined, there is more data transfer, as shown here:

    image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • Jan Cumps
    Jan Cumps over 3 years ago in reply to shabaz

    I have access to the portal, specific for the Arduino things. When you register a first thing via Arduino cloud, it generates a TTN account, and an Application, for you in the background.
    I have 2 things registered, identically set up.

    Arduino Cloud and TTN setup happen in parallel. When you successfully registered a thing, it's registered on both sides.
    The registry does not involve LoRaWAN traffic though - it's all background process by the Arduino and the TTN backbone. There is a sketch uploaded to the MKRs during that time, but that's utilitarian - to configure the device.
    The final sketch you make, with your functionality to exchange telemetry, is done at a later step. It's at that step that I get no connection.

    Arduino setup: DEVICE (actual HW):

    image

    Arduino setup: THING (the UNIT you talk to, layer over the device):

    image

    The variable is the telemetry data to exchange. Device is a link to the THING above.
    The network data are the attributes that are retrieved when the wizard registers the thing on TTN:

    image

    Now the result of this activity on TTN:

    TTN Console with APP and account (created once when the first THING is registered:

    image

    TTN Application, with two END Points (these are the 2 MKR LANs I registered via Arduino Cloud):image

    TTN THING, the same one I showed above in the Azure Cloud setup:

    image

    It shows under the device header: No activity yet:

    image

    And that's an indication that this registered device hasn't connected to TTN once, via radio.

    For the investigation with the SDR, I'll need to do more work: new laptop and the software not yet installed ...

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • Jan Cumps
    Jan Cumps over 3 years ago in reply to shabaz

    Checking the second part of your comments: the Version.
    I loaded the sketch you refered too. Here's the output:

    Welcome to MKR WAN 1300/1310 first configuration sketch
    Register to your favourite LoRa network and we are ready to go!
    Your module version is: ARD-078 1.2.0
    Please make sure that the latest modem firmware is installed.
    To update the firmware upload the 'MKRWANFWUpdate_standalone.ino' sketch.
    Your device EUI is: a***********7
    Are you connecting via OTAA (1) or ABP (2)?
    Enter your APP EUI
    Enter your APP KEY

    The result is the same, output:

    Something went wrong; are you indoor? Move near a window and retry.

    I'm checking the firmware (I thought I remember that this was already done by the Arduino Cloud Wizard when registering, but unsure):

    Compilation complete.
    Atmel SMART device 0x10010005 found
    Device : ATSAMD21G18A
    Chip ID : 10010005
    Version : v2.0 [Arduino:XYZ] Apr 30 2019 12:41:57
    Address : 8192
    Pages : 3968
    Page Size : 64 bytes
    Total Size : 248KB
    Planes : 1
    Lock Regions : 16
    Locked : none
    Security : false
    Boot Flash : true
    BOD : false
    BOR : false
    Arduino : FAST_CHIP_ERASE
    Arduino : FAST_MULTI_PAGE_WRITE
    Arduino : CAN_CHECKSUM_MEMORY_BUFFER
    Erase flash
    done in 0.841 seconds

    Write 119852 bytes to flash (1873 pages)

    [= ] 3% (64/1873 pages)
    [== ] 6% (128/1873 pages)
    [=== ] 10% (192/1873 pages)
    [==== ] 13% (256/1873 pages)
    [===== ] 17% (320/1873 pages)
    [====== ] 20% (384/1873 pages)
    [======= ] 23% (448/1873 pages)
    [======== ] 27% (512/1873 pages)
    [========= ] 30% (576/1873 pages)
    [========== ] 34% (640/1873 pages)
    [=========== ] 37% (704/1873 pages)
    [============ ] 41% (768/1873 pages)
    [============= ] 44% (832/1873 pages)
    [============== ] 47% (896/1873 pages)
    [=============== ] 51% (960/1873 pages)
    [================ ] 54% (1024/1873 pages)
    [================= ] 58% (1088/1873 pages)
    [================== ] 61% (1152/1873 pages)
    [=================== ] 64% (1216/1873 pages)
    [==================== ] 68% (1280/1873 pages)
    [===================== ] 71% (1344/1873 pages)
    [====================== ] 75% (1408/1873 pages)
    [======================= ] 78% (1472/1873 pages)
    [======================== ] 82% (1536/1873 pages)
    [========================= ] 85% (1600/1873 pages)
    [========================== ] 88% (1664/1873 pages)
    [=========================== ] 92% (1728/1873 pages)
    [============================ ] 95% (1792/1873 pages)
    [============================= ] 99% (1856/1873 pages)
    [==============================] 100% (1873/1873 pages)
    done in 0.916 seconds

    Verify 119852 bytes of flash with checksum.
    Verify successful
    done in 0.107 seconds
    CPU reset.

    --------------------------
    upload complete.

    Now I'll upload the test again...

    Done, and it didn't change (seeing the output of the updater above, I'm now sure that I did it before).

    Something went wrong; are you indoor? Move near a window, then reset and retry.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 3 years ago in reply to Jan Cumps

    Hi Jan,

    Your screenshot below looks correct (i.e. it is what I expected to see based on my non-Arduino TTN config), it is unlikely to be a TTN configuration issue I guess. Has your MKR board worked for any non-LoRaWAN communication, e.g. just plain LoRa? I suppose it could be a faulty MKR board.. I have only a couple of Arduino Uno and an Arduino Mega, and one of the Uno was faulty from the factory. But it is still a long shot, still more likely that Arduino have a library bug or firmware issue I suppose : (

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • shabaz
    shabaz over 3 years ago in reply to Jan Cumps

    Hi Jan,

    Your screenshot below looks correct (i.e. it is what I expected to see based on my non-Arduino TTN config), it is unlikely to be a TTN configuration issue I guess. Has your MKR board worked for any non-LoRaWAN communication, e.g. just plain LoRa? I suppose it could be a faulty MKR board.. I have only a couple of Arduino Uno and an Arduino Mega, and one of the Uno was faulty from the factory. But it is still a long shot, still more likely that Arduino have a library bug or firmware issue I suppose : (

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Jan Cumps
    Jan Cumps over 3 years ago in reply to shabaz

    Has your MKR board worked for any non-LoRaWAN communication, e.g. just plain LoRa? I suppose it could be a faulty MKR board.

    Yes they are functional. I have two MKR WAN 1310s, and they can perfectly communicate together and exchange data, over a decent distance. Those are the same ones that I try with TTN here.

    edit: also, lack of a matching antenna will not be the bottleneck Slight smile

    image

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • 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