Author Topic: LMIC-library and Moteino Mega  (Read 14902 times)

ursm

  • Newbie
  • *
  • Posts: 8
  • Country: ch
LMIC-library and Moteino Mega
« on: May 19, 2016, 06:03:43 AM »
Hi
in TheThingsNetwork https://thethingsnetwork.org/ we often use the LMIC-Library https://github.com/tftelkamp/arduino-lmic-v1.5
Unfortunately the MoteinoMega misses 3 wires to make it directly usable.
Question: do you plan to build a LoRaWAN compatible board with the needed wires?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #1 on: May 19, 2016, 01:24:50 PM »
UPDATE: the LMIC variant of MoteinoMEGA can now be ordered from here (choose LMIC variant option): https://lowpowerlab.com/shop/product/119

I think someone else asked a similar question but I'm sure the wiring was different, in their app they needed one extra wire. So i'm puzzled, should I start planning to make a different board every time a new library uses different wiring?
Is it not reasonable to wire the extra pins like we see in the photo above?
I already have a dozen variants of Moteinos, one yet to be released and it feels like I spread my wings very far already. The problem is the more variants I try to stock the larger stocks of chips and parts I have to have on hand, and the days of hand assembly are gone when I could make 5 units at a time if that's all I wanted. Sorry if that sounds like complaining  ;)

ursm

  • Newbie
  • *
  • Posts: 8
  • Country: ch
Re: LMIC-library and Moteino Mega
« Reply #2 on: May 19, 2016, 05:09:05 PM »
hi Felix
thanks for answering so fast. Yes, I could anticipate what your answer would be;
but like a lot of your customers using RadioHead for their 'private' network, there will be a huge community use (the sole) LMIC library for their sensors on LoRaWan (TTN).
And it's fun, we get some of your LoRa-boards, because they fulfilled (except the needed wires) most of our requirements for a solid basic infrastructure building our sensors on top of it.
The connections of the additional (3 or 4) wires are, as from my opinion, not crucial. I made it so because it was convenient.
The definition in the program is as:
// Pin mapping
const lmic_pinmap lmic_pins = {
  .nss = 4,
  .rxtx = LMIC_UNUSED_PIN,      // (5) should be foreseen for later release (ok for A, needed for C)
  .rst = 3,
  .dio = {2, 1, 0},
};

I would not enforce you to build a new version, but probably you should listen to the LoRa community before making you decision.
Thanks in advance, urs

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #3 on: May 20, 2016, 08:13:36 AM »
Thanks for the suggestion.
I'd like to see more requests at the very least. And consistency.

gonzalocasas

  • Newbie
  • *
  • Posts: 1
  • Country: ch
Re: LMIC-library and Moteino Mega
« Reply #4 on: May 20, 2016, 08:59:55 AM »
Hi Felix,

I'm also on the things network community and I agree with @ursm in that it would be great to have the moteino work without having to make changes to it. Maybe something along the lines of what Dragino v1.3 LoRa shield does with jumpers could work for moteino as well?

Cheers
Gonzalo

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #5 on: May 20, 2016, 09:23:49 AM »
Maybe solder jumpers?

dbrgn

  • Newbie
  • *
  • Posts: 1
  • Country: ch
Re: LMIC-library and Moteino Mega
« Reply #6 on: May 20, 2016, 09:38:10 AM »
I'm also interested in building nodes for the things network, and the Moteino Mega looks great to get started.

I'd like to order a few of them, but would also be happy if the soldering jumper wires wouldn't be required.

lukas

  • Newbie
  • *
  • Posts: 2
  • Country: ch
Re: LMIC-library and Moteino Mega
« Reply #7 on: June 02, 2016, 10:49:16 AM »
I've sodered up 15 so far, and would certainly order a couple more of a "LMIC" version :-)

lukas

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #8 on: June 28, 2016, 04:58:23 PM »
How imperative are the wirings to D0 and D1?
For instance I am wondering if routing DIO1 and DIO2 to D21 and D22 which are much closer by.

This is what it looks like for D0 and D1, these are solder jumpers, you'd have to still solder them but it allows the use of the board without hardwired LMIC:

ursm

  • Newbie
  • *
  • Posts: 8
  • Country: ch
