Replies: 7 comments 15 replies
-
You have provided us nearly zero information - no serial output, no hardware description, and the code you have is so wrong it's not worth fixing. Use the default GNSS examples and reads the device documentation. Unless you can give us more information there's nothing we can do.
You seem to have to have started a project that is way above your experience. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@Mcz1025, you appear to have removed your original issue from the top of this thread along with your comments, leaving the efforts by the volunteers to assist you out of context. You should not expect too much enthusiasm from people to help if you show such disrespect. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
GNSS communication with esp32-s3-mini and LoRa LR1120 module embedded in a custom prototype.
Hello everyone I hope you are very well, I am writing because I need help in GNSS satellite communication as I am implementing the radiolib library but for some reason the function (int state = radio.gnssScan(&gnssResult;) is not running I understand that it is a custom design and can also hardware errors but I have reviewed and measured voltages in the modules and all is well working at 3. 3 v I have the satellite trace is fine I want you to help me with the communication please the only different thing is that for some reason the IRQ pin does not connect it to the LR1120 module with the esp32 for that reason I do not use the IRQ I am totally grateful for any help you can give me thank you very much and greetings.
#include <RadioLib.h>
#include <SPI.h>
// Definición de pines según tus conexiones
#define NSS 34
#define RESET 39
#define BUSY 26
#define SCK 36
#define MOSI 35
#define MISO 37
#define DIO1 2
#define LNA 33
// Inicializa el módulo LR1120 con los pines configurados
LR1120 radio = new Module(NSS,RADIOLIB_NC,RESET, BUSY);
// Tabla de configuración del switch RF (puedes ajustarla según tu hardware)
static const uint32_t rfswitch_dio_pins[] = {
RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6,
RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC
};
static const Module::RfSwitchMode_t rfswitch_table[] = {
{ LR11x0::MODE_STBY, { LOW, LOW } },
{ LR11x0::MODE_RX, { HIGH, LOW } },
{ LR11x0::MODE_TX, { HIGH, HIGH } },
{ LR11x0::MODE_TX_HP, { LOW, HIGH } },
{ LR11x0::MODE_TX_HF, { LOW, LOW } },
{ LR11x0::MODE_GNSS, { LOW, LOW } },
{ LR11x0::MODE_WIFI, { LOW, LOW } },
END_OF_MODE_TABLE,
};
// Estructuras para guardar los resultados de la GNSS
LR11x0GnssResult_t gnssResult;
LR11x0GnssPosition_t gnssPosition;
// Variables de temporización
unsigned long previousMillis = 0; // Almacena el tiempo previo
const unsigned long interval = 10000; // Intervalo de tiempo (10 segundos)
void setup() {
Serial.begin(115200);
// Configuración de pines
pinMode(RESET, OUTPUT);
pinMode(BUSY, INPUT);
pinMode(NSS, OUTPUT);
digitalWrite(NSS, LOW); // Asegúrate de liberar el pin NSS antes de comenzar
pinMode(LNA, OUTPUT);
digitalWrite(LNA, HIGH);
// Configuración del bus SPI
SPI.begin(SCK, MISO, MOSI, NSS);
//SPI.setFrequency(1000000); // 1 MHz
// Reiniciar módulo GNSS
radio.reset();
delay(100);
// Inicialización del LR1120
Serial.println(F("[LR1120] Comprobando comunicación SPI..."));
int state = radio.begin(433.0, 125.0, 9, 7, RADIOLIB_LR11X0_LORA_SYNC_WORD_PRIVATE, 10, 8, 1.6);
if (state != RADIOLIB_ERR_NONE) {
Serial.print(F("Error en la comunicación SPI, código "));
Serial.println(state);
while (true) { delay(10); }
}
Serial.println(F("[LR1120] Iniciando GNSS..."));
state = radio.beginGNSS(RADIOLIB_LR11X0_GNSS_CONSTELLATION_GPS, 1.6);
if (state != RADIOLIB_ERR_NONE) {
Serial.print(F("Error al inicializar GNSS, código "));
Serial.println(state);
while (true) { delay(10); }
}
Serial.println(F("Inicialización completa."));
}
void loop() {
unsigned long currentMillis = millis(); // Obtén el tiempo actual
if (currentMillis - previousMillis >= interval) {
previousMillis = currentMillis; // Actualiza el tiempo previo
}
}
Beta Was this translation helpful? Give feedback.
All reactions