LoRa E32 433 MHz Communication Problem

EDIT: At the final code, LoRa_E32.h library implemented instead of LoRa_E22.h .
Transmitter:

#include "LoRa_E22.h"
// #include "LoRa_E32.h" // E32 modülleri için bunu aktif et
#include <SoftwareSerial.h>
 
 
SoftwareSerial mySerial(3, 4); //PCB versiyon 4.3 den sonra bu şekilde olmalı
LoRa_E22 E22(&mySerial);
// LoRa_E32 E32(&mySerial); // E32 modülleri için bunu aktif et
 
#define M0 7
#define M1 6
#define buton1 2
#define buton2 3
 
 
struct Signal {
  char sifre[15] = "Fixaj.com";
  char konum[15];
  byte btn1;
  byte btn2;
} data;
 
unsigned long kanalBekleme_sure = 0;
int kanalBekleme_bekleme = 2000;
 
bool mesajGonder = false;
bool butonDurumu = false;
bool butonDurumu2 = false;
 
void setup() {
  pinMode(M0, OUTPUT);
  pinMode(M1, OUTPUT);
  digitalWrite(M0, LOW);
  digitalWrite(M1, LOW);
 
  Serial.begin(9600);
  E22.begin();
 
  pinMode(buton1, INPUT_PULLUP);
  pinMode(buton2, INPUT_PULLUP);
 
  delay(500);
  Serial.println("başlıyoruz.. Fixaj.com");
}
 
void loop() {
  if (!digitalRead(buton1)) {
    data.btn1 = 1;
    mesajGonder = true;
    butonDurumu = true; 
 
  } else if (butonDurumu && digitalRead(buton1)) {
    data.btn1 = 0;
    mesajGonder = true;
    butonDurumu = false;
    kanalBekleme_sure = 0;
  }
 
  if (!digitalRead(buton2)) {
    data.btn2 = 1;
    mesajGonder = true;
    butonDurumu2 = true; 
 
  } else if (butonDurumu2 && digitalRead(buton2)) {
    data.btn2 = 0;
    mesajGonder = true;
    butonDurumu2 = false;
    kanalBekleme_sure = 0;
  }
 
  if (millis() > kanalBekleme_sure + kanalBekleme_bekleme && mesajGonder) {
    kanalBekleme_sure = millis();
    ResponseStatus rs = E22.sendFixedMessage(0, 1, 63, &data, sizeof(Signal));
    Serial.print("buton 2 : ");
    Serial.print(data.btn2);
    Serial.print(", ");
    Serial.println(rs.getResponseDescription());
    mesajGonder = false;
  }
}

Receiver:

#include "LoRa_E22.h"
#include <SoftwareSerial.h>
 
#define M0 7
#define M1 6
#define role1 2
#define role2 4
 
SoftwareSerial mySerial(3, 4); //PCB versiyon 4.3 den sonra bu şekilde olmalı
LoRa_E22 E22(&mySerial);
 
unsigned long kanalBekleme_sure = 0;
int kanalBekleme_bekleme = 5000;
 
struct Signal {
  char sifre[15] = "Fixaj.com";
  char konum[15];
  byte btn1;
  byte btn2;
} data;
 
void setup() {
  pinMode(M0, OUTPUT);
  pinMode(M1, OUTPUT);
  digitalWrite(M0, LOW);
  digitalWrite(M1, LOW);
 
  Serial.begin(9600);
  E22.begin();
 
  pinMode(role1, OUTPUT);
  pinMode(role2, OUTPUT);
 
  delay(500);
  Serial.println("başlıyoruz.. Fixaj.com");
}
 