Re: LMIC-library and Moteino Mega
« Reply #9 on: June 29, 2016, 05:19:09 AM »
Hi Felix
That sample looks great.   :)
1.) I put your question to Thomas, the creator of the LMIC library. He should know it best.
     Hopefully I get an answer quickly.
2.) I'm a little confused, looking at the  \MoteinoMEGA\pins_arduino.h. There a DIL40 package is shown and that package does not correspond to the QFN package you're using.
so to what signals/pins do D20/D21 be assigned?
3.) It would be nice having closed solder bridges, but that's a minor issue.
4.)  .nss = 4 & .rst = 3  are connected too? (It's not clear on the sample)

regards, Urs

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #10 on: June 29, 2016, 11:37:36 AM »
@ursm:

2) Don't worry about the pins declaration, that is based on an older pins file, nothing has changed. The package used on the MEGA is TQFP44, not QFN.
3) I followed your first post/photo wiring where you soldered DIO1=>D0, DIO2=>D1, RST => D3.
My proposal is to change these to: DIO1=>D22, DIO2=>D21, RST => D3. The reason is much shorter routing which helps with signal integrity.
4) Yes, NSS => D23 (as before) and RST => D3 as you proposed.

Also, someone else suggested I add a SOT23 footprint for this I2C device which allows EUI64 unique global addressing: http://ww1.microchip.com/downloads/en/DeviceDoc/20002124F.pdf
This one would require more work so are you familiar with this type of chip and whether the LMIC lib supports something like that or how it would be used?

ursm

  • Newbie
  • *
  • Posts: 8
  • Country: ch
Re: LMIC-library and Moteino Mega
« Reply #11 on: June 29, 2016, 03:03:13 PM »
@Felix
I got an answer from Thomas, so you can do it as you suggested.
about the topic of EUI64: I don't think, that it's no need having a hardware based EUID. It's possible to get some of them as "soft bulk"
It's not supported by the library and must be programmed in user space and then given to the LMIC to work with it.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #12 on: June 29, 2016, 10:23:36 PM »
@Felix
I got an answer from Thomas, so you can do it as you suggested.
about the topic of EUI64: I don't think, that it's no need having a hardware based EUID. It's possible to get some of them as "soft bulk"
It's not supported by the library and must be programmed in user space and then given to the LMIC to work with it.

Great, so I rewired them this way, more obvious labels also:


How is this library different than things-network: http://www.research.ibm.com/labs/zurich/ics/lrsc/lmic.html
That supposedly supports EUI64, hence the other request to add a pad for that device. Trying to figure that one out then this LMIC variant would be ready for fabbing.

ursm

  • Newbie
  • *
  • Posts: 8
  • Country: ch
Re: LMIC-library and Moteino Mega
« Reply #13 on: June 30, 2016, 04:54:45 AM »
That supposedly supports EUI64, hence the other request to add a pad for that device.
Please use this https://github.com/matthijskooijman/arduino-lmic updated library.
The DEVEUI must be changed in the user program (example/ttn.ino)
   static const u4_t DEVADDR = 0x03FF0001 ; // <-- Change this address for every node!
and the SX variant in /src/lmic/config.h, which is newerdays set to SX1276 = RFM95W    #define CFG_sx1276_radio 1

Good luck!

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #14 on: June 30, 2016, 09:31:05 PM »
Ok here are the latest changes.

Pin mappings (through non-bridged solder jumpers):
DIO1=>D22, DIO2=>D21, RST => D3

This also includes the EUI-64 chip footprint for those interested.


« Last Edit: July 02, 2016, 10:57:38 PM by Felix »

ursm

  • Newbie
  • *
  • Posts: 8
  • Country: ch
Re: LMIC-library and Moteino Mega
« Reply #15 on: July 03, 2016, 04:31:36 AM »
very well made!
thanks for picking up our ideas

looking forward seeing it in the store  :)

Charly86

  • Jr. Member
  • **
  • Posts: 74
  • Country: fr
Re: LMIC-library and Moteino Mega
« Reply #16 on: July 04, 2016, 07:00:23 PM »
Guys,

I proposed a software fix for LIMC to works without connecting DIO0/DIO1 and DIO2, since LIMC does not put device in sleep mode and just scan port change, device is wot waked by hardware IRQ
So all can be done in soft just pooling RFM IRQ register, works fine on my ESP8266 and should be the case for Moteino Mega ;-)

