matthijskooijman / arduino-lmic

:warning: This library is deprecated, see the README for alternatives.
704 stars 651 forks source link

FAILURE C:\Arduino\libraries\arduino-lmic-master\src\lmic\radio.c:523 #155

Open gpiscopo opened 6 years ago

gpiscopo commented 6 years ago

Hi, I use the board Adafruit Feather M0 with LoRa module RFM95 (868MHz). I am trying to send a string to another feather and to a gateway. I am using the LMIC library by @matthijskooijman and I did these modifications: -In the HAL.cpp file: static const SPISettings settings(8E6, MSBFIRST, SPI_MODE0); -In the config.h file: #define CFC_eu868 and #define CFG_sx1276 -In the setup function: LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100);

The pinout I use is:

// Pin mapping found on Internet according to the wires that I soldered
const lmic_pinmap lmic_pins = {
.nss = 8, // change to match cs / nss
.rxtx = LMIC_UNUSED_PIN,
.rst = 4, // possible 4 for the adafruit board
.dio = {3, 6, 11}, // DIO0, DIO1, DIO2 data pins
};

My problem arises when I try to send or receive something to or from the other feather board and I get this error: FAILURE C:\Arduino\libraries\arduino-lmic-master\src\lmic\radio.c:523 capture

If I implement the communication with the other feather only, my code works for sure. The same if I communicate only with the gateway. I see the error only if I try to implement both the communications with the other feather and the gateway.

These are the RFM95 settings I am using:

/* for feather m0 */
#define RFM95_CS 8
#define RFM95_RST 4
#define RFM95_INT 3

// Change to 434.0 or other frequency, must match RX's freq!
#define RF95_FREQ 868.0

// Singleton instance of the radio driver
RH_RF95 rf95(RFM95_CS, RFM95_INT);

Any ideas on how to solve this problem (if feasible)?

Thank you very much!

nafitriaulia commented 6 years ago

Hi I got same problem with you. Do you already know how to fix it?

gpiscopo commented 6 years ago

Hi, I found that you can implement only one of two communication per time

nafitriaulia commented 6 years ago

Do you ever try communicate node (Arduino + LoRa) to gateway (Arduino + Lora) and successfully? using LMIC library?

gpiscopo commented 6 years ago

Hi,

I am able to have a communication between to feather m0 equipped with Lora modules, or a communication between many feather m0 equipped with Lora modules and a gateway. It is worth noting that in case you want to communicate with a gateway you cannot have anymore the communication between the feathers, only between the feathers and the gateway.

Il 8 maggio 2018 alle 4.30 nafitriaulia notifications@github.com ha scritto:

Do you ever try communicate node (Arduino + LoRa) to gateway (Arduino + Lora) and successfully? using LMIC library?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/matthijskooijman/arduino-lmic/issues/155#issuecomment-387265166 , or mute the thread https://github.com/notifications/unsubscribe-auth/Aj4DhgLswu7a6ZM2aF5l2D1UlYLND5fhks5twQMqgaJpZM4SzVdx .
Roberto6969 commented 4 years ago

Long story short: i have node, consisted of Mega2560 Core and RFM95. Works fine, but after about half of day after start I getting error:

What is the cause of this error?

amin-tayebi commented 1 year ago

Good morning, I have the same error but with arduino nano iot 33 and HOPE rfm95 lora module, (it happens just while I connect board to Relay and a 220v solenoid valve) after 10 times sending TX it crash with error: 17:47:08.457 -> Packet queued 17:47:12.372 -> FAILURE 17:47:12.372 -> C:\Users\My_name\Dropbox\Arduino\src\libraries\arduino-lmic-master\src\lmic\radio.c:523