Starting LoRa failed!

Hi guys, i have a Heltec ESP32 wifi Lora V3, my code is correct, but when i start the lora in the Heltec.begin(true, true, true, true, BAND);, in the OLED of LoRa is write “Starting LoRa failed!”, but when i try to replace the true of LoRa enable to LoRa disable, my code running normally
I’m Brazilian, so there are many words that you won’t understand

my code:
#include <Wire.h>

#include <heltec.h>

#include <WiFi.h>

#define BAND 915

int contador = 0;

const char* ssid = “Stark_wifi”;

const char* password = “35475024”;

void setup() {

Serial.begin(115200, SERIAL_8N1, 3, 1);

delay(2000); // Adicione um atraso para permitir a conexão Serial

Serial.println(“Iniciando…”);

// Conectar à rede Wi-Fi

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {

delay(1000);

Serial.println("Conectando ao WiFi...");

}

Serial.println(“AAAAAAAAAAAAAAAAAA”);

Heltec.begin(true /DisplayEnable Enable/, false /LoRa Enable/, true /Serial Enable/, true /PABOST Enale/, BAND);

}

void loop() {

Heltec.display->setTextAlignment(TEXT_ALIGN_LEFT);

Heltec.display->setContrast(255);

Heltec.display->setFont(ArialMT_Plain_10);

Heltec.display->drawString(0, 0, "Enviando Pacote: ");

Heltec.display->drawString(90, 0, String(contador));

Heltec.display->setFont(ArialMT_Plain_16);

Heltec.display->drawString(0, 22, “Progamador”);

Heltec.display->drawString(0, 45, “Rafael”);

Heltec.display->display();

Serial.print("Enviando: ");

Serial.println(contador);

Heltec.display->clear();

Heltec.display->drawString(0, 0, "Enviando: " + String(contador));

Heltec.display->display();

Serial.print("Enviando contador: ");

Serial.println(contador);

Heltec.LoRa.beginPacket();

Heltec.LoRa.print("Contador: ");

Heltec.LoRa.print(contador);

Heltec.LoRa.endPacket();

contador++;

delay(2000); // Envie a cada 5 segundos

}

Heltec.h is the wrong library for V3. You have to use the Radio Lib. But it is difficult to get it working beetween V3 and V2.

1 Like

https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series,This is Heltec’s development environment, supporting all series of development boards. There are new instances of Lora inside. I hope this will be helpful to you

Hello Rafael-Angelo,

Because I’have the same problem, can you tell me if you resolved your problem?
Thank’s,
Bruno