See https://github.com/matthijskooijman/arduino-lmic/issues/24/

But your EUI64 chip on board rocks !!!

lukas

  • Newbie
  • *
  • Posts: 2
  • Country: ch
Re: LMIC-library and Moteino Mega
« Reply #17 on: July 13, 2016, 09:41:22 AM »
Great work, Felix, looking forward to the new Moteinos! RE library: this one https://github.com/matthijskooijman/arduino-lmic just uses 20k, when you disable JOIN, PING and BEACONS in config.h. So the R4 ones work great now, just in case you wan to upgrade that pcb as well :)

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #18 on: July 29, 2016, 08:38:54 AM »
PCBs arrived and I assembled a panel.

UPDATE: the LMIC variant of MoteinoMEGA can now be ordered from here (choose LMIC variant option): https://lowpowerlab.com/shop/product/119

If you want to order these before they become "official" just order the MoteinoMEGA-LoRa and mention in the comments you want the LMIC/EUI variant and I will send you this, and I will include the EUI chip for you to solder if you want the EUI64 MAC.



Charly86

  • Jr. Member
  • **
  • Posts: 74
  • Country: fr
Re: LMIC-library and Moteino Mega
« Reply #19 on: July 29, 2016, 08:51:22 AM »
Hey, nice boards Felix, Love the silk pin indication of RFM module, much easier to place it ;-)

TomWS

  • Hero Member
  • *****
  • Posts: 1924
Re: LMIC-library and Moteino Mega
« Reply #20 on: July 29, 2016, 09:58:15 AM »
Nice configurability with very clearly marked options.  I like that you put the serial eeprom on it also. 

So this board will accept an RFM69HCW?  Probably will be my go to Mega if that's the case.

Tom

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #21 on: July 29, 2016, 10:01:57 AM »
Thanks Tom,
Yes it will take the RFM69HCW (equivalent to 69HW but with LoRa pinout - the "C" in HCW meaning "pin backwards compatible").
Basically this board will be the new MoteinoMEGA-LoRa R2.

I need some extra logistics before I can pick & place the EUI on there so until then the EUI64 chip & 4.7k resistors come separately in a bag  ;)

ursm

  • Newbie
  • *
  • Posts: 8
  • Country: ch
Re: LMIC-library and Moteino Mega
« Reply #22 on: July 29, 2016, 01:38:40 PM »
PCBs arrived and I assembled a panel.
If you want to order these before they become "official" just order the MoteinoMEGA-LoRa and mention in the comments you want the LMIC/EUI variant and I will send you this, and I will include the EUI chip for you to solder if you want the EUI64 MAC.

Hi Felix
It would be a pleasure testing two of the "preshop" boards.
You get an order from me.
Please RFM95 , flash and EUI64

Thanks for finishing our ideas to a new version

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #23 on: July 29, 2016, 03:27:09 PM »
You're welcome and thanks for the order.
Below's a sample native code that will read the MAC address from the included Microchip 24AA02E64 EEPROM:

Code: [Select]
#include <Wire.h>         //http://arduino.cc/en/Reference/Wire

void setup(void)
{
  Serial.begin(115200);
  Serial.print("wire init...");
  Wire.begin();
  Serial.println("done");
}

void loop(void)
{
  Serial.println("Loop...");
  readEEPROM_MAC(0x50, 0xF8);  //0x50 is the I2c address, 0xF8 is the memory address where the read-only MAC value is
  delay(2000);
}
 
void readEEPROM_MAC(int deviceaddress, byte eeaddress)
{
  Wire.beginTransmission(deviceaddress);
  Wire.write(eeaddress); // LSB
  Wire.endTransmission();
  Wire.requestFrom(deviceaddress, 8); //request 8 bytes from the device

  while (Wire.available()){
    Serial.print("0x");
    Serial.print(Wire.read(), HEX);
    Serial.print(" ");
  }
  Serial.println();
}

Should produce this output:


wire init...done
Loop...
0x0 0x4 0xA3 0xB 0x0 0x19 0x7F 0xB7


The bold part is the MICROCHIP identifier (constant), the italic part is the variable part (unique with each chip).
« Last Edit: July 29, 2016, 05:07:47 PM by Felix »

galluta

  • Newbie
  • *
  • Posts: 1
  • Country: us
