Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1272 uno and error radio.c:659 #40

Closed
cyryllo opened this issue Sep 1, 2016 · 61 comments
Closed

1272 uno and error radio.c:659 #40

cyryllo opened this issue Sep 1, 2016 · 61 comments

Comments

@cyryllo
Copy link

cyryllo commented Sep 1, 2016

I use module sx1272 on uno and i get failure

Starting
FAILURE
/home/cyryl/Arduino/libraries/arduino-lmic-1.5.0-arduino-1/src/lmic/radio.c:659

@matthijskooijman
Copy link
Owner

Did you set the radio type in config.h to 1272? What version are you using exactly, since git master does not have an assert on that line...

@ubergesundheit
Copy link

ubergesundheit commented Sep 1, 2016

I am seeing the same error. It definitely worked last week. Since then I had some updates to the Arduino IDE Software.

I am using Arduino 1.6.11 from AUR on Arch.

Maybe this could be related?

Edit:
I am using the dragino LoRa Shield with sx1276
The error I am seeing is

FAILURE 
/root/Arduino/libraries/arduino-lmic-master/src/lmic/radio.c:689

@gizmocuz
Copy link

gizmocuz commented Sep 2, 2016

This issue could be related to the recently updated AVR board definitions.

If you are running AVR board defs > 1.6.11, downgrade to 1.6.11

Try downgrading this (tools->board->board manager, Arduino AVC Board, install 1.6.11)

There have been no code changes since more then 3 weeks, so i suspect the above

@ubergesundheit
Copy link

I tried with 1.6.11. Same error.

@JeffJam
Copy link

JeffJam commented Sep 2, 2016

I have seen this error before! It happened to me (also with a UNO) when my CS pin came loose. You might also want to check your lmic_pinmap to make sure you're specifying the correct pins.

HTH

@matthijskooijman
Copy link
Owner

I have seen this error before!

Note that the error is just a failed assertion, so it can mean various things depending on the filename and line number shown. Unless anyone seeing this error actually looks up the line mentioned in their version of the source (or at least says what version they are using), I can't really start to provide any advice on fixing this.

@hallard
Copy link

hallard commented Sep 2, 2016

@matthijskooijman is right, unless you show here what's on line 689 of radio.c and your LMIC pins definition of your sketch we're absolutely blind and we can't give any advice...

Did you changed the LMIC pins definition in your sketch to conform to Dragino shield wiring?

@ubergesundheit
Copy link

I use the latest version(90bc049) from this git repo. Currently the line is https://github.com/matthijskooijman/arduino-lmic/blob/master/src/lmic/radio.c#L689

I am somewhat sure this is related to an update with either the arduino ide or the avr boards as the same sketch worked last week. I also tried another board. It has the same issue

@matthijskooijman
Copy link
Owner

@ubergesundheit, it is possible your error is different from the one of the original reporter. In your case, the hardware is not detected as a 1276, which likely means that the SPI communication is failing. Regarding the Arduino update, 1.6.10 upgraded the compiler version, so it might very well be caused by that. I don't have any hardware handy to test now, though.

@matthijskooijman
Copy link
Owner

@ubergesundheit, it might be good to download an older copy of the Arduino IDE (1.6.9 for example) and see if it does work with that one now. If you download the zip version, there is no need to install anything, just run them side-by-side.

@cyberman54
Copy link

I got the same Error Message with identical Line number in Radio.c when trying to join by OTAA, using an Ideetron Nexus Board with ATmega328p. ABP with the same Code works. So the Error probably has some context with OTAA joining.

@hallard
Copy link

hallard commented Sep 4, 2016

@cyberman54
The error is when the stack is talking to RFM95 (or other) with SPI.
The error is because the version of module read from device does not match with the one it should receive, for SX1276 (RFM95) you should receive be 0x12 and for SX1272 it should be 0x22. It would be interesting to see what value you have, for this change in radio.c by adding a print before assert

#ifdef CFG_sx1276_radio
    ASSERT(v == 0x12 );
#elif CFG_sx1272_radio
    ASSERT(v == 0x22);
#else
#error Missing CFG_sx1272_radio/CFG_sx1276_radio
#endif

to

#ifdef CFG_sx1276_radio
    Serial.print("Expected 0x12 from SX1276, read=0x");
    Serial.println(v,HEX);
    ASSERT(v == 0x12 );
