EByte E32 868T30D reboot loop

Viewing 6 reply threads
  • Author
    Posts
    • #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

         

         

         

      • #11180
        Renzo Mischianti
        Keymaster

          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

        • #11227
          Hector Alcala
          Participant

            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?

          • #11232
            Renzo Mischianti
            Keymaster

              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 article

              Ebyte 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 this

              
              LoRa_E32(RX2_PIN, TX2_PIN, &Serial2, AUX_PIN, M0_PIN, M1_PIN);
              

              Bye Renzo

              • #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

                • #11275
                  Renzo Mischianti
                  Keymaster

                    Hi Hector,
                    check Claudio configurazione, you must add the object Mame.
                    Bye Renzo

                • #11233
                  Renzo Mischianti
                  Keymaster

                    Sometime reboot loop can be generated by

                    Bye Renzo

                  • #11258
                    Claudio
                    Participant

                      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

                    • #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 C0

                        AddH BIN: 0
                        AddL BIN: 0
                        Chan BIN: 6 -> 416MHz

                        SpeedParityBit 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)   | GRIGIO

                        SoftwareSerial 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 C0

                        AddH BIN: 0
                        AddL BIN: 0
                        Chan BIN: 6 -> 416MHz

                        SpeedParityBit 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

                        • #11276
                          Renzo Mischianti
                          Keymaster

                            Hi Claudio,
                            check with tester of m0 and M1 are correctly setted.
                            Bye Renzo

                          • #11278
                            Claudio
                            Participant

                              M0 & M1 must be grounded for transparent mode ?

                            • #11281
                              Renzo Mischianti
                              Keymaster

                                Yes, all LOW.
                                Bye Renzo

                          Viewing 6 reply threads
                          • You must be logged in to reply to this topic.
                          Exit mobile version