Big ESP32 + SX127x topic part 3

I see quite a few things:

  • RESET is connected to pin 24 while in the pin mappings it is specified as 14.

  • “Pin mapping adapted for Feather M0 per p.10 of [feather]”,
    “// DIO1 is on JP1-1: is io1 - we connect to GPO6”,
    “// DIO1 is on JP5-3: is D2 - we connect to GPO5”.
    These remarks do not relate to your ESP32-DevKitC because it is not compatible with Adafruit Feather M0.

  • In the wiring diagram DIO2 is wired but it is not configured in the pin mapping (LMIC_UNUSED_PIN instead of 32).

Analysis:

  • Your SPI pin wiring is incorrect.
    The pins wired for SPI interface are not the proper SPI pins for your ESP32-DevKitC board.

  • You may possibly also not have selected the proper ESP32 board in your Arduino (or PlatformIO) IDE. The matching board definition to use for ESP32-DevKitC probably is “DOIT ESP32 DEVKIT V1”, which defines the SPI ‘pins’ (GPIOs) as follows:

    static const uint8_t SS    = 5;
    static const uint8_t MOSI  = 23;
    static const uint8_t MISO  = 19;
    static const uint8_t SCK   = 18;
  • If the wrong board is selected the pin definitions for the SPI interface will most often be incorrect, in which case the software cannot communicate with the RFM95 module which would explain the FAILURE message.

  • When using the LMIC library, for normal LoRaWAN operation DIO2 is not required so the connection to DIO2 can be removed.

Questions:

  1. What IDE are you using, the Arduino IDE?
  2. What board have you selected in your IDE?

Suggestions:

  • Wire MISO, MOSI, SCK and (N)SS according to above SPI pin definitions.

  • In the IDE use board definition “DOIT ESP32 DEVKIT V1”.

  • Correct '.rst = 14, // reset pin' so that it matches the actual pin (GPIO) wired to RESET.

  • Change '.nss = 18, // chip select on feather (rf95module) CS' to
    .nss = 5
    or my personal preference, which indicates that the standard SPI SS pin/GPIO is used which also makes it easier to port the code to a different board (because part of standard board definitions):
    .nss = SS

  • Remove the connection to DIO2.


Please read How do I format my forum post? [HowTo] for how to format sourcecode in a post.