void loop() {
  while (E22.available() > 1) {
    // Gelen mesaj okunuyor
    ResponseStructContainer rsc = E22.receiveMessage(sizeof(Signal));
    struct Signal data = *(Signal*)rsc.data;
    rsc.close();
 
    if (strcmp(data.sifre, "Fixaj.com") == 0) {
      Serial.println("şifre doğru");
      kanalBekleme_sure = millis();
 
      if (data.btn1 == 1) {
 
        Serial.println("Röle 1 AÇ");
        digitalWrite(role1, HIGH);
        delay(30);
 
      } else if (data.btn1 == 0) {
 
        Serial.println("Röle 1 KAPAT");
        digitalWrite(role1, LOW);
        delay(30);
      }
 
      if (data.btn2 == 1) {
 
        Serial.println("Röle 2 AÇ");
        digitalWrite(role2, HIGH);
        delay(30);
 
      } else {
 
        Serial.println("Röle 2 KAPAT");
        digitalWrite(role2, LOW);
        delay(30);
      }
    }
  }
    if (millis() > kanalBekleme_sure + kanalBekleme_bekleme) {
      digitalWrite(role1, LOW);
      digitalWrite(role2, LOW);
    }
   
}

Hello, I too face the same type of issue. My receiver is not receiving any information.
This is an example code from LoRa_E32-Library:
It is a sender code:

#include "Arduino.h"
#include "LoRa_E32.h"
#include <SoftwareSerial.h>

LoRa_E32 e32ttl(2, 3, 5, 7, 6);

