Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • Rix
    Participant

      Hi, Renzo. Thank you for the advice I’ll do exactly that, external 5V to Ebyte 32. and the logic still remains 3.3v so it won’t burn my esp32 right? ok, I’ll do it.

      Rix
      Participant

        Hi, Renzo thank you for the reply, and I hope you get well soon. as you said it is the wire problem (again) and I think maybe some power problem too? I think that this device consumes a lot of power for esp32 size. it has worked now perfectly smooth. thankyou very much. ill try to power this device through an external source with 3.3v. I hope it can reach at least 1KM. once again thank you

        Rix
        Participant

          Hi Renzo, can you help me out?
          it worked for two-way communication I have figured it out. but still, sometimes I get the same problem but this time I can tell that the problem is only after the library tells me “timeout !!” and then the guru meditation error start. and the time out is always after the second message and my receiver don’t get any data even when the status said the success.

          I will really appreciate for your help.

          Rix
          Participant

            on the first device, lora 1

            Rix
            Participant

              starting when I want this lora to be two-way communication. at first, it was all just fine and then this happen when trying two-way communication and now it just continues to do that. but the two-way communication work if the error code not happening. when I unplug Lora there is no error code I try to switch the lora but it does the same.

              Rix
              Participant

                sometimes it can be solved by just unplugging the lora, and re plug but sometimes it doesn’t work

                Rix
                Participant

                  Yes, I always get this error.

                  Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
                  Core 1 register dump:
                  PC      : 0x4000c2af  PS      : 0x00060730  A0      : 0x800d176c  A1      : 0x3ffb1f20  
                  A2      : 0x3ffb1f42  A3      : 0x00000000  A4      : 0x00000006  A5      : 0x3ffb1f42  
                  A6      : 0x00000010  A7      : 0x00000000  A8      : 0x00000000  A9      : 0x00000000  
                  A10     : 0x00000009  A11     : 0x00000003  A12     : 0x00000064  A13     : 0x00000457  
                  A14     : 0x00000011  A15     : 0x00000008  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c  
                  EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  
                  
                  ELF file SHA256: 0000000000000000
                  
                  Backtrace: 0x4000c2af:0x3ffb1f20 0x400d1769:0x3ffb1f30 0x400d1882:0x3ffb1f80 0x400d4912:0x3ffb1fb0 0x40086a75:0x3ffb1fd0

                  here is my sketch. it was a long sketch I just make it simple so there is a lot of garbage variable

                  Lora 1

                  
                  // software 2 khusus untuk hardware 2 untuk terhubung ke WiFi dan bot Telegram
                  //***************************************************
                  //#define FREQUENCY_915 //define frekuensi
                  #include <Arduino.h>
                  #include <WiFi.h>
                  #include <ESP32Ping.h>
                  #include <CTBot.h>
                  #include <LoRa_E32.h>
                  #include <SPI.h>
                  #include <Wire.h>
                  #include <Adafruit_I2CDevice.h>
                  #include <Adafruit_GFX.h>
                  #include <Adafruit_SSD1306.h>
                  
                  #define FPM_SLEEP_MAX_TIME 0xFFFFFFF
                  #define AUX 18
                  #define M0 19
                  #define M1 23
                  #define SCREEN_WIDTH 128    // OLED display width, in pixels
                  #define SCREEN_HEIGHT 32    // OLED display height, in pixels
                  #define OLED_RESET -1       // Reset pin # (or -1 if sharing Arduino reset pin)
                  #define SCREEN_ADDRESS 0x3C ///< See datasheet for Address; 0x3D for 128×64, 0x3C for 128×32
                  
                  Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
                  
                  // Variabel global
                  unsigned long lastSendTime = 0;
                  unsigned long interval = 10000;
                  String Data = "";
                  String JenisPesanLora = "";
                  
                  // memulai serial untuk LoRa
                  LoRa_E32 e32ttl100(16, 17, &Serial2, AUX, M0, M1, UART_BPS_RATE_9600, SERIAL_8N1); // RX ESP32,TX ESP32, mode Serial, Pin Aux, M0, M1
                  // memulai untuk dual core
                  TaskHandle_t task0, task1;
                  
                  //**************************************************************
                  // gunakan apabila diperlukan pemasangan wifi manual
                  String wifiSSID = "Mi 10T Amien";     // nama wifi anda
                  String wifiPassword = "123123456789"; // password wifi
                  //*************************************************************
                  
                  TBMessage tMessage;
                  String pingGoogle = "www.google.com";
                  String tokenBot = "5397733058:AAHD7UoshanXX-7TIEjPRT02iaCng6qUsso";
                  CTBot myBot;
                  
                  // Deklarasi Fungsi
                  void callback();
                  void nodeConfig();   // konfigurasi LoRa
                  void cekpesanLoRa(); // cek pesan LoRa
                  void printParameters(struct Configuration configuration);
                  void kirimpesanlora();
                  
                  void setup()
                  {
                    // put your setup code here, to run once:
                    Serial.begin(9600);
                    delay(1000);
                    // start LoRa
                    e32ttl100.begin();
                    nodeConfig(); // konfigurasi LoRa
                  
                    // start masing masing task di core masing masing
                    //  task0 khusus untuk cek LoRa dan task1 untuk bot dan akses WiFi
                  }
                  
                  // LOOP
                  //*******************************************************************************
                  void loop()
                  {
                    if (e32ttl100.available() <= 0)
                    {
                      if (millis() - lastSendTime > interval)
                      {
                        JenisPesanLora = "GPS";
                        lastSendTime = millis();
                      }
                      else
                      {
                        JenisPesanLora = "STS";
                      }
                      kirimpesanlora();
                      delay(1500);
                    }
                    cekpesanLoRa();
                    delay(2000);
                  }
                  //*******************************************************************************
                  
                  //****————————–Callback Lora————————–****
                  void callback()
                  {
                    Serial.println("Callback");
                    Serial.flush();
                  }
                  
                  //****————————–Konfigurasi LoRa————————–****
                  void nodeConfig()
                  {
                    ResponseStructContainer c;
                    c = e32ttl100.getConfiguration();
                    Configuration configuration = *(Configuration *)c.data;
                    configuration.ADDH = 0x0;
                    configuration.ADDL = 0x3;
                    configuration.CHAN = 0x2;
                    configuration.SPED.airDataRate = AIR_DATA_RATE_010_24;
                    configuration.SPED.uartBaudRate = UART_BPS_9600;
                    configuration.SPED.uartParity = MODE_00_8N1;
                    configuration.OPTION.fec = FEC_1_ON;
                    configuration.OPTION.fixedTransmission = FT_FIXED_TRANSMISSION;
                    configuration.OPTION.ioDriveMode = IO_D_MODE_PUSH_PULLS_PULL_UPS;
                    configuration.OPTION.transmissionPower = POWER_20;
                    configuration.OPTION.wirelessWakeupTime = WAKE_UP_1250;
                    // Set configuration changed and set to not hold the configuration
                    ResponseStatus rs = e32ttl100.setConfiguration(configuration, WRITE_CFG_PWR_DWN_SAVE);
                    printParameters(configuration);
                    Serial.print("Config: ");
                    Serial.println(rs.getResponseDescription());
                    c.close();
                  }
                  
                  //****————————–Cek Pesan LoRa————————–****
                  void cekpesanLoRa()
                  {
                    if (e32ttl100.available() > 0)
                    {
                      Serial.println("———-");
                  
                      ResponseContainer rc = e32ttl100.receiveMessageUntil();
                      // Kalau Error print errornya
                      if (rc.status.code != 1)
                      {
                        rc.status.getResponseDescription();
                      }
                      else
                      {
                        // Print data yang diterima
                        Serial.println(rc.data);
                        Data = rc.data;
                      }
                    }
                  }
                  
                  //****————————–Cek parameter konfigurasi LoRa————————–****
                  void printParameters(struct Configuration configuration)
                  {
                    Serial.println("—————————————-");
                  
                    Serial.print(F("HEAD : "));
                    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 : "));
                    Serial.println(configuration.ADDH, DEC);
                    Serial.print(F("AddL : "));
                    Serial.println(configuration.ADDL, DEC);
                    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.getUARTBaudRate());
                    Serial.print(F("SpeedAirDataRate : "));
                    Serial.print(configuration.SPED.airDataRate, BIN);
                    Serial.print(" -> ");
                    Serial.println(configuration.SPED.getAirDataRate());
                  
                    Serial.print(F("OptionTrans : "));
                    Serial.print(configuration.OPTION.fixedTransmission, BIN);
                    Serial.print(" -> ");
                    Serial.println(configuration.OPTION.getFixedTransmissionDescription());
                    Serial.print(F("OptionPullup : "));
                    Serial.print(configuration.OPTION.ioDriveMode, BIN);
                    Serial.print(" -> ");
                    Serial.println(configuration.OPTION.getIODroveModeDescription());
                    Serial.print(F("OptionWakeup : "));
                    Serial.print(configuration.OPTION.wirelessWakeupTime, BIN);
                    Serial.print(" -> ");
                    Serial.println(configuration.OPTION.getWirelessWakeUPTimeDescription());
                    Serial.print(F("OptionFEC : "));
                    Serial.print(configuration.OPTION.fec, BIN);
                    Serial.print(" -> ");
                    Serial.println(configuration.OPTION.getFECDescription());
                    Serial.print(F("OptionPower : "));
                    Serial.print(configuration.OPTION.transmissionPower, BIN);
                    Serial.print(" -> ");
                    Serial.println(configuration.OPTION.getTransmissionPowerDescription());
                  
                    Serial.println("—————————————-");
                  }
                  
                  void kirimpesanlora()
                  {
                    String Sampaikan = "";
                    if (JenisPesanLora == "STS")
                    {
                      Sampaikan += "STS\0";
                    }
                    else if (JenisPesanLora == "GPS")
                    {
                      Sampaikan += "GPS\0";
                    }
                    ResponseStatus rs = e32ttl100.sendFixedMessage(0x0, 0x1, 0x2, Sampaikan);
                    Serial.println("Sending " + Sampaikan);
                    Serial.println(rs.getResponseDescription());
                  }
                  

                  Lora 2

                  
                  #include <Arduino.h>
                  #include <TinyGPSPlus.h>
                  //#define E32_TTL_100
                  //#define FREQUENCY_915
                  #include <LoRa_E32.h>
                  #include <SPI.h>
                  #include <Wire.h>
                  #include <Adafruit_I2CDevice.h>
                  #include <Adafruit_GFX.h>
                  #include <Adafruit_SSD1306.h>
                  #define AUX 18
                  #define M0 19
                  #define M1 23
                  #define RXPin 2
                  #define TXPin 4
                  #define TRIG_PIN_1 25 // ESP32 pin GIOP25 connected to Ultrasonic Sensor’s TRIG pin
                  #define TRIG_PIN_2 26 // ESP32 pin GIOP26 TRIG pin
                  #define TRIG_PIN_3 33 // ESP32 pin GIOP33 TRIG pin
                  #define ECHO_PIN_1 34 // ESP32 pin GIOP34 connected to Ultrasonic Sensor’s ECHO pin
                  #define ECHO_PIN_2 35 // ESP32 pin GIOP35 ECHO pin
                  #define ECHO_PIN_3 36 // ESP32 pin GIOP36/VN ECHO pin
                  
                  static const uint32_t GPSBaud = 9600;
                  
                  // HardwareSerial serial1(2);
                  LoRa_E32 e32ttl100(16, 17, &Serial2, AUX, M0, M1, UART_BPS_RATE_9600, SERIAL_8N1);
                  HardwareSerial ss(1); // GPS hardware serial
                  // memulai untuk dual core
                  TaskHandle_t task0, task1;
                  
                  // Variable global
                  int jeda_sensor = 5000;
                  unsigned long millis_sekarang = 0;
                  float duration_us_1, distance_cm_1;
                  float duration_us_2, distance_cm_2;
                  float duration_us_3, distance_cm_3;
                  String Data = "";
                  String data_masuk;
                  int interval = 5000;
                  int interval2 = 32150;
                  int interval3 = 5000;
                  int interval4 = 5000;
                  int interval5 = 5000;
                  unsigned long lastSendTime = 0;
                  unsigned long lastSendTime2 = 0;
                  unsigned long lastSendTime3 = 0;
                  unsigned long lastSendTime4 = 0;
                  unsigned long lastSendTime5 = 0;
                  bool islampuon = 0;
                  bool issetrumon = 0;
                  
                  TinyGPSPlus gps; // memulai GPS NEO-6M
                  
                  // deklarasi fungsi
                  void nodeConfig();
                  void Kirim_GPS_LoRa();
                  void Baca_Pesan_LoRa();
                  
                  void setup()
                  {
                    // komunikasi serial
                    Serial.begin(9600);
                    delay(600);
                    // configure the trigger pin to output mode
                    pinMode(TRIG_PIN_1, OUTPUT);
                    pinMode(TRIG_PIN_2, OUTPUT);
                    pinMode(TRIG_PIN_3, OUTPUT);
                    // configure the echo pin to input mode
                    pinMode(ECHO_PIN_1, INPUT);
                    pinMode(ECHO_PIN_2, INPUT);
                    pinMode(ECHO_PIN_3, INPUT);
                  
                    // komunikasi LoRa
                    e32ttl100.begin(); // memulai LoRa
                    nodeConfig();      // konfigurasi LoRa
                  }
                  
                  //*********************LOOP***********************
                  //*********************LOOP***********************
                  void loop()
                  {
                    Baca_Pesan_LoRa();
                    delay(100);
                  }
                  //*********************LOOP***********************
                  //*********************LOOP***********************
                  
                  //*********************KONFIGURASI LoRa***********************
                  void nodeConfig()
                  {
                    ResponseStructContainer c;
                    c = e32ttl100.getConfiguration();
                    Configuration configuration = *(Configuration *)c.data;
                    configuration.ADDH = 0x0;
                    configuration.ADDL = 0x1;
                    configuration.CHAN = 0x2;
                    configuration.SPED.airDataRate = AIR_DATA_RATE_010_24;
                    configuration.SPED.uartBaudRate = UART_BPS_9600;
                    configuration.SPED.uartParity = MODE_00_8N1;
                    configuration.OPTION.fec = FEC_1_ON;
                    configuration.OPTION.fixedTransmission = FT_FIXED_TRANSMISSION;
                    configuration.OPTION.ioDriveMode = IO_D_MODE_PUSH_PULLS_PULL_UPS;
                    configuration.OPTION.transmissionPower = POWER_20;
                    configuration.OPTION.wirelessWakeupTime = WAKE_UP_1250;
                    // Set configuration changed and set to not hold the configuration
                    ResponseStatus rs = e32ttl100.setConfiguration(configuration, WRITE_CFG_PWR_DWN_SAVE);
                    Serial.print("Config: ");
                    Serial.println(rs.getResponseDescription());
                  }
                  
                  //*********************Lora Rutin***********************
                  void Kirim_GPS_LoRa()
                  {
                    String Sampaikan = "";
                    if (data_masuk == "STS")
                    {
                      Sampaikan += "Status\n";
                      Sampaikan += "LAman\n";
                      Sampaikan += "SAman\0";
                    }
                    else if (data_masuk == "GPS")
                    {
                      Sampaikan += "Lokasi\n";
                      Sampaikan += "Aman\0";
                    }
                  
                    ResponseStatus rs = e32ttl100.sendFixedMessage(0x0, 0x3, 0x2, Sampaikan);
                    Serial.println("Sending " + Sampaikan);
                    Serial.println(rs.getResponseDescription());
                  }
                  
                  //*********************Baca pesan lora dari esp lain***********************
                  void Baca_Pesan_LoRa()
                  {
                    if (e32ttl100.available() > 0)
                    {
                      Serial.println("———-");
                      ResponseContainer rc = e32ttl100.receiveMessageUntil();
                      // Kalau Error print errornya
                      if (rc.status.code != 1)
                      {
                        rc.status.getResponseDescription();
                      }
                      else
                      {
                        // Print data yang diterima
                        Serial.println(rc.data);
                        Data = rc.data;
                        data_masuk = Data;
                        delay(1000);
                        Kirim_GPS_LoRa();
                      }
                    }
                  }
                  

                  it is a bit mess. please help. im going out of my mind, this is my final college project

                  Rix
                  Participant

                    hi Renzo Mischianti. thank you for the replies, I’m currently building peer-to-peer communication for esp32 using Lora EBYTE e32 900T20D. I can’t find a way to make them talk to each other. like it only works for one-way communication, the other one cannot be a transceiver after it becomes a receiver. can you give me an example code for peer-to-peer communication for fixed transmission? it would be very useful. thank you

                    I’m using LoRa to help fishermen in my area to manage and handle their Fish Aggregating Devices. which is why I need two-way communication.

                    in reply to: EByte LoRa e32: high sending and receiving latency #20541
                    Rix
                    Participant

                      Hi, thank you. I have fixed it, it is because bad cable

                    Viewing 9 posts - 1 through 9 (of 9 total)