RFM95W and ESP8266

Hello Everyone,

I am having a lot of trouble trying to connect a RFM95W to an ESP8266. I have a nodemcu 1.0 board and the adarfruit breakout for the rfm95w.

I have the following connected:

RFM95W ESP8266

MISO GPIO12
MOSI GPIO13
SCK GPIO14
CS GPIO15
DIO0 GPIO5
GND GND
VIN 3.3V

I’ve tried connectiong DI01 to GPIO4 and RST to RESET and several other combinations.

Can someone steer me in the right direction? I have tried several libraries too and none of them give me results.

We’ll need a lot more information. Why do you think it doesn’t work? What library/sketch are you using? Did you map the pins in the software too? What do you see in the serial monitor?

Just a pin mapping is not enough.

1 Like

I’m looking for someone or something that clearly defines what I need to do. I see a lot of people using these radios with ESP8266 boards so I’m sure that there is someone who can point me to a clear how to?

This is what I get in my serial monitor while trying otaa:

71722351: engineUpdate, opmode=0xc
71724588: TXMODE, freq=905500000, len=23, SF=10, BW=125, CR=4/5, IH=0
72060459: RXMODE_SINGLE, freq=923300000, SF=10, BW=500, CR=4/5, IH=0
72123535: RXMODE_SINGLE, freq=923300000, SF=12, BW=500, CR=4/5, IH=0
72127933: engineUpdate, opmode=0xc
72161816: engineUpdate, opmode=0xc
72164040: TXMODE, freq=903000000, len=23, SF=8, BW=500, CR=4/5, IH=0
72480985: RXMODE_SINGLE, freq=923300000, SF=7, BW=500, CR=4/5, IH=0
72544229: RXMODE_SINGLE, freq=923300000, SF=12, BW=500, CR=4/5, IH=0
72548649: EV_JOIN_FAILED

This is ABP:

23113741: RXMODE_SINGLE, freq=923300000, SF=7, BW=500, CR=4/5, IH=0
23176600: RXMODE_SINGLE, freq=923300000, SF=9, BW=125, CR=4/5, IH=0
23288825: EV_TXCOMPLETE (includes waiting for RX windows)
23288839: engineUpdate, opmode=0x800
23913842: engineUpdate, opmode=0x808
23914147: TXMODE, freq=902300000, len=26, SF=7, BW=125, CR=4/5, IH=0
Packet queued
23980539: RXMODE_SINGLE, freq=923300000, SF=7, BW=500, CR=4/5, IH=0
24043398: RXMODE_SINGLE, freq=923300000, SF=9, BW=125, CR=4/5, IH=0
24191812: EV_TXCOMPLETE (includes waiting for RX windows)
24191827: engineUpdate, opmode=0x800

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

It seems to not matter if I switch 5,4 to 4,5? Do these correspond with D0,D1,D2 in their respective positions?

I use the sketches provided in the examples for instance I’m currently attempting to use this sketch with otaa:

I have tried several libraries but I’m using the following library:
https://github.com/things4u/LoRa-LMIC-1.51arduino-lmic-master.zip

We can see the transmission in the air but nothing on TTN

@thomaswoods if you see a transmission in the air, then a lot is already working, I would say :wink:

First you have to rule out that the gateway you are using is not reveiving your RF signal at all, or that the gateway is not forwarding the packets to TTN

Then you might want to check the contents of LMIC.frame, either by connecting a logic analyzer to the MISO, MOSI, CLK and NSS lines between the processor and the RFM95 or by creating some kind of debug function that outputs this data to USB. If you are seeing nothing on TTN then it might be that the DevAddr or the MIC are incorrect, or that the whole message is ill-formatted. The last one is not likely, if you are using the LMIC library. The DevAddr is in plain text in LMIC.frame, so that is easy to check; the MIC is an encrypted key so that might be somewhat harder to check.

Hello Guys,

I helped Thomas get along the way and I plan on doing a howto just in case anyone might find it useful. There is a lot of information out there but just none of it is consolidated or too clear.

The issue was actually not the rfm95w but the gateway just needed to be restarted for some reason :joy:

2 Likes

Hi bryansmith

Like Thomas I am facing almost same issue .Can you help me on this .I am using RFM95 and ESP8266 as a node. I used arduino-LMIC ABP code to send data to ttn. On my serial monitor I was able to see only "sending Packet queued " but I was able to receive one single packet on ttn not further… I used same pin connection as Thomas used but for DIO 0,1 of lora didnt connected to esp. When I connect it to DIO 0 to GPIO5 and DIO 1 to GPIO 4 of esp8266 the node is failing . Can you help me to solve it.

Hello @silpakc you have to make sure the include the “@” infront of the name or else the person isn’t notified about your post.

Did you get your issue resolved?