LoRa E220-100 problems

Hello folks,

I'm testing a LoRa E220-100 device by looking at Ebyte LoRa E220 LLCC68 device for Arduino, esp32 or esp8266: configuration – 3 – Renzo Mischianti

But I get a strange result:

17:57:44.837 -> Initializing LoRa
17:57:44.917 -> Getting configuration
17:57:45.197 -> Save mode returned not recognized!
17:57:45.237 -> 11
17:57:45.237 -> ----------------------------------------
17:57:45.277 -> HEAD : 0 0 C1
17:57:45.277 ->  
17:57:45.317 -> AddH : 0
17:57:45.317 -> AddL : 8
17:57:45.317 ->  
17:57:45.317 -> Chan : 98 -> 508MHz
17:57:45.357 ->  
17:57:45.357 -> SpeedParityBit     : 0 -> 8N1 (Default)
17:57:45.397 -> SpeedUARTDatte     : 0 -> 1200bps
17:57:45.437 -> SpeedAirDataRate   : 0 -> 2.4kbps
17:57:45.477 ->  
17:57:45.477 -> OptionSubPacketSett: 0 -> 200bytes (default)
17:57:45.517 -> OptionTranPower    : 0 -> 22dBm (Default)
17:57:45.557 -> OptionRSSIAmbientNo: 0 -> Disabled (default)
17:57:45.597 ->  
17:57:45.597 -> TransModeWORPeriod : 0 -> 500ms
17:57:45.637 -> TransModeEnableLBT : 0 -> Disabled (default)
17:57:45.677 -> TransModeEnableRSSI: 0 -> Disabled (default)
17:57:45.717 -> TransModeFixedTrans: 0 -> Transparent transmission (default)
17:57:45.797 -> ----------------------------------------
17:57:45.837 -> Getting module information
17:57:46.077 -> Save mode returned not recognized!
17:57:46.117 -> 11
17:57:46.117 -> ----------------------------------------
17:57:46.157 -> HEAD: 0 0 0
17:57:46.197 -> Model no.: 0
17:57:46.197 -> Version  : C1
17:57:46.197 -> Features : 8
17:57:46.237 -> ----------------------------------------

What does Save mode returned not recognized! mean?

I have checked, double checked, triple checked the connections both visual and by using a multi-meter.

Here is the code I'm using:

#include "Arduino.h"
#include "EByte_LoRa_E220_library.h"

LoRa_E220 lora(2, 3, 4, 5, 6);  // software serial, AUX, M0, M1

void printParameters(struct Configuration configuration);
void printModuleInformation(struct ModuleInformation moduleInformation);
 
void setup()
{
  Serial.begin(9600);
  delay(1000);

  // Startup all pins and UART.
  Serial.println(F("Initializing LoRa"));
  lora.begin();

  ResponseStructContainer c;

  Serial.println(F("Getting configuration"));
  c = lora.getConfiguration();
  
  // It's important get configuration pointer before all other operation.
  Configuration configuration = *(Configuration*) c.data;
  Serial.println(c.status.getResponseDescription());
  Serial.println(c.status.code);

  printParameters(configuration);

  ResponseStructContainer cMi;

  Serial.println(F("Getting module information"));
  cMi = lora.getModuleInformation();
  
  // It's important get information pointer before all other operation.
  ModuleInformation mi = *(ModuleInformation*)cMi.data;

  Serial.println(cMi.status.getResponseDescription());
  Serial.println(cMi.status.code);

  printModuleInformation(mi);
  c.close();
}
 
void loop()
{
}

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

  Serial.print(F("HEAD : "));
  Serial.print(configuration.COMMAND, HEX);
  Serial.print(" ");
  Serial.print(configuration.STARTING_ADDRESS, HEX);
  Serial.print(" ");
  Serial.println(configuration.LENGHT, HEX);
  
  Serial.println(F(" "));
  Serial.print(F("AddH : "));
  Serial.println(configuration.ADDH, HEX);
  Serial.print(F("AddL : "));
  Serial.println(configuration.ADDL, HEX);