#elif CFG_sx1272_radio
    Serial.print("Expected 0x22 from SX1272, read=0x");
    Serial.println(v,HEX);
    ASSERT(v == 0x22);
#else
#error Missing CFG_sx1272_radio/CFG_sx1276_radio
#endif

An report here the value read, if it's 0x00 or 0xFF it's a Wiring problem or pin definition problem.

That said the problem is one of :

  • Arduino IDE changed things on SPI between version and SPI don't works anymore (I clearly don't think so)
  • Wiring to module is wrong (CLK/MOSI/MISO and also CS)
  • Wiring definition LMIC_pins is you example (the sketch) as not been adapted to the board you're using

Another issue could be that SPI is going to fast to your device, try switching to 4MHz by changing this line in hal.cpp with

//static const SPISettings settings(10E6, MSBFIRST, SPI_MODE0); // 10MHz
static const SPISettings settings(4E6, MSBFIRST, SPI_MODE0); // 4MHZ

@hallard
Copy link

hallard commented Sep 4, 2016

Looking at the schematics For Ideetron Nexus Board wiring should be in example sketch :

// Pin mapping
const lmic_pinmap lmic_pins = {
    .nss = 10,
    .rxtx = LMIC_UNUSED_PIN,
    .rst = LMIC_UNUSED_PIN,
    .dio = {4, 5, 7}
};

@hallard
Copy link

hallard commented Sep 4, 2016

Looking at the schematics For Dragino Lora Shield V1.2+ wiring should be in example sketch :

// Pin mapping Dragino Shield V1.2 and V1.3
const lmic_pinmap lmic_pins = {
    .nss = 10,
    .rxtx = LMIC_UNUSED_PIN,
    .rst = LMIC_UNUSED_PIN,
    .dio = {2, 6, 7}
};

If using Dragino Shield Version V1.1 DIO1 and DIO2 are not connected you need to

  • connect DIO1 and DIO2 with Wiring to D6 (DIO1) and D7 (DIO2) (code remains same as one above)
  • or use the pool IRQ version Pull Request and use the code below
// Pin mapping Dragino Shield V1.1
const lmic_pinmap lmic_pins = {
    .nss = 10,
    .rxtx = LMIC_UNUSED_PIN,
    .rst = LMIC_UNUSED_PIN,
    .dio = {2, LMIC_UNUSED_PIN, LMIC_UNUSED_PIN}
};

@cyberman54
Copy link

cyberman54 commented Sep 4, 2016

It came out, it was as simple pin mapping problem. I did not tailor the pin mappings in the example to the nexus board pin mapping properly. Sorry for issuing that here, my fault. Thank you for your support.

Here are my settings which are working:

// Pin mapping for Nexus with HopeRFM95
const lmic_pinmap lmic_pins = {
.nss = 10, // Connected to pin D10
.rxtx = LMIC_UNUSED_PIN, // Not needed on Nexus (Hope RFM95), switches RXTX antenna automatically
.rst = LMIC_UNUSED_PIN, // Not needed on Nexus (Hope RFM95)
.dio = {4, 5, 7}, // DIO0, 1, 2 connected to D4, D5, D7
};

@sergiuszm
Copy link

sergiuszm commented Nov 17, 2016

@hallard Hi Hallard, could you help me with Dragino LoRa Bee schematic which is placed on Parallax Xbee Adapter board schematic?

I have connected DIN to TX and DOUT to RX but I assume this is not correct.

@sergiuszm
Copy link

I was wrong as I though. I have found a better schema in which I have connected:

  • nss to pin 10
  • DIO1, DIO2 and DIO 3 to pins: 2, 3, 4
  • rst to pin 5

Unfortunately, I have the same problem still as in this thread.

@matthijskooijman
Copy link
Owner

Since the original reporter has not provided any additional information, and the comments have possibly strayed very far from the original issue (I suspect we have been talking about two different failed assertions here), I'm closing this issue. For future reference, note that two assertion error messages might be completely different issues if they refer to different lines. Hence saying "I also have an assert failure" does not really mean anything - be sure to include the line number and the contents of that line in any issue you create.

@hendabenayed
Copy link

I use module sx1276 on uno and i get failure

Starting
FAILURE
\Arduino\libraries\arduino-lmic-master\src\lmic\radio.c:689
any help please

@cyberman54
Copy link