Re: LMIC-library and Moteino Mega
« Reply #24 on: August 26, 2016, 12:32:01 PM »
@Felix

Just got a new Moteino Mega. I followed the this thread but I am not sure what pins to soder.

Should I soder these?

Pin mappings (through non-bridged solder jumpers):
DIO1=>D22, DIO2=>D21, RST => D3


Also on the RFM95 shouldn't it be DIO0 and DIO1?

Thanks

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #25 on: August 26, 2016, 01:25:47 PM »
Should I soder these?

Pin mappings (through non-bridged solder jumpers):
DIO1=>D22, DIO2=>D21, RST => D3

Also on the RFM95 shouldn't it be DIO0 and DIO1?

Should you? It's up to you. The board works exactly the same as before, but it offers you an easy way to connect those DIOs/RST to given pins without using wires.
DIO0 is always hardwired to D2 already.

ursm

  • Newbie
  • *
  • Posts: 8
  • Country: ch
Re: LMIC-library and Moteino Mega
« Reply #26 on: August 26, 2016, 02:16:22 PM »
Just got a new Moteino Mega.
sorry that I was so lazy replying here.
we made good experience with the new board and used for the LMIC library

Code: [Select]
/* Pin mapping                           for the new Moteino Mega R2 with solder bridges*/
const lmic_pinmap lmic_pins = {
  .nss = 4,
  .rxtx = LMIC_UNUSED_PIN,
  .rst = 3,
  .dio = {2, 22, 21},                      // DIO0, 1, 2
};

thanks Felix for the new board layout
« Last Edit: August 29, 2016, 08:59:08 AM by Felix »

johnmiddleton

  • Newbie
  • *
  • Posts: 4
  • Country: gb
Re: LMIC-library and Moteino Mega
« Reply #27 on: October 09, 2016, 12:23:31 PM »
Hi - what do the marked solder bridges do - sorry for the noob question

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #28 on: October 10, 2016, 08:23:02 AM »
Hi - what do the marked solder bridges do - sorry for the noob question

They are SMD 0805 pads for adding passives. Generally you don't need to worry about those. They are marked with || which would suggest they are for capacitors.

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: LMIC-library and Moteino Mega
« Reply #29 on: October 10, 2016, 02:37:09 PM »
They are SMD 0805 pads for adding passives. Generally you don't need to worry about those. They are marked with || which would suggest they are for capacitors.

Interesting, the 3.3V one is obvioulsy for a decoupler, but a cap on the antenna? Was that some attempt at matching (or using 915MHz modules for 868MHz or something)?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #30 on: October 10, 2016, 02:39:52 PM »
Interesting, the 3.3V one is obvioulsy for a decoupler, but a cap on the antenna? Was that some attempt at matching (or using 915MHz modules for 868MHz or something)?
I put a cap pad cause that felt appropriate in Eagle. Could be used with a cap or inductor for matching I guess. I never used these myself, someone asked for these pads a while back.

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: LMIC-library and Moteino Mega
« Reply #31 on: October 10, 2016, 02:54:50 PM »
I put a cap pad cause that felt appropriate in Eagle. Could be used with a cap or inductor for matching I guess. I never used these myself, someone asked for these pads a while back.
OK. I suppose one possible use for that footprint might be to fit a 50R load resistor and not fit the antenna, that'll protect the output during development. Also the small stub would radiate a very little possibly simulating a distant transmitter.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #32 on: October 10, 2016, 03:06:27 PM »
@perky, great ideas. I like the distant node one especially.
With the 50R I could use a pogo pin to a permanently fixed 50R but I guess the pogo pin could act as an antenna too perhaps. Not a huge deal though since in my post production testing I do a conditional output test with ATC as well so the output is very brief just enough to ensure there's TX/RX working.

alexsh1

  • Jr. Member
  • **
  • Posts: 51
  • Country: gb
Re: LMIC-library and Moteino Mega
« Reply #33 on: October 13, 2016, 05:47:48 AM »
@Felix - outstanding work! I have just place an order for the LMIC Mega

lafleur

  • Newbie
  • *
  • Posts: 4
Re: LMIC-library and Moteino Mega
« Reply #34 on: November 24, 2016, 09:41:13 AM »
Felix

Can you post the schematic in PDF for the Mega-LoRa board...

Thanks

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #35 on: November 25, 2016, 08:52:58 AM »
Here:


