Hi,
I am working with two LoRa modules, one as a sender and one as receiver. Sender (a SX1278 board) with ESP32 works fine, but Receiver (DRF1278DM by Dorji) with ESP8266 NodeMCU board is giving me problems.
I used Sandeep Mistry's library for the first one but I dont know if it would work for DRF1278DM as pins are different.
Connection:
ESP8266 D1 -> DRF1278DM RXD
ESP8266 D2 -> DRF1278DM TXD
ESP8266 3V3 -> DRF1278DM VCC
ESP8266 GND -> DRF1278DM GND
EN of the LoRa module is shorted with its own GND.
Code:
#include <SoftwareSerial.h>
#include <ESP8266WiFi.h>
SoftwareSerial ss(4, 5);
void setup() {
Serial.begin(9600);
ss.begin(9600);
delay(5000);
updateSerial();
}
void loop() {
ss.write("0xAF");
updateSerial();
ss.write("0xAF");
updateSerial();
ss.write("0x00");
updateSerial();
ss.write("0xAF");
updateSerial();
ss.write("0x00");
updateSerial();
ss.write("0x80");
updateSerial();
ss.write("0x03");
updateSerial();
ss.write("0x02");
updateSerial();
ss.write("0x00");
updateSerial();
ss.write("0x00");
updateSerial();
ss.write("0x92");
updateSerial();
ss.write("0x0D");
updateSerial();
ss.write("0x0A");
updateSerial();
delay(5000);
}
void updateSerial() {
delay(500);
while (Serial.available()) {
ss.write(Serial.read());
}
while (ss.available()) {
Serial.write(ss.read());
}
}
It returns nothing even though as per manual (http://www.dorji.com/docs/data/DRF1278DM.pdf) it was supposed to return a string.
ss.available
is always -1.
Red light on the LoRa module blinks 13 times after every 5 seconds. Once for each 'ss.write' above.
Is there a separate library for this? Does anybody know? The internet is really short on any work on this particular Data Radio Modem.
Thanks in advance.