void printParameters(struct Configuration configuration);
void printModuleInformation(struct ModuleInformation moduleInformation);
//The setup function is called once at startup of the sketch
void setup()
{
	Serial.begin(9600);
	while (!Serial) {
	    ; // wait for serial port to connect. Needed for native USB
    }
	delay(100);

	e32ttl.begin();
void loop()
{
	delay(2000);

	Serial.println("Send message to 00 05 02");
	ResponseStatus rs = e32ttl.sendFixedMessage(0, 5, 0x02, "Message to 00 05 02 device");
	Serial.println(rs.getResponseDescription());
}
void printParameters(struct Configuration configuration) {
	Serial.println("----------------------------------------");

	Serial.print(F("HEAD : "));  Serial.print(configuration.HEAD, BIN);Serial.print(" ");Serial.print(configuration.HEAD, DEC);Serial.print(" ");Serial.println(configuration.HEAD, HEX);
	Serial.println(F(" "));
	Serial.print(F("AddH : "));  Serial.println(configuration.ADDH, BIN);
	Serial.print(F("AddL : "));  Serial.println(configuration.ADDL, BIN);
	Serial.print(F("Chan : "));  Serial.print(configuration.CHAN, DEC); Serial.print(" -> "); Serial.println(configuration.getChannelDescription());
	Serial.println(F(" "));
	Serial.print(F("SpeedParityBit     : "));  Serial.print(configuration.SPED.uartParity, BIN);Serial.print(" -> "); Serial.println(configuration.SPED.getUARTParityDescription());
	Serial.print(F("SpeedUARTDatte  : "));  Serial.print(configuration.SPED.uartBaudRate, BIN);Serial.print(" -> "); Serial.println(configuration.SPED.getUARTBaudRate());
	Serial.print(F("SpeedAirDataRate   : "));  Serial.print(configuration.SPED.airDataRate, BIN);Serial.print(" -> "); Serial.println(configuration.SPED.getAirDataRate());

	Serial.print(F("OptionTrans        : "));  Serial.print(configuration.OPTION.fixedTransmission, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getFixedTransmissionDescription());
	Serial.print(F("OptionPullup       : "));  Serial.print(configuration.OPTION.ioDriveMode, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getIODroveModeDescription());
	Serial.print(F("OptionWakeup       : "));  Serial.print(configuration.OPTION.wirelessWakeupTime, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getWirelessWakeUPTimeDescription());
	Serial.print(F("OptionFEC          : "));  Serial.print(configuration.OPTION.fec, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getFECDescription());
	Serial.print(F("OptionPower        : "));  Serial.print(configuration.OPTION.transmissionPower, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getTransmissionPowerDescription());

	Serial.println("----------------------------------------");

}
void printModuleInformation(struct ModuleInformation moduleInformation) {
	Serial.println("----------------------------------------");
	Serial.print(F("HEAD BIN: "));  Serial.print(moduleInformation.HEAD, BIN);Serial.print(" ");Serial.print(moduleInformation.HEAD, DEC);Serial.print(" ");Serial.println(moduleInformation.HEAD, HEX);

	Serial.print(F("Freq.: "));  Serial.println(moduleInformation.frequency, HEX);
	Serial.print(F("Version  : "));  Serial.println(moduleInformation.version, HEX);
	Serial.print(F("Features : "));  Serial.println(moduleInformation.features, HEX);
	Serial.println("----------------------------------------");

}

This is the receiver code:

#include "Arduino.h"
#include "LoRa_E32.h"
#include <SoftwareSerial.h>

LoRa_E32 e32ttl(2, 3, 5, 7, 6);

void printParameters(struct Configuration configuration);
void printModuleInformation(struct ModuleInformation moduleInformation);
//The setup function is called once at startup of the sketch
void setup()
{
	Serial.begin(9600);
	while (!Serial) {
	    ; // wait for serial port to connect. Needed for native USB
    }
	delay(100);

	e32ttl.begin();
        Serial.println();
	Serial.println("Start listening!");
}
void loop()
{
	if (e32ttl.available()  > 1){
		ResponseContainer rs = e32ttl.receiveMessage();
        // First of all get the data
		String message = rs.data;

		Serial.println(rs.status.getResponseDescription());
		Serial.println(message);
	}
}

void printParameters(struct Configuration configuration) {
	Serial.println("----------------------------------------");

	Serial.print(F("HEAD : "));  Serial.print(configuration.HEAD, BIN);Serial.print(" ");Serial.print(configuration.HEAD, DEC);Serial.print(" ");Serial.println(configuration.HEAD, HEX);
	Serial.println(F(" "));
	Serial.print(F("AddH : "));  Serial.println(configuration.ADDH, DEC);
	Serial.print(F("AddL : "));  Serial.println(configuration.ADDL, DEC);
	Serial.print(F("Chan : "));  Serial.print(configuration.CHAN, DEC); Serial.print(" -> "); Serial.println(configuration.getChannelDescription());
	Serial.println(F(" "));
	Serial.print(F("SpeedParityBit     : "));  Serial.print(configuration.SPED.uartParity, BIN);Serial.print(" -> "); Serial.println(configuration.SPED.getUARTParityDescription());
	Serial.print(F("SpeedUARTDatte  : "));  Serial.print(configuration.SPED.uartBaudRate, BIN);Serial.print(" -> "); Serial.println(configuration.SPED.getUARTBaudRate());
	Serial.print(F("SpeedAirDataRate   : "));  Serial.print(configuration.SPED.airDataRate, BIN);Serial.print(" -> "); Serial.println(configuration.SPED.getAirDataRate());

	Serial.print(F("OptionTrans        : "));  Serial.print(configuration.OPTION.fixedTransmission, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getFixedTransmissionDescription());
	Serial.print(F("OptionPullup       : "));  Serial.print(configuration.OPTION.ioDriveMode, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getIODroveModeDescription());
	Serial.print(F("OptionWakeup       : "));  Serial.print(configuration.OPTION.wirelessWakeupTime, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getWirelessWakeUPTimeDescription());
	Serial.print(F("OptionFEC          : "));  Serial.print(configuration.OPTION.fec, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getFECDescription());
	Serial.print(F("OptionPower        : "));  Serial.print(configuration.OPTION.transmissionPower, BIN);Serial.print(" -> "); Serial.println(configuration.OPTION.getTransmissionPowerDescription());

	Serial.println("----------------------------------------");

}
void printModuleInformation(struct ModuleInformation moduleInformation) {
	Serial.println("----------------------------------------");
	Serial.print(F("HEAD BIN: "));  Serial.print(moduleInformation.HEAD, BIN);Serial.print(" ");Serial.print(moduleInformation.HEAD, DEC);Serial.print(" ");Serial.println(moduleInformation.HEAD, HEX);

	Serial.print(F("Freq.: "));  Serial.println(moduleInformation.frequency, HEX);
	Serial.print(F("Version  : "));  Serial.println(moduleInformation.version, HEX);
	Serial.print(F("Features : "));  Serial.println(moduleInformation.features, HEX);
	Serial.println("----------------------------------------");

}

I connected Arduino Nano with my E32. 

what host microcontroller are you using?
can you run the example library programs, e.g. File>Examples>Ebyte Lora E32 Library>arduinoGetConfiguration?

I am using Arduino Nano.


This what I am getting for arduinoGetConfiguration.


This my pin connection.

have you tried the simple connections in Get configuration.


 * https://www.mischianti.org/2019/10/29/lora-e32-device-for-arduino-esp32-or-esp8266-configuration-part-3/
 *
 * E32-TTL-100----- Arduino UNO
 * M0         ----- 3.3v
 * M1         ----- 3.3v
 * TX         ----- RX PIN 2 (PullUP)
 * RX         ----- TX PIN 3 (PullUP & Voltage divider)
 * AUX        ----- Not connected
 * VCC        ----- 3.3v/5v
 * GND        ----- GND

and if that works sendReceiveTransparentTransmissionMessage

 * E32-TTL-100----- Arduino UNO
 * M0         ----- GND
 * M1         ----- GND
 * TX         ----- PIN 2 (PullUP)
 * RX         ----- PIN 3 (PullUP & Voltage divider)
 * AUX        ----- Not connected
 * VCC        ----- 3.3v/5v
 * GND        ----- GND

Yes per your instruction, I followed the Set and get configuration code. I could able to set the configuration for both my modules, but when I try to get the configuration for one device setup I am not getting. Why so?


These are my result of get configuration code:


I assume you are using two UNOs with LoRa E32 modules connected using identical circuits - one is working (displays "Success") the other is not (displays "No response from device (check wiring)")

the fact that one of the UNO/E32 works and the other does not indicates you probably have a wiring fault on the second UNO/E32 setup
try

  1. switching the LoRa E32 modules - is the second UNO/E32 still not working? if the connection starts working it indicates a faulty LoRa e32 module
  2. check the wiring - I assume you are using jumper wires which are a source of poor connections and intermittent problems - if necessary take it apart and rewire

upload a photo of the two setups

I prefer using modules with microcontroller and LoRa devices on the same PCB, e.g. . ttgo-lora32 , Adafruit Feather 32u4 LoRa, TTGO-Beam, Hiltec LoRa 32, The Things UNO, Adafruit RP2040 with RFM95, etc

I am not sure when I tried to connect my working E32 with other arduino nano it was not getting the configuration, When I tried to connect my working arduino with other E32 its not working. But my Nanos are perfect when I upload other code.

post 28 showed a UNO - have you now switched to Nano microcomputers?

reading you last post does one LoRa E32 work OK and the other not ?
is it possible the baudrate has been changed on the none working ES32?
otherwise it appears you have a faulty LoRa E32

No from starting I am working with Nano only. My baudrate is 9600 only I set it as per the datasheet. Is there any other way to check my E32 alone whether it is working or not? Because my controller works fine.

Why is that needed ?

If one of your Nanos is working with or recognises one of the E32s, then what the problem with using that (working) Nano to check the other E32s ?

I need 3 E32 for communication. Only one is working properly with all the basic pull-up and voltage divider. Now I tried to configure my other 2 E32 without voltage divider it is getting configured and I am able to get the configuration also. But I am not sure whether this way of configuring is correct.

So one E32 is working with the wiring setup on one Nano and when you then try the other two E32s on this working Nano the other two E32s dont work ?

Thank you for guiding me, I removed the voltage divider and tried to with the example codes its working fine. But I don't understand one thing when I configure the address as 2 in the AddL or AddH it is taking the value as 10, and for 3 it is taking as 11 why so?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.