Check your pinout and pin definitions.

@hendabenayed
Copy link

hendabenayed commented Mar 15, 2017

i use lora gps hat for arduino uno and i get the same error
Starting
FAILURE
\Arduino\libraries\arduino-lmic-master\src\lmic\radio.c:689
is this module compatible with arduino uno??

@Roberto6969
Copy link

I use http://www.dragino.com/products/lora/item/109-lora-bee.html with AT328 CPU (not UNO board, only CPU with minimum components).
When i send message for the first time it goes through, but in the second attempt get error FAILURE \Arduino\libraries\arduino-lmic-master\src\lmic\radio.c:660.
Resources of the AT328 are on the limit but i believe this is not the problem because Dragino sends first message.
Any idea how to send more messages than single one?

@navinyate
Copy link

navinyate commented Mar 15, 2017 via email

@cyberman54
Copy link

again: Check your DIO Pin mapping and ensure that pins needed for lmic are properly connected on your shield to RFM95 module.

@Roberto6969
Copy link

@cattvm Do you mean this part:
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 10, // 10 Connected to pin D10
.rxtx = LMIC_UNUSED_PIN, // 0
.rst = 9, // 9 Needed on RFM92/RFM95? (probably not)
.dio = {2, 6, 7}, // 2,6,7Specify pin numbers for DIO0, 1, 2
// connected to D4, D5, D7 on Arduino
};

@cyberman54 What does it mean "properly" connected? Is there any particular advice? Should be - for example - reset pin connected or not?

@cyberman54
Copy link

yes, this is the relevant part. The pin mappings in table must match pin mappings of used hardware. You should check if your LoRa shield has appropriate pin mapping and if it features all DIO pins which are needed by lmic. Consult IBM lmic 1.5 documentation pdf to find out which pins are needed.

Note: there is no standard to map the RFM95 pins to I/O ports of your CPU. Nearly every shield with RFM95 uses different pin mappings, and some (e.g. Adaptive Dragino shield) do not connect all pins which are necessary for using lmic. In this case you either need to tinker your hardware, or use another LoRaWAN software stack.

@cyberman54
Copy link

addendum: if you tinker your hardware to add pin mappings, be aware of different voltage levels of Arduino board (mostly 5V) and RFM95 LoRa shield (often 3,3V). If voltages do not match, you may want to use level shifter to protect your RFM95 from damage.

@cyberman54
Copy link

extract from IBM lmic 1.5 documentation:


3.1 HAL Interface
The following groups of hardware components must be supported:
 Four digital I/O lines are needed in output mode to drive the radio’s antenna switch (RX and
TX), the SPI chip select (NSS), and the reset line (RST).
 Three digital I/O lines are needed in input mode to sense the radio’s transmitter and receiver
states (DIO0, DIO1 and DIO2).
 A SPI unit is needed to read and write the radio’s registers.
 A timer unit is needed to precisely record events and to schedule new protocol actions.
 An interrupt controller is needed to forward interrupts generated by the digital input lines.

=> check, if your hardware fulfills these requirements
=> check, if pin mappings in your code match pin mappings of your hardware

With correct pin mappings this code works pretty good and stable. IBM lmic is a full LoRaWAN compliant software stack.

@cyberman54
Copy link

What type/brand of LoRa Module are you using?

  • Wiring?
  • Levelshifting?

@yotha
Copy link

yotha commented Apr 25, 2017

I am using a RFM95W 868Mhz RF Transceiver Module. I communicate in SPI between the module and the Arduino Uno.

@cyberman54
Copy link

SPI is not sufficient for using LMIC. You need additional interrupt/signalling wiring (at least D0, D1, D2). You to ensure that these connections between your RFM95 board and your Arduino are present, correctly annotated in LMIC code and that 3,3v/5v level shifting is installed.

@yotha
Copy link

yotha commented Apr 25, 2017

I am using D0,D1, D2, nss and rst on my wiring, this is my pin mapping
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 10, // 10 Connected to pin D10
.rxtx = LMIC_UNUSED_PIN, // 0
.rst = 7, // 7 Needed on RFM92/RFM95? (probably not)
.dio = {2, 3, 4}, // 2,3,4 Specify pin numbers for DIO0, 1, 2
// connected to D2, D3, D4 on Arduino
};
I have connected MISO, MOSI, SCK, GND and 3.3v of course.

