Home › Forums › The libraries hosted on the site › EByte LoRa e220 UART devices LLCC68 › E220-900T22D: Can’t communicate with higher UART Baud rate/Air data rate
Tagged: E220-900T22D, EByte E220, esp32, lora
- This topic has 2 replies, 2 voices, and was last updated 5 months, 1 week ago by
aleemont.
-
AuthorPosts
-
-
8 December 2024 at 17:34 #31928
I have two E220-900T22D modules with the following configuration:
Transmitter (mounted on Arduino Nano ESP32):configuration.ADDL = 0x03;
configuration.ADDH = 0x00;
configuration.CHAN = 23;
configuration.SPED.uartBaudRate = UART_BPS_9600;
configuration.SPED.airDataRate = AIR_DATA_RATE_010_24;
configuration.SPED.uartParity = MODE_00_8N1;
configuration.OPTION.subPacketSetting = SPS_200_00;
configuration.OPTION.RSSIAmbientNoise = RSSI_AMBIENT_NOISE_DISABLED;
configuration.OPTION.transmissionPower = POWER_22;
configuration.TRANSMISSION_MODE.enableRSSI = RSSI_ENABLED;
configuration.TRANSMISSION_MODE.fixedTransmission = FT_FIXED_TRANSMISSION;
configuration.TRANSMISSION_MODE.enableLBT = LBT_DISABLED;
configuration.TRANSMISSION_MODE.WORPeriod = WOR_2000_011;
Receiver (mounted on ESP32-WROOM32):
configuration.ADDL = 0x05;
configuration.ADDH=0x00;
configuration.CHAN=23;
configuration.SPED.uartBaudRate = UART_BPS_9600;
configuration.SPED.airDataRate = AIR_DATA_RATE_010_24;
configuration.SPED.uartParity = MODE_00_8N1;
configuration.OPTION.subPacketSetting = SPS_200_00;
configuration.OPTION.RSSIAmbientNoise = RSSI_AMBIENT_NOISE_DISABLED;
configuration.OPTION.transmissionPower = POWER_22;
configuration.TRANSMISSION_MODE.enableRSSI = RSSI_ENABLED;
configuration.TRANSMISSION_MODE.fixedTransmission = FT_FIXED_TRANSMISSION;
configuration.TRANSMISSION_MODE.enableLBT = LBT_DISABLED;
configuration.TRANSMISSION_MODE.WORPeriod = WOR_2000_011;
In this configuration I have no problems with communication, but for large packets, which I split in chunks of 200bytes each, the transmission of each chunk takes around 1s which is too slow.
I tried increasing the UART baud rate by setting:
configuration.SPED.uartBaudRate=UART_BPS_19200;
and leaving all the rest unchanged (obviously I also used the same baud rate on my Serial ports on both the microcontrollers).
The modules correctly get the configuration, and the transmitter starts transmitting packets (or so it says as it returns E220_SUCCESS as ResponseStatus code), but the receiver doesn’t seem to get any packet.
I also tried increasing the uartBaudRate to 115000, and tried some combinations with airDataRate values (augmenting and diminishing it in various configurations), but it looks like I can only communicate with the default values of these options (9600 and 1024 resectively).Am I missing something? Do I need to set some other values to get higher transmission speed on these modules?
If you need the methods I use for transmission and the sketch for reception I can attach it.
Thanks
-
9 December 2024 at 09:55 #31932
Hi aleemont,
I think to change speed, you must change the Air data rate. If you want to change the baud rate (I don’t remember very well), you must also set the baud rate on the initial constructor.
By default, It is set to 9600.LoRa_E220(byte txE220pin, byte rxE220pin, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600); LoRa_E220(byte txE220pin, byte rxE220pin, byte auxPin, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600); LoRa_E220(byte txE220pin, byte rxE220pin, byte auxPin, byte m0Pin, byte m1Pin, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600);
Try and give me a feedback.
Bye Renzo-
10 December 2024 at 18:40 #31934
Using any of the following constructors causes both boards to go in kernel panic as the getConfiguration() returns a null pointer.
Here’s the receiver code:#define E220_22
#define FREQUENCY_868
#define ENABLE_RSSI
<div>
<div>#include <Arduino.h>
</div>
<div>#include <LoRa_E220.h>
</div>
</div>
byte RX_PIN = 16;
byte TX_PIN = 17;
byte AUX_PIN = 18; // not used
byte M0_PIN = 19; // not used
byte M1_PIN = 21; // not used
void printParameters(struct Configuration configuration);
// byte txE220pin, byte rxE220pin, HardwareSerial* serial, byte auxPin, byte m0Pin, byte m1Pin, UART_BPS_RATE bpsRate, uint32_t serialConfig = SERIAL_8N1
LoRa_E220 e220ttl(&Serial2, AUX_PIN, M0_PIN, M1_PIN, UART_BPS_RATE_115200); // RX AUX M0 M1
// LoRa_E220 e220ttl(&Serial2, 22, 4, 18, 21, 19, UART_BPS_RATE_9600); // esp32 RX <-- e220 TX, esp32 TX --> e220 RX AUX M0 M1
void setup()
{
Serial2.begin(115200);
Serial.begin(115200);
delay(500);
digitalWrite(M0_PIN, LOW);
digitalWrite(M1_PIN, LOW);
// Startup all pins and UART
bool res = e220ttl.begin();
//Serial.println("Begin: " + String(res));
ResponseStructContainer c;
c = e220ttl.getConfiguration();
//Error is happening here
Serial.println("Error happens here");
// It's important get configuration pointer before all other operation
Configuration configuration = *(Configuration *)c.data;
Serial.println("And I can't get here");
Serial.println(c.status.getResponseDescription());
Serial.println(c.status.code);
// printParameters(configuration);
configuration.ADDL = 0x05;
configuration.ADDH = 0x00;
configuration.CHAN = 23;
configuration.SPED.uartBaudRate = UART_BPS_115200;
configuration.SPED.airDataRate = AIR_DATA_RATE_111_625;
configuration.SPED.uartParity = MODE_00_8N1;
configuration.OPTION.subPacketSetting = SPS_200_00;
configuration.OPTION.RSSIAmbientNoise = RSSI_AMBIENT_NOISE_DISABLED;
configuration.OPTION.transmissionPower = POWER_22;
configuration.TRANSMISSION_MODE.enableRSSI = RSSI_ENABLED;
configuration.TRANSMISSION_MODE.fixedTransmission = FT_FIXED_TRANSMISSION;
configuration.TRANSMISSION_MODE.enableLBT = LBT_DISABLED;
configuration.TRANSMISSION_MODE.WORPeriod = WOR_2000_011;
// Set configuration changed and set to not hold the configuration
ResponseStatus rs = e220ttl.setConfiguration(configuration, WRITE_CFG_PWR_DWN_SAVE);
Serial.println(rs.getResponseDescription());
Serial.println(rs.code);
c.close();
c = e220ttl.getConfiguration();
// It's important get configuration pointer before all other operation
configuration = *(Configuration *)c.data;
Serial.println(c.status.getResponseDescription());
Serial.println(c.status.code);
//printParameters(configuration);
c.close();
//Serial.println("Start receiving!");
}
void loop()
{
// If something available
if (e220ttl.available())
{
// Serial.println("Message received!");
// read the String message
#ifdef ENABLE_RSSI
ResponseContainer rc = e220ttl.receiveMessageRSSI();
#else
ResponseContainer rc = e220ttl.receiveMessage();
#endif
// Is something goes wrong print error
if (rc.status.code != 1)
{
Serial.println(rc.status.getResponseDescription());
}
else
{
// Print the data received
// Serial.println(rc.status.getResponseDescription());
Serial.println(rc.data);
#ifdef ENABLE_RSSI
Serial.print("RSSI: ");
Serial.println(rc.rssi, DEC);
#endif
}
}
}
void printParameters(struct Configuration configuration)
{
Serial.println("----------------------------------------");
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.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("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("TransModeFixedTrans: "));
Serial.print(configuration.TRANSMISSION_MODE.fixedTransmission, BIN);
Serial.print(" -> ");
Serial.println(configuration.TRANSMISSION_MODE.getFixedTransmissionDescription());
Serial.println("----------------------------------------");
}
And here’s the output on the Serial Monitor (with DEBUG_PRINT enabled):
ets Jul 29 2019 12:21:46
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13232
load:0x40080400,len:3028
entry 0x400805e4
RX MIC ---> -1
TX MIC ---> -1
AUX ---> 18
M0 ---> 19
M1 ---> 21
Init AUX pin!
Init M0 pin!
Init M1 pin!
Begin ex
Begin Hardware Serial
Begin
MODE NORMAL!
AUX HIGH!
Complete!
Error happens here
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x40085e13 PS : 0x00060830 A0 : 0x800d173d A1 : 0x3ffb2220
A2 : 0x3ffb2251 A3 : 0x00000000 A4 : 0x0000000b A5 : 0x3ffb2251
A6 : 0x00000001 A7 : 0x0800001c A8 : 0x800d2da0 A9 : 0x3ffb21f0
A10 : 0x00000002 A11 : 0x3f400276 A12 : 0x00000078 A13 : 0xffffffff
A14 : 0xffffffff A15 : 0x3ffbdbac SAR : 0x0000000a EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x40086431 LEND : 0x40086441 LCOUNT : 0xffffffff
Backtrace: 0x40085e10:0x3ffb2220 0x400d173a:0x3ffb2230 0x400d47da:0x3ffb2290
And it’s basically the same on the receiver.
I was able to use only 9600 as BPS rate, still being able to use different Air Data Rate values.
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.