kreeve

  • Newbie
  • *
  • Posts: 6
Re: LMIC-library and Moteino Mega
« Reply #36 on: March 06, 2018, 03:35:42 PM »
I realize this this is a old thread, but I could use some insights.

I am familiar with LoRa as implemented on the Moteino boards, and have used it successfully.  I now have a Things Network Gateway running and connected.  My next project is to get a node connected. I do not have any experience with Nodes for the Things Network.  I have read through this thread, and I think I understand what I need to do.

#1  solder the three pads to connect the pins from LoRa module for use with LMIC library

#2 use this LMIC Library.   https://github.com/matthijskooijman/arduino-lmic

#3 change settings in the library settings file.

My main question is do I need the EUI-64?  What is it for?

Thanks for any insights.


Is there anything thing that has changed since this thread?
Kevin

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #37 on: March 07, 2018, 10:11:47 AM »
My main question is do I need the EUI-64?  What is it for?

Is there anything thing that has changed since this thread?
If you have to ask, my opinion is either you have to ask the LMIC library creators to make sure you have the best accurate answer, or you don't need it.
Nothing has changed from a hardware perspective since this thread has last posted.
The LMIC is simply an option that was added because of the request from that thread, and you can get the parts if you need them directly from LowPowerLab ($1 per unit) rather than buy/ship them from a separate location.

kreeve

  • Newbie
  • *
  • Posts: 6
Re: LMIC-library and Moteino Mega
« Reply #38 on: March 22, 2018, 06:10:57 PM »
I am using this code on a Moteino Mega USB and the code loads and runs.  I see the Loop...   but not getting any value back.  Nothing of the wire.read.
I am basically trying to figure out how to get the Device EUI from the Moteino to use with the LMIC library stuff for the things network.   



You're welcome and thanks for the order.
Below's a sample native code that will read the MAC address from the included Microchip 24AA02E64 EEPROM:

Code: [Select]
#include <Wire.h>         //http://arduino.cc/en/Reference/Wire

void setup(void)
{
  Serial.begin(115200);
  Serial.print("wire init...");
  Wire.begin();
  Serial.println("done");
}

void loop(void)
{
  Serial.println("Loop...");
  readEEPROM_MAC(0x50, 0xF8);  //0x50 is the I2c address, 0xF8 is the memory address where the read-only MAC value is
  delay(2000);
}
 
void readEEPROM_MAC(int deviceaddress, byte eeaddress)
{
  Wire.beginTransmission(deviceaddress);
  Wire.write(eeaddress); // LSB
  Wire.endTransmission();
  Wire.requestFrom(deviceaddress, 8); //request 8 bytes from the device

  while (Wire.available()){
    Serial.print("0x");
    Serial.print(Wire.read(), HEX);
    Serial.print(" ");
  }
  Serial.println();
}

Should produce this output:


wire init...done
Loop...
0x0 0x4 0xA3 0xB 0x0 0x19 0x7F 0xB7


The bold part is the MICROCHIP identifier (constant), the italic part is the variable part (unique with each chip).

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #39 on: March 23, 2018, 08:30:05 AM »
I am using this code on a Moteino Mega USB and the code loads and runs.  I see the Loop...   but not getting any value back.  Nothing of the wire.read.
I am basically trying to figure out how to get the Device EUI from the Moteino to use with the LMIC library stuff for the things network.

First make sure to verify the chip is soldered correctly along with the I2C pullups (4.7k SMD chip resistors provided with the LMIC option). If you show me a photo of the board/setup I can see if anything looks out of order.
The example code you quoted should work just fine. Once that works, then you are probably ready to use it with the ThingsNetwork (not sure how that is done though).

JohnO

  • Newbie
  • *
  • Posts: 27
Re: LMIC-library and Moteino Mega
« Reply #40 on: June 15, 2018, 06:17:48 AM »
Thank you for your work Felix. I would like to try to build a Moteino MEGA USB with the LMIC chip. Are there any Eagle files for the MEGA USB with LMIC?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #41 on: June 18, 2018, 02:45:51 PM »
Not shared at this time, but you will have a lot of trouble doing this manually, it's a complex board.
Unless maybe if you plan to use a stainless steel stencil and reflow oven?

JohnO

  • Newbie
  • *
  • Posts: 27