@cyberman54
Copy link

Looks like a pin mapping issue, double-check your wiring.
And ensure that correct chip SX1272 vs. SX1276 is selected, like the author explained before in this thread.

@Roberto6969
Copy link

Use correct names of pins! On CPU ATmega328 is D5 (pin 11), D6 (pin 12) and D7 (pin 13). So in case you connect D0 of RFM95 to D5, D1 to D6 and D2 to D7 you should use: .dio = { 5, 6, 7} // pin names and not numbers. With other words: physical pin on Atmel328P no. 11 is D5 on Arduino UNO and if you connect this D5 from UNO to D0 on RFM95 you should use .dio = { 5, ... and so on.

@yotha
Copy link

yotha commented Apr 25, 2017

Ok so I replace the pin mapping by the physical pin number but now I got this error Failure : /Arduino/libraries/arduino-lmic-master/src/lmic/radio.c:689
This is my new pin mapping =>
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 16,
.rxtx = LMIC_UNUSED_PIN,
.rst = 13,
.dio = {4, 5, 6},
};

@trlafleur
Copy link

trlafleur commented Apr 25, 2017 via email

@Roberto6969
Copy link

Here is working config:
const lmic_pinmap lmic_pins = {
.nss = 10, // 10 Connected to pin D10
.rxtx = LMIC_UNUSED_PIN, // 0 For placeholder only, Do not connected on RFM92/RFM95
.rst = 9, // Needed on RFM92/RFM95???
.dio = {5, 6, 7}, // Specify pin numbers for DIO0, 1, 2 - connected to D5, D6, D7 on Arduino
};
Do not use physical pin numbers - use AVR names https://i.stack.imgur.com/dVkQU.jpg

@trlafleur
Copy link

trlafleur commented Apr 25, 2017 via email

@Roberto6969
Copy link

@trlafleur Would you be so kind and post link to CPU or development board you use? 328P is a little bit short for use LMIC library with some other sensor libraries

@trlafleur
Copy link

trlafleur commented Apr 25, 2017 via email

@yotha
Copy link

yotha commented Apr 25, 2017

All it's working now, I send a message and the gateway receive it.

Thx all of you, my problem was about of a bad welding..

@cyberman54
Copy link

i told you: double-check you wirings...

@ghost
Copy link

ghost commented Jul 9, 2017

Hello!
Can I help you?

I configure and connected with board Arduino
image
And result when I running:
image

It just stood there.
Is it waiting for the gateway's response?

@pierrot10
Copy link

I have seen this error before! It happened to me (also with a UNO) when my CS pin came loose. You might also want to check your lmic_pinmap to make sure you're specifying the correct pins.
HTH

I confirmed, I solved the problem by correcting the lmic_pinmap

@necessaryevil86
Copy link

necessaryevil86 commented May 13, 2020

Hello, I use an RFM95 module. I also get an error in the serial monitor:

Starting
FAILURE
D:\Dropbox\Arduino\libraries\arduino-lmic-master\src\lmic\radio.c:689

line 686 ... 694 in radio.c:

// some sanity checks, e.g., read version number
u1_t v = readReg(RegVersion);
#ifdef CFG_sx1276_radio //<--- line 689
ASSERT(v == 0x12 );
#elif CFG_sx1272_radio
ASSERT(v == 0x22);
#else
#error Missing CFG_sx1272_radio/CFG_sx1276_radio
#endif

Hardware:

Software:
Pin mapping:
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 10,
.rxtx = LMIC_UNUSED_PIN,
.rst = LMIC_UNUSED_PIN
,
.dio = {2, 8, 9},
};

Config.h line 8... 15

#define CFG_eu868 1
//#define CFG_us915 1
// This is the SX1272/SX1273 radio, which is also used on the HopeRF
// RFM92 boards.
//#define CFG_sx1272_radio 1
// This is the SX1276/SX1277/SX1278/SX1279 radio, which is also used on
// the HopeRF RFM95 boards.
#define CFG_sx1276_radio 1

Other
I tried Arduino IDE 1.8.12 and Arduino IDE 1.6.9 without any luck.
//edit
I set (soldered) the "jumper" on the diycon board to connect DIO0 to pin 2 on the Arduino.

Any ideas?

@pierrot10
Copy link

pierrot10 commented May 14, 2020

Hello necessaryevil86

This can be the error

