Node with ESP8266 and RFM95W

I know that LMIC suppose to work in the RX2 window.

As far as I know it should also work in RX1, but indeed TTN prefers RX2. Still then:

https://www.thethingsnetwork.org/forum/t/ack-is-supported-or-not/2661/3

So setting the end node on SF9 will receive the downstream packets?

You don’t need to force your node to send using SF9, but indeed you will need to set it to use SF9 for RX2.

Apparently for LMiC this is needed for both ABP:

https://www.thethingsnetwork.org/forum/t/acknowledgements-downlink-ack-rfm95w-solved/1944/2

… and (currently) also for OTAA:

https://www.thethingsnetwork.org/forum/t/otaa-join-accept-datarate-changed/2408/8

(And of course, the gateway must support downlinks too; most Single Channel test gateways don’t. As an aside, beware that downlinks will be very limited, one day.)

Yes, I have a true gateway ( a LinkLab Pi hat ) I moved from single channel gateway ( PI + ESP8266) to a truly gateway and I am aware of the air time ( 10 msg per day downlink is more then enough for me).

I’ve checked the lorabase.h so DR_DNW2 is set to DR_SF9

enum { DR_DNW2 = DR_SF9 };

and the LMIC.dn2Dr = DR_DNW2; in lmic.cpp in function lmicJustJoined. So, I guess I good with that.

Using

./util_tx_test -n 1680 -m LORA -s 7 -t 1000 -z 55

is just enough to have a packet received in ESP ? I’ve seen the packets in gateway but not on ESP, no event EV_RXCOMPLETE is triggered.

You know that a node can only receive right after it has sent something? You can queue a downlink in the TTN dashboard or using ttnctl.

Off cource in one of the immediate windows RX1 or RX2.

Thanks, effectively is displaying that, but where should I check the package sent?

Hi I’m having the same error (wemos d1 mini, RFM95). What was your problem?

Running Things4U (esp-lmic-v1.5). Tnx!

To be more specific I got this error too:

wdt reset
load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42
~ld
Starting
hal_init: ESP architecture
FAILURE
/home/rvweert/data/Arduino/libraries/lmic-v1.5/src/lmic/radio.cpp:657

followed by a reboot. Tried both the normal LMIC-master library as the Things4u lmic-v1.5 , different pin settings.
Weird thing is I get the exact same behaviour when my protoshield is not connected; wiring seems to check out (or did I fry it while soldering…?).

RFM95 (sx1276, 868mhz) with what seems the correct settings in the cpp’s, connected to a Wemos D1 mini (via DIO0, DIO1, NCK, NSS, MISO, MOSI, 3v and gnd); same pin mapping as the others.

This combination (or similar) can be used.
The Wemos D1 module (same as the above) will work withe the Dragino Rev 1.3 module (I did not look at the other versions).

The following is the pin mapping, jumper configuration and wire link required for use with the LMIC library

// Wemos D1 (Rev 1) pin mapping and jumper settings for use with Dragino Lora Shield Rev 1.3
// Lora Shield - install jumpers SV1-1 to SV1-2, SV2-1 to SV2-2, SV3-1 to SV3-2
// Lora Shield - remove jumpers J_D101, J_D102, J_D105
// Add link from J_D101 pin closest to the aerial connector to D3 on the Arduino header
lmic_pinmap pins = {
.nss = 15, // CS
.rxtx = 4, // For placeholder only, Do not connected on RFM92/RFM95
.rst = 2, // Needed on RFM92/RFM95? (probably not) D0/GPIO16
.dio = {16, 5, 4}, // Specify pin numbers for DIO0, 1, 2
};

Connect all the grounds on the radio to ground.

Are you going to add an SMA connector for an antenna? In that case maybe an edge mount one?

Are you going to mount the radio and the ESP module back to back on the PCB? Remember to ground everything properly, and add enough capacitors to the 3.3V. Also add enough via’s to connect the ground pours. I had issues with a previous design where the microcontroller reset when the radio transmitted. All due to bad grounding.

Thanks for the advices
(I’m a beginner with kicad)

First attempt here here

Modifications to the diagram

1 Like

Could you perhaps share the kicad sources on github?

hi
it wold be nice if you could add a LDO 3V3 regulator, so it would be possible to power it from a LiPo
thanks

yes. The spirit of this dev is opensource.
Just need to finish the diagram to get sure.
I’m wondering about shortening the segment between antenna PIN and SMA connector to avoid antenna loss of power.

yes. This is the idea.
There are already made chinese regulators. I wonder, maybe we could add a USB 5V --> Lipo 3.7 v --> Regulator 3.3vv line

Another idea would be to add a solar cell connector + regulator, to allow charging during sleep mode

As I’m new to Lorawan GW, I wonder if it would be usefull to add a buzzer (alerting when WIFI is disconnected or when GW in TRX error) and if it would be usefull to have a small 128x64 oled display soldered on the PCB ( with a switch to reduce energy drain). I’m about to finish the PCB , making 2 extra option would be ok too

Do you think DIO1 and DIO0 could be moved to GPIO9 and GPIO10 , to free GPIO4 and GPIO5 for the OLED display ?

If mods are good, I will post the package on GitHub

Reading all above and since some time has passed with possibly new methods, what would be the best pinmapping for an RFM95 with a Nodemcu 1.0?
Can I just take any GPIO pins and assign them in the LMIC or does it not work that way?
/edit
To answer my own question:
See this post Node with ESP8266 and RFM95W
which refers to this page: http://things4u.github.io/HardwareGuide/ESP8266/ESP-Sensor/esp-lora-sensor.html
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 15,
.rxtx = LMIC_UNUSED_PIN,
.rst = 16,
.dio = {5, 4, LMIC_UNUSED_PIN},
}
This is the setup that now works with my nocemcu.