Re: LMIC-library and Moteino Mega
« Reply #42 on: June 21, 2018, 12:19:23 PM »
Thank you for the advice Felix. I don't have a reflow oven and don't plan to get into stencils anytime soon.

flok

  • Newbie
  • *
  • Posts: 5
    • www.vanheusden.com
Re: LMIC-library and Moteino Mega
« Reply #43 on: August 24, 2018, 04:18:39 PM »
Please use this https://github.com/matthijskooijman/arduino-lmic updated library.
The DEVEUI must be changed in the user program (example/ttn.ino)
   static const u4_t DEVADDR = 0x03FF0001 ; // <-- Change this address for every node!
and the SX variant in /src/lmic/config.h, which is newerdays set to SX1276 = RFM95W    #define CFG_sx1276_radio 1

Hi,

I've got one of these red lora usb moteino boards - lora-r5-usb it says.

Now when I change all the required addresses (been there before with an other type of board and there I got it right  :)) it starts up with:

Starting                                                                                                   
FAILURE                                                                                                     
/home/folkert/Projects/sketchbook/libraries/arduino-lmic/src/lmic/radio.c:689                               

What should I do?
(I've got 2 of these boards and both give this error)
« Last Edit: August 24, 2018, 04:20:25 PM by flok »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #44 on: August 25, 2018, 06:40:34 PM »
Maybe ask whoever made the lmic library why this would happen?

everhamme

  • Newbie
  • *
  • Posts: 2
Re: LMIC-library and Moteino Mega
« Reply #45 on: February 14, 2019, 05:43:10 PM »
Note:  I got LMIC working with Moteino Mega..

0. solder bridges for DIO1, DIO2, and RST
1. use LMIC library from here https://github.com/matthijskooijman/arduino-lmic
2. open src/lmic/config.h and set correct configuration (US915 for me)..  i also set
3. for ABP example set your keys..   use this pinmap

Code: [Select]
const lmic_pinmap lmic_pins = {
    .nss = 4,
    .rxtx = LMIC_UNUSED_PIN,
    .rst = 3,
    .dio = {2, 22, 21},
};

4.  for OTAA example set your keys (make sure to REVERSE order for APPEUI and DEVEUI)
5. for OTAA also after the LMIC_reset();  add these lines

Code: [Select]
  LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100);
  LMIC_selectSubBand(1);
  LMIC.dn2Dr = DR_SF9;
  LMIC_setLinkCheckMode(0);
  LMIC_setDrTxpow(DR_SF7,14);
« Last Edit: February 14, 2019, 09:40:24 PM by Felix »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #46 on: February 14, 2019, 09:41:33 PM »
everhamme,
Great, thanks for sharing that!

So no other hardware needed? Like the EUI64 chip for MACID?
Someone else was suggesting the FLASH-MEM (which incidentally also has a hardcoded 64bit ID) could be used the same way.

everhamme

  • Newbie
  • *
  • Posts: 2
Re: LMIC-library and Moteino Mega
« Reply #47 on: February 15, 2019, 01:07:31 PM »
everhamme,
Great, thanks for sharing that!

So no other hardware needed? Like the EUI64 chip for MACID?
Someone else was suggesting the FLASH-MEM (which incidentally also has a hardcoded 64bit ID) could be used the same way.

Not needed unless you want to programatically use the built in chip to reference/store  keys to allow for faster joining or if you're rolling out a product that uses hard-wired keys......  The LoRaWAN 1.1 spec does require that NSK and ASK keys get stored so if you restart/power down the device you don't need to initiate another OTAA join, which consumes resources and needs more bandwidth. But this isn't enforced yet.. so you can initiate as many OTAA joins as you'd like.     

I do like the implementation of this "provisioning" feature that MCCI uses on their LoRa devices ...https://github.com/mcci-catena/Catena-Sketches/tree/master/catena4450m101_sensor#lorawan-provisioning.  You don't need to compile and upload custom keys.. you can just use a terminal window to copy/paste keys.

MCCI takes their products a little further down the firmware/library side to ensure easy implementation for folks. 
« Last Edit: February 15, 2019, 01:18:27 PM by everhamme »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6279
  • Country: us
    • LowPowerLab
Re: LMIC-library and Moteino Mega
« Reply #48 on: February 15, 2019, 01:18:00 PM »
Thank you for these extra details, I appreciate it.