.rst = LMIC_UNUSED_PIN
That should be connected to a pin of your Pro Mini.

I did as the following with an Adafruit Feather MO

CS/NSS => 5
RST => 6
IRQ (DIO_0) => 10
DIO_1 => 11
DIO_2 => 12

// Pin mapping
const lmic_pinmap lmic_pins = {
    .nss = 5,
    .rxtx = LMIC_UNUSED_PIN,
    .rst = 6,
    .dio = {10, 11, 12},
};

That works since a while.
I things, I tried with an Pro Mini (I do not remember) as well, 2 years ago, but I used the above mapping.

I hope it can help.

@necessaryevil86
Copy link

necessaryevil86 commented May 14, 2020

Hello pierrot10,
Thank you for your response. I send my sketch to a friend, and he got it working. So it seems to be a hardware problem.

@cristianomazzuoli
Copy link

cristianomazzuoli commented Jun 20, 2020

Hi all,
I had the same error but only on one of two "almost" identical boards, except for the levels adaptation from 5V to 3V3.
I'am using two boards equipped with arduino nano (operating at 5V) ad a RFM96 (SX1276) radio module (operating at 3v3) each, so I have to lower the voltage of the arduino
outputs line from 5v to 3v3, as the RFM96 module isn't 5V tolerant.

The difference between the two board is that in the working one I use 4 level shifter from 5V to 3v3V for the lines MOSI, NSS, RESET, SCK, as the link below:
https://www.tme.eu/it/en/details/sn74lvc1t45dckt/interfaces-others-integrated-circuits/texas-instruments/

Instead, in the not working board I adapt this voltage using 4 simple resistor divider, with 1K in series from the arduino pin and 1k8 to ground, so I obtain (5V * 1K8) / 2K8 = 3.14V on the radio module.

In this board (with resistor divider) I have the error:

FAILURE
/root/Arduino/libraries/arduino-lmic-master/src/lmic/radio.c:689

but not in the first one, with level shifter, that work fine.

This error means SPI failure on reading the RegVersion register, at least in my case.
To see the signal in the SPI interface on the radio I comment out this line in radio.c:

//some sanity checks, e.g., read version number    
//u1_t v = readReg(RegVersion);

and add the follow line to continuosly send packed over SPI interface and check the lines with an oscilloscope:

u1_t v = 0;while (1) {v = readReg(RegVersion);}		

Result: The MOSI, NSS; SCK signals are identical on the 2 boards (except for little difference in the shape of the resistor divider board, but not important at 4 Mhz), but there isn't any signal on the
MISO line, because the RST line is always LOW in the board with resistor divider (and HIGH in the working one with level shifter), and this hold the radio in the reset state.

I investigate in the code, and I found a line (in radio.c)I not understand:

