mcci-catena / arduino-lmic

LoraWAN-MAC-in-C library, adapted to run under the Arduino environment
https://forum.mcci.io/c/device-software/arduino-lmic/
MIT License
629 stars 207 forks source link

Always failure in radio.c 801 #848

Open mnett0 opened 2 years ago

mnett0 commented 2 years ago

Hello,

I have a problem when assembling a RFM95W module with an ESP32 (TTGO T1 v1.3) with the example code helium-oota.

I have constantly in the serial monitor the following error:

Starting
Packet queued
315615: EV_JOINING
537265: EV_TXSTART
FAILURE 
.pio/libdeps/ttgo-t1/MCCI LoRaWAN LMIC library/src/lmic/radio.c:801

Environment :

Schema :

And I added this piece of code to the example:

// SCK, MISO, MOSI, SS
SPI.begin(18, 19, 23, 5);

lmic_pinmap lmic_pins = {
  .nss = 5,
  .rxtx = LMIC_UNUSED_PIN,
  .rst = 17,
  .dio = {26, 35, 34},
};

const lmic_pinmap *pPinMap = &lmic_pins;

I tried the wiring also in HSPI same thing, I reversed NSS and SCK, nothing, I tried with a classic ESP32, same thing. On a classic Arduino board everything works fine.

Anybody have an idea of the problem?

gmanrc commented 2 years ago

Do you have anything else on the SPI line? I've recently been experiencing this failure when I have an MCP3008 ADC on the SPI line as well. Have not been able to make the two work nicely together.

mnett0 commented 2 years ago

I don't have anything connected on the VSPI, on the HSPI there is the micro-sd reader but I don't use it for my tests, and on a classic esp32 I also have this problem.

TTGO T1 schematic: https://github.com/LilyGO/ESP32-TTGO-T1/blob/master/T1_V1.3.pdf

mnett0 commented 2 years ago

@terrillmoore any idea?

mnett0 commented 2 years ago

Same with XIAO BLE Sense