Assistance Required: Issue Receiving RSSI with Ebyte E220-900T33D Module

Hi everyone,

I’m working with the Ebyte E220-900T33D LoRa module set up as a receiver, and I’m having trouble getting the RSSI (Received Signal Strength Indicator) to work properly. I’ve enabled the RSSI function on the receiver, but I’m not seeing any RSSI values in my output.

the code that I am using:

#include <SoftwareSerial.h>

// Pin definitions
#define LORA_RX 10
#define LORA_TX 11
#define LORA_M0 7
#define LORA_M1 8

char DataRSSI[10];
String command = "C0 C1 C2 C3";

// Initialize SoftwareSerial for communication with the LoRa module
SoftwareSerial loraSerial(LORA_RX, LORA_TX);

void setup() {
  // Set pin modes
  pinMode(LORA_M0, OUTPUT);
  pinMode(LORA_M1, OUTPUT);

  // Set M0 and M1 pins to receive mode
  digitalWrite(LORA_M0, LOW); 
  digitalWrite(LORA_M1, LOW);

  // Initialize serial communication
  Serial.begin(9600);
  loraSerial.begin(9600);

  Serial.println("LoRa Receiver is ready.");
}

void loop() {
  // Check if data is available for reading
  if (loraSerial.available()) {
    String message = "";
    
    // Read data
    while (loraSerial.available()) {
      char c = loraSerial.read();
      message += c;
      delay(10); // Small delay for stable reception
    }
    
    // Send command (if necessary)
    loraSerial.println(command);
    
    // Read RSSI (if RSSI is sent as 4 bytes)
    if (loraSerial.available() >= 4) {  // Check if at least 4 bytes are available
      loraSerial.readBytes(DataRSSI, 4);
      Serial.print("RSSI: ");
      Serial.println(String(DataRSSI));  // Convert char array to String
    }

    // Display the received message
    Serial.println("Received message: " + message);
  }
}

Here’s the situation:

  1. RSSI Value Not Showing:
  • The code should be reading RSSI values when at least 4 bytes are available. Despite enabling RSSI on the receiver, I’m not seeing any RSSI values in the output.
  1. Transmitter Details:
  • I have a transmitter sending a simple "hello" message. The receiver successfully receives this message, but it doesn’t provide the RSSI.
  1. Configuration Check:
  • I’ve set the M0 and M1 pins for receive mode based on the module's documentation, but I’m not sure if this is correct.
  1. Communication Confirmation:
  • The receiver does get the transmitted message, so it seems like communication is working fine otherwise.

Can anyone help figure out why I’m not getting the RSSI values? Any suggestions on what might be wrong with the setup or code would be really appreciated.

Thanks a lot!

I don't know the module but wonder if you are sure you need to send commands in ASCII with a trailing CRLF?

shouldn't that be binary?

const byte  command[] = {0xC0, 0xC1, 0xC2, 0xC3};
...
    loraSerial.write(command, sizeof command);

also you send the command and check for data just a few microseconds after

You communicate at 9600 bauds, so sending your text "C0 C1 C2 C3" + CR LF is 13 bytes, just that will take ~13ms, then the module needs to interpret the command and send the 4 bytes back (apparently) which requires another ~4ms
➜ there is no chance the 4 bytes (as an answer to the command you just sent) would be there yet.

I would suggest to study Serial Input Basics to handle this

thank You I will check Your link and update my code and back about result.

Hi, I have a library for the Ebyte E220 which includes the use of the RSSI byte.
Here it is:

Hi Bricomp, thank you for your library. I've written a simple code based on it to change the dB value, but every time I try to change it, the value stays the same, and nothing happens. The wiring is 100% correct. Could you please take a look and let me know what I'm doing wrong

#include <stdint.h>
#include <SoftwareSerial.h>

// Pin definitions
#define LORA_RX 10
#define LORA_TX 11
#define LORA_M0 7
#define LORA_M1 8


void setup() {
  SoftwareSerial loraSerial(LORA_RX, LORA_TX);

  // Set M0 and M1 to output
  pinMode(LORA_M0, OUTPUT);
  pinMode(LORA_M1, OUTPUT);

  digitalWrite(LORA_M0, HIGH);
  digitalWrite(LORA_M1, HIGH);
  delay(20);

  // put your setup code here, to run once:
  uint8_t db10 = 0b00000011; // ustawia db na 10db 03H
  uint8_t db13 = 0b00000010; // ustawia db na 13db 03H

  uint8_t loraConfig[] = {0xC0, 0x03, 0x01, db10};
  Serial.begin(9600);

  loraSerial.begin(9600);

  loraSerial.write(loraConfig, sizeof(loraConfig));

  Serial.print("Fine");
}

void loop() {
  // put your main code here, to run repeatedly:

}

I've found that code is working but instead:
uint8_t loraConfig[] = {0xC0, 0x03, 0x01, db10};
i need to use:
uint8_t loraConfig[] = {0xC0, 0x04, 0x01, db10};

In the manual the second byte is starting adress:

But db is in 03H... not in 04H... what is going on?