void radio_init () {
    hal_disableIRQs();

    // manually reset radio
#ifdef CFG_sx1276_radio
    hal_pin_rst(0); // drive RST pin low
#else
    hal_pin_rst(1); // drive RST pin high
#endif
    hal_waitUntil(os_getTime()+ms2osticks(1)); // wait >100us
    hal_pin_rst(2); // configure RST pin floating!                  <<<<<<--------- THIS LINE!
    hal_waitUntil(os_getTime()+ms2osticks(5)); // wait 5ms
    opmode(OPMODE_SLEEP);	
    // some sanity checks, e.g., read version number    
    u1_t v = readReg(RegVersion);
    
#ifdef CFG_sx1276_radio
    ASSERT(v == 0x12 );
#elif CFG_sx1272_radio
    ASSERT(v == 0x22);
#else
#error Missing CFG_sx1272_radio/CFG_sx1276_radio
#endif

My question is, why just before to perform a readReg operation the RST pin is set floating?
I suppose that with this pin floating, if I use a level shifter I can have the pin at a high level thanks to the internal logic of the level shifter, but if I use a resistor divider
the 1K8 resistor tie to ground the RST pin and hold the radio in the reset state.

I modified the code above by commenting out the line where RST pin is configured floating and driving the RST pin high before perform the SPI operation, as follow:

void radio_init () {
    hal_disableIRQs();

    // manually reset radio
#ifdef CFG_sx1276_radio
    hal_pin_rst(0); // drive RST pin low
#else
    hal_pin_rst(1); // drive RST pin high
#endif
    hal_waitUntil(os_getTime()+ms2osticks(1)); // wait >100us
    //hal_pin_rst(2); // configure RST pin floating!
    hal_waitUntil(os_getTime()+ms2osticks(5)); // wait 5ms
	hal_pin_rst(1);
    opmode(OPMODE_SLEEP);	
    // some sanity checks, e.g., read version number    
    u1_t v = readReg(RegVersion);
    
#ifdef CFG_sx1276_radio
    ASSERT(v == 0x12 );
#elif CFG_sx1272_radio
    ASSERT(v == 0x22);
#else
#error Missing CFG_sx1272_radio/CFG_sx1276_radio
#endif

And now all work fine on both the boards, and solved the error.

I hope this can help someone!

bye!
Cristiano

@matthijskooijman
Copy link
Owner

My question is, why just before to perform a readReg operation the RST pin is set floating?

The idea is that the RST pin has an internal pullup, so you just let the pullup set the right state. I guess manually driving the RST pin could also work (though it would need to be inverted for 1276), not sure why the original authors chose to do it like this.

@cyberman54
Copy link

This is intentionally, since hardware datasheet of SX127x says pins shall left floating. Look here: mcci-catena#579

@cristianomazzuoli
Copy link

Hi all and thanks for your help.
Yes, as said from cyberman54 and terrillmoore in the linked post, the problem is the resistor divider, due to the 2 k resistor to gnd that hold the chip in the RST state.
The RFM96 datasheet is clear about this and it tell to left the RST floating for normal operation and drive LOW only for reset, so as terrillmoor says, the code is right and respect the datasheet.
I understand that is always better use a level shifter rather than a resistor divider to adapt different voltage levels, but this is normal pratice especially for low speed SPI comunications.
However I took into consideration only the delay introduced by the resistive divider in the waveform and not other complications like this.
So, if I want use resistor divider instead of ic level shifter, I think is right to comment out the line where the RST line is set to floating and manually drive this pin high.
Another better solultion that respect the datasheet specs, would be not use a resistive divider in the RST line but only a 1k serie resistor between arduino pin and RFM96 RST pin, to avoid any damage if accidentally the arduino pin is set to high, and left the code as the original. So I can drive low RST pin when I want reset the radio, but the floating state during operation is respected and not affected.
I make this test and confirm you later if this work fine.
Thank all for your time and for your work.
Have a nice day!
Cristiano

@cristianomazzuoli
Copy link

Yes, I confirm you that by removing the 1K8 resistor to ground in the resistive divider and left only the 1K serie resistor in the RST line from arduino to radio all work fine with the original code.
Thanks!

@guljanjua
Copy link

Hi,

I hope you are doing good. I fixed this issue. Please replace this:
#ifdef CFG_sx1276_radio ASSERT(v == 0x12 ); #elif CFG_sx1272_radio ASSERT(v == 0x22); #else #error Missing CFG_sx1272_radio/CFG_sx1276_radio #endif

with this:
#ifdef CFG_sx1276_radio if(v != 0x12 ) return 0; #elif CFG_sx1272_radio if(v != 0x22) return 0; #else #error Missing CFG_sx1272_radio/CFG_sx1276_radio #endif

in radio.c line 688.

@KaiserFels
Copy link

KaiserFels commented Dec 4, 2021

@guljanjua I tried this but I get an error on line 737. Do you know how can I solve it?

@guljanjua
Copy link

Hi @KaiserFels ,

I hope you are doing good. Well I solved this error but still library was not working and was not uploading data to the thingsnetwork. So I ended up using this library: https://github.com/mcci-catena/arduino-lmic

One more thing, if you are using Uno and adding GPS or any extra library that will use memory so a stability problem may occur and Arduino will send 2-3 LoRa packets and than it stop sending data. You may need to go for arduino with more memory.

I hope it will be helpful for you.

@KaiserFels
Copy link

I am using TTGO v2.1 module. I used the library you posted and after selecting EU868 as the Region, I got the following error. "Error: MCCI_LoRaWAN_LMIC_library-3.0.99\src\lmic\oslmic.c:53"
Now I checked the pins in getpinmap_ttgo_lora32_v2.1.cpp and it was correct. I can't find the solution.

@guljanjua
Copy link

Well I am sorry I have not tried this library on esp32. Maybe try changing pin to another pin and see if it works.

@KaiserFels
Copy link

Thank for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests