Home › Forums › The libraries hosted on the site › EByte LoRa e32 UART devices sx1262/sx1268 › EByte E32 868T30D reboot loop
Tagged: configuration, e32, esp32
- This topic has 11 replies, 3 voices, and was last updated 4 years, 1 month ago by
Renzo Mischianti.
-
AuthorPosts
-
-
28 March 2021 at 09:05 #11170
Claudio Barca
Ciao Renzo,
for a particular use case, I need to add an EBYTE 868T30D as LoRa receiver to TTGO T-CALL SIM800L board.
I use PlatformIO with your library
#include <Arduino.h> #include <HardwareSerial.h> #define E32_TTL_1W #define FREQUENCY_868 #include "LoRa_E32.h" #define LoRa_E32_DEBUG #define DEBUG_PRINTER Serial #define Receiver Serial2 uint32_t serialConfig = SERIAL_8N1; #define rxE32pin 27 #define txE32pin 19 #define M0 33 #define M1 35 #define AUX 34 void printParameters(struct Configuration configuration); void printModuleInformation(struct ModuleInformation moduleInformation); void setup() { Serial.begin(115200); delay(500); Receiver.begin(9600, SERIAL_8N1, rxE32pin, txE32pin); delay(500); LoRa_E32 e32ttl100(&Receiver, AUX, M0, M1); // Startup all pins and UART e32ttl100.begin(); ResponseStructContainer c; c = e32ttl100.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; cMi = e32ttl100.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(); cMi.close(); } void loop() { } void printParameters(struct Configuration configuration) { Serial.println("----------------------------------------"); Serial.print(F("HEAD BIN: ")); 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 BIN: ")); Serial.println(configuration.ADDH, BIN); Serial.print(F("AddL BIN: ")); Serial.println(configuration.ADDL, BIN); Serial.print(F("Chan BIN: ")); Serial.print(configuration.CHAN, DEC); Serial.print(" -> "); Serial.println(configuration.getChannelDescription()); Serial.println(F(" ")); Serial.print(F("SpeedParityBit BIN : ")); Serial.print(configuration.SPED.uartParity, BIN); Serial.print(" -> "); Serial.println(configuration.SPED.getUARTParityDescription()); Serial.print(F("SpeedUARTDataRate BIN : ")); Serial.print(configuration.SPED.uartBaudRate, BIN); Serial.print(" -> "); Serial.println(configuration.SPED.getUARTBaudRate()); Serial.print(F("SpeedAirDataRate BIN : ")); Serial.print(configuration.SPED.airDataRate, BIN); Serial.print(" -> "); Serial.println(configuration.SPED.getAirDataRate()); Serial.print(F("OptionTrans BIN : ")); Serial.print(configuration.OPTION.fixedTransmission, BIN); Serial.print(" -> "); Serial.println(configuration.OPTION.getFixedTransmissionDescription()); Serial.print(F("OptionPullup BIN : ")); Serial.print(configuration.OPTION.ioDriveMode, BIN); Serial.print(" -> "); Serial.println(configuration.OPTION.getIODroveModeDescription()); Serial.print(F("OptionWakeup BIN : ")); Serial.print(configuration.OPTION.wirelessWakeupTime, BIN); Serial.print(" -> "); Serial.println(configuration.OPTION.getWirelessWakeUPTimeDescription()); Serial.print(F("OptionFEC BIN : ")); Serial.print(configuration.OPTION.fec, BIN); Serial.print(" -> "); Serial.println(configuration.OPTION.getFECDescription()); Serial.print(F("OptionPower BIN : ")); 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("----------------------------------------"); }
Thank’s
Claudio, Torino
-
28 March 2021 at 19:07 #11180
Hi Claudio,
the configuration is wrong, you don’t initialize the Serial, the library do it for you.
You can look at this topic with the same esp32 configuration problem.EByte LoRa e32 not working on esp32: sends a random number, the other reads
If you need more information ask without problem.
Bye Renzo
-
31 March 2021 at 22:29 #11227
Good afternoon Renzo.
I have the same reboot-loop problem. I am using your example program to read the E32 configuration. It worked until yesterday. But when I used your “E32_Transparent_transmission” program, it didn’t work. And I reinstalled the read config one, but it no longer works. Is it possible that the E32 is damaged?Attachments:
You must be logged in to view attached files. -
1 April 2021 at 08:30 #11232
Hi,
the usage of Serial2 can’t work, because you do the begin and inside the library I do begin again.
To use custom pin on esp32 you can refer this articleEbyte LoRa E32 device for Arduino, esp32 or esp8266: library – Part 2
You can’t do
LoRa_E32 e32ttl100(&Serial2, AUX_PIN, M0_PIN, M1_PIN); Serial2.begin(9600, SERIAL_8N1, RX2_PIN, TX2_PIN); e32ttl100.begin();
because you start the serial 2 times
you must use something like thisLoRa_E32(RX2_PIN, TX2_PIN, &Serial2, AUX_PIN, M0_PIN, M1_PIN);
Bye Renzo
-
2 April 2021 at 01:00 #11265
Hector Alcala
ood afternoon Renzo, when placing the recommended instruction and compiling the program it throws me an error
#include “Arduino.h”
#include “LoRa_E32.h”
#define M0_PIN 18
#define M1_PIN 5
#define AUX_PIN 4
#define RX2_PIN 16
#define TX2_PIN 17#define E32_TTL_100
#define FREQUENCY_915// LoRa_E32 e32ttl100(&Serial2, AUX_PIN, M0_PIN, M1_PIN);
LoRa_E32(RX2_PIN, TX2_PIN, &Serial2, AUX_PIN, M0_PIN, M1_PIN);
void printParameters(struct Configuration configuration);
void printModuleInformation(struct ModuleInformation moduleInformation);void setup() {
Serial.begin(9600);
// Serial2.begin(9600, SERIAL_8N1, RX2_PIN, TX2_PIN);
IO_Ini();error:
Arduino: 1.8.13 (Windows 10), Board: “DOIT ESP32 DEVKIT V1, 80MHz, 921600, None”
E32_GetConfiguration_2:20:21: error: expected unqualified-id before numeric constant
#define RX2_PIN 16
^
E:\AZsystem_Control\azESP32\azLoRa\E32_GetConfiguration_2\E32_GetConfiguration_2.ino:28:14: note: in expansion of macro ‘RX2_PIN’
LoRa_E32(RX2_PIN, TX2_PIN, &Serial2, AUX_PIN, M0_PIN, M1_PIN);
^
E32_GetConfiguration_2:20:21: error: expected ‘)’ before numeric constant
#define RX2_PIN 16
^
E:\AZsystem_Control\azESP32\azLoRa\E32_GetConfiguration_2\E32_GetConfiguration_2.ino:28:14: note: in expansion of macro ‘RX2_PIN’
LoRa_E32(RX2_PIN, TX2_PIN, &Serial2, AUX_PIN, M0_PIN, M1_PIN);
^E:\AZsystem_Control\azESP32\azLoRa\E32_GetConfiguration_2\E32_GetConfiguration_2.ino: In function ‘void setup()’:
E32_GetConfiguration_2:41:5: error: ‘e32ttl100’ was not declared in this scope
e32ttl100.begin();
^exit status 1
expected unqualified-id before numeric constant -
2 April 2021 at 23:32 #11275
Hi Hector,
check Claudio configurazione, you must add the object Mame.
Bye Renzo
-
-
1 April 2021 at 08:36 #11233
Sometime reboot loop can be generated by
- wrong wiring
- wrong usage
- and the e32 that have some waste on flash, to fix this problem you need the usb-ttl EByte device with the original software
Bye Renzo
-
1 April 2021 at 20:37 #11258
I have verified and reset factory config to my E32868T30D.
It work as Transmitter on TTGO TCALL SIM800L.I’cant run it as Receiver. Continuous loop rebooting.
This is my PIN config.
This is my Setup and Loop (empty).
This is the result of printConfig :
Starting Receiver E32Series
No response from device! (Check wiring)
12
----------------------------------------
HEAD BIN: 10011001 153 99
AddH BIN: 11000011
AddL BIN: 10011010
Chan BIN: 138 -> 548MHz
SpeedParityBit BIN : 10 -> 8E1
SpeedUARTDataRate BIN : 101 -> 38400bps
SpeedAirDataRate BIN : 0 -> 0.3kbps
OptionTrans BIN : 1 -> Fixed transmission (first three bytes can be used as high/low address and channel)
OptionPullup BIN : 0 -> TXD, RXD, AUX are open-collectors
OptionWakeup BIN : 10 -> 750ms
OptionFEC BIN : 0 -> Turn off Forward Error Correction Switch
OptionPower BIN : 1 -> 17dBm
Any help is appreciated.
thank’s -
2 April 2021 at 23:25 #11274
Claudio
I have changed board, using now a NodeMCU ESP8266 as Receiver.
The Transmitter is running on TTGO TCALL, but I cannot receive any on NodeMCU.
As you can see below, ALL settings parameters are the same between TX and RX.There are the TTGO TCALL pin’s (TRANSMITTER)
//Â ——————————————–
//Â Â Â Â PINÂ TCALLÂ <–>Â E32868T30D
//Â ——————————————–
#define PIN_M0 19  // connect this to the EBYTE M0 pin  | GIALLO |  ARANCIO
#define PIN_M1 35  // connect this to the EBYTE M1 pin  | VERDE  |  GIALLO
#define PIN_TX 12  // connect this to the EBYTE RX pin  | BLU    |  BLU
#define PIN_RX 14  // connect this to the EBYTE TX pin  | VIOLA  |  VERDE
#define PIN_AUX 34 // connect this to the EBYTE AUX pin | GRIGIO |  VIOLA
LoRa_E32 e32Series(PIN_RX, PIN_TX, &ESerial, PIN_AUX, UART_BPS_RATE_9600, SERIAL_8N1);This is the output of printParameters of TRANSMITTER.
Starting Sender E32Series
Success
1
—————————————-
HEAD BIN: 11000000 192 C0AddH BIN: 0
AddL BIN: 0
Chan BIN: 6 -> 416MHzSpeedParityBit BIN : 0 -> 8N1 (Default)
SpeedUARTDataRate BIN : 11 -> 9600bps (default)
SpeedAirDataRate BIN : 10 -> 2.4kbps (default)
OptionTrans BIN : 0 -> Transparent transmission (default)
OptionPullup BIN : 1 -> TXD, RXD, AUX are push-pulls/pull-ups
OptionWakeup BIN : 0 -> 250ms (default)
OptionFEC BIN : 1 -> Turn on Forward Error Correction Switch (Default)
OptionPower BIN : 0 -> 20dBm (Default)
—————————————-
Success
1
—————————————-
HEAD BIN: 11000011 195 C3
Freq.: 45
Version : C
Features : 1E
—————————————-There are the NodeMCU pin’s (RECEIVER)
//Â ——————————————–
//Â Â Â Â PINÂ NODEMCUÂ <–>Â E32868T30D
//Â ——————————————–
#define PIN_M0 5   // D1 on the board (connect this to the EBYTE M0 pin)    | GIALLO
#define PIN_M1 4   // D2 on the board (connect this to the EBYTE M1 pin)    | VERDE
#define PIN_TX 12  // D6 on the board (connect this to the EBYTE RX pin)    | BLU
#define PIN_RX 14  // D5 on the board (connect this to the EBYTE TX pin)    | VIOLA
#define PIN_AUX 16 // D0 on the board (connect this to the EBYTE AUX pin)   | GRIGIOSoftwareSerial ESerial(PIN_RX, PIN_TX);
LoRa_E32 e32Series(PIN_RX, PIN_TX, UART_BPS_RATE_9600);This is the output of printParameters of RECEIVER.
—————————————-
HEAD BIN: 11000000 192 C0AddH BIN: 0
AddL BIN: 0
Chan BIN: 6 -> 416MHzSpeedParityBit BIN : 0 -> 8N1 (Default)
SpeedUARTDataRate BIN : 11 -> 9600bps (default)
SpeedAirDataRate BIN : 10 -> 2.4kbps (default)
OptionTrans BIN : 0 -> Transparent transmission (default)
OptionPullup BIN : 1 -> TXD, RXD, AUX are push-pulls/pull-ups
OptionWakeup BIN : 0 -> 250ms (default)
OptionFEC BIN : 1 -> Turn on Forward Error Correction Switch (Default)
OptionPower BIN : 0 -> 20dBm (Default)
—————————————-
Success
1
—————————————-
HEAD BIN: 11000011 195 C3
Freq.: 45
Version : C
Features : 1E
—————————————-The loop receiver code is that:
if (e32Series.available() > 0)
{
Serial.println(“———-“);
ResponseContainer rc = e32Series.receiveMessage();
Serial.println(rc.data);
// Is something goes wrong print error
if (rc.status.code != 1)
{
rc.status.getResponseDescription();
}
else
{
blinkled(1);
// Print the data received
Serial.println(rc.data);
}
}Any signal was received from e32Series serial port, ii is not available.
Any suggest please ?
Thank’s
Claudio
-
-
AuthorPosts
- You must be logged in to reply to this topic.