//  Serial.print(F("NetID : "));
//  Serial.println(configuration.NETID, HEX);
  
  Serial.println(F(" "));
  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.getUARTBaudRateDescription());
  
  Serial.print(F("SpeedAirDataRate   : "));
  Serial.print(configuration.SPED.airDataRate, BIN);
  Serial.print(" -> ");
  Serial.println(configuration.SPED.getAirDataRateDescription());
  
  Serial.println(F(" "));
  Serial.print(F("OptionSubPacketSett: "));
  Serial.print(configuration.OPTION.subPacketSetting, BIN);
  Serial.print(" -> ");
  Serial.println(configuration.OPTION.getSubPacketSetting());
  
  Serial.print(F("OptionTranPower    : "));
  Serial.print(configuration.OPTION.transmissionPower, BIN);
  Serial.print(" -> ");
  Serial.println(configuration.OPTION.getTransmissionPowerDescription());
  
  Serial.print(F("OptionRSSIAmbientNo: "));
  Serial.print(configuration.OPTION.RSSIAmbientNoise, BIN);
  Serial.print(" -> ");
  Serial.println(configuration.OPTION.getRSSIAmbientNoiseEnable());
  
  Serial.println(F(" "));
  Serial.print(F("TransModeWORPeriod : "));
  Serial.print(configuration.TRANSMISSION_MODE.WORPeriod, BIN);
  Serial.print(" -> ");
  Serial.println(configuration.TRANSMISSION_MODE.getWORPeriodByParamsDescription());

/*  Serial.print(F("TransModeTransContr: "));
  Serial.print(configuration.TRANSMISSION_MODE.WORTransceiverControl, BIN);
  Serial.print(" -> ");
  Serial.println(configuration.TRANSMISSION_MODE.getWORTransceiverControlDescription());
*/
  Serial.print(F("TransModeEnableLBT : "));
  Serial.print(configuration.TRANSMISSION_MODE.enableLBT, BIN);
  Serial.print(" -> ");
  Serial.println(configuration.TRANSMISSION_MODE.getLBTEnableByteDescription());
  
  Serial.print(F("TransModeEnableRSSI: "));
  Serial.print(configuration.TRANSMISSION_MODE.enableRSSI, BIN);
  Serial.print(" -> ");
  Serial.println(configuration.TRANSMISSION_MODE.getRSSIEnableByteDescription());

/*  Serial.print(F("TransModeEnabRepeat: "));
  Serial.print(configuration.TRANSMISSION_MODE.enableRepeater, BIN);
  Serial.print(" -> ");
  Serial.println(configuration.TRANSMISSION_MODE.getRepeaterModeEnableByteDescription());
*/
  Serial.print(F("TransModeFixedTrans: "));
  Serial.print(configuration.TRANSMISSION_MODE.fixedTransmission, BIN);
  Serial.print(" -> ");
  Serial.println(configuration.TRANSMISSION_MODE.getFixedTransmissionDescription());

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

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

  Serial.print(F("Model no.: "));
  Serial.println(moduleInformation.model, HEX);
  
  Serial.print(F("Version  : "));
  Serial.println(moduleInformation.version, HEX);
  
  Serial.print(F("Features : "));
  Serial.println(moduleInformation.features, HEX);
  Serial.println(F("----------------------------------------"));
}

It seems you're only getting zero values so I guess there is no or a bad connection to the module. Can you post a wiring diagram and a sharp picture of your setup?

Here is the wiring diagram. However, I have checked the wiring several times without finding any errors.

Also tried to make different type of errors (broken connections, switched TX and RX) which in all cases resulted in no contact with device.

So I think the wiring is OK.

I see a big mistook if the schematic is correct. When using serial communication figure they are very stubborn and fussy. TX is very finicky and will only talk to a RX at the same baud etc. On the other hand the RX will only listen to a TX at the same baud. Reverse the two that should get you going.

Reverse by moving TX to RX and visa versa? Tried that - did not work. Got a message that there was no contact with the device.

BTW, TX on the connector (and the LoRa) is connected to the RX on the controller. RX is connected to TX on the controller.

Enabled debug printing in the library. Got this

10:15:38.238 -> Initializing LoRa
10:15:38.278 -> RX MIC ---> 2
10:15:38.278 -> TX MIC ---> 3
10:15:38.278 -> AUX ---> 4
10:15:38.318 -> M0 ---> 5
10:15:38.318 -> M1 ---> 6
10:15:38.318 -> Init AUX pin!
10:15:38.358 -> Init M0 pin!
10:15:38.358 -> Init M1 pin!
10:15:38.358 -> Begin ex
10:15:38.398 -> Begin Software Serial
10:15:38.398 -> Begin 
10:15:38.438 -> MODE NORMAL!
10:15:38.438 -> AUX HIGH!
10:15:38.438 -> Complete!
10:15:38.478 -> Getting configuration
10:15:38.478 -> MODE SLEEP CONFIG!
10:15:38.518 -> AUX HIGH!
10:15:38.558 -> Complete!
10:15:38.558 -> 3
10:15:38.598 -> Available buffer: 11 structure size: 11
10:15:38.638 -> AUX HIGH!
10:15:38.638 -> Complete!
10:15:38.678 -> ----------------------------------------
10:15:38.718 -> HEAD : 0 C1 0
10:15:38.718 ->  
10:15:38.718 -> AddH : 8
10:15:38.758 -> AddL : 0
10:15:38.758 ->  
10:15:38.758 -> Chan : 0 -> 410MHz
10:15:38.758 ->  
10:15:38.798 -> SpeedParityBit     : 0 -> 8N1 (Default)
10:15:38.838 -> SpeedUARTDatte     : 0 -> 1200bps
10:15:38.838 -> SpeedAirDataRate   : 0 -> 2.4kbps
10:15:38.878 ->  
10:15:38.918 -> OptionSubPacketSett: 1 -> 128bytes
10:15:38.918 -> OptionTranPower    : 10 -> 13dBm
10:15:38.958 -> OptionRSSIAmbientNo: 1 -> Enabled
10:15:38.998 ->  
10:15:38.998 -> TransModeWORPeriod : 111 -> 4000ms
10:15:39.038 -> TransModeEnableLBT : 1 -> Enabled
10:15:39.078 -> TransModeEnableRSSI: 0 -> Disabled (default)
10:15:39.118 -> TransModeFixedTrans: 0 -> Transparent transmission (default)
10:15:39.198 -> ----------------------------------------
10:15:39.238 -> MODE NORMAL!
10:15:39.238 -> AUX HIGH!
10:15:39.278 -> Complete!
10:15:39.278 -> Save mode returned not recognized!
10:15:39.318 -> 11
10:15:39.318 -> ----------------------------------------
10:15:39.358 -> HEAD : 0 C1 0
10:15:39.398 ->  
10:15:39.398 -> AddH : 8
10:15:39.398 -> AddL : 0
10:15:39.398 ->  
10:15:39.398 -> Chan : 0 -> 410MHz
10:15:39.438 ->  
10:15:39.438 -> SpeedParityBit     : 0 -> 8N1 (Default)
10:15:39.478 -> SpeedUARTDatte     : 0 -> 1200bps
10:15:39.518 -> SpeedAirDataRate   : 0 -> 2.4kbps
10:15:39.558 ->  
10:15:39.558 -> OptionSubPacketSett: 1 -> 128bytes
10:15:39.598 -> OptionTranPower    : 10 -> 13dBm
10:15:39.638 -> OptionRSSIAmbientNo: 1 -> Enabled
10:15:39.678 ->  
10:15:39.678 -> TransModeWORPeriod : 111 -> 4000ms
10:15:39.718 -> TransModeEnableLBT : 1 -> Enabled
10:15:39.758 -> TransModeEnableRSSI: 0 -> Disabled (default)
10:15:39.798 -> TransModeFixedTrans: 0 -> Transparent transmission (default)
10:15:39.838 -> ----------------------------------------
10:15:39.878 -> Getting module information
10:15:39.918 -> MODE SLEEP CONFIG!
10:15:39.958 -> AUX HIGH!
10:15:39.958 -> Complete!
10:15:39.958 -> 3
10:15:39.998 -> Available buffer: 6 structure size: 6
10:15:40.038 -> AUX HIGH!
10:15:40.078 -> Complete!
10:15:40.078 -> MODE NORMAL!
10:15:40.118 -> AUX HIGH!
10:15:40.118 -> Complete!
10:15:40.158 -> ----------------------------------------
10:15:40.198 -> HEAD: 0 0 0
10:15:40.198 -> Model no.: C1
10:15:40.198 -> Version  : 8
10:15:40.238 -> Features : 3
10:15:40.238 -> Status : Save mode returned not recognized!
10:15:40.278 -> ----------------------------------------
10:15:40.318 -> Save mode returned not recognized!
10:15:40.358 -> 11
10:15:40.358 -> ----------------------------------------
10:15:40.398 -> HEAD: 0 0 0
10:15:40.438 -> Model no.: C1
10:15:40.438 -> Version  : 8
10:15:40.478 -> Features : 3
10:15:40.478 -> ----------------------------------------

Why do you have voltage dividers in the schematics when using an ESP32 at 3.3V and the LoRa device at the same voltage?

Are you using a different MCU?

The voltage divider on TX won't work. And why is there a pullup on RX?

I have done as described on the web page (#1). Assumed this was something that worked.

Probably not, because the web page describes different setups for 5V and 3.3V MCUs. For 5V use level shifters, for 3.3V do not.

Please answer the questions posted in #7.

Shit... damn fritzing diagrams. I see the mistake. Fixed the connections and it works now.

Thanks :slight_smile:

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