Программы на C++. Форум разработчиков
Anonymous
ESP32 TTGO LoRa endPacket() зависает/зависает при отправке сообщений
Сообщение
Anonymous » 06 янв 2025, 02:48
Я работаю с ESP32 TTGO T-Display с модулем LoRa (SX1276) и испытываю проблемы, из-за которых функция LoRa.endPacket() зависает на неопределенный срок.
< Strong>Аппаратное обеспечение:
TTGO T-Display ESP32 с LoRa
Использование Arduino IDE 2.x
Версия библиотеки LoRa: 0.8.0
Код: < /p>
Код: Выделить всё
// Minimal reproducible example
#include
#include
#define LORA_SCK 5
#define LORA_MISO 19
#define LORA_MOSI 27
#define LORA_CS 18
#define LORA_RST 23
#define LORA_IRQ 26
#define LORA_FREQ 868E6
void setup() {
Serial.begin(115200);
SPI.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS);
LoRa.setPins(LORA_CS, LORA_RST, LORA_IRQ);
if (!LoRa.begin(LORA_FREQ)) {
Serial.println("LoRa failed!");
while (1);
}
LoRa.setTxPower(14);
LoRa.setSpreadingFactor(7);
LoRa.setSignalBandwidth(125E3);
}
void loop() {
if (!LoRa.beginPacket()) {
Serial.println("Begin failed");
return;
}
LoRa.print("TEST");
bool success = LoRa.endPacket(); //
Подробнее здесь: [url]https://stackoverflow.com/questions/79331076/esp32-ttgo-lora-endpacket-hanging-freezing-when-sending-messages[/url]
1736120910
Anonymous
Я работаю с ESP32 TTGO T-Display с модулем LoRa (SX1276) и испытываю проблемы, из-за которых функция LoRa.endPacket() зависает на неопределенный срок. < Strong>Аппаратное обеспечение: [list] [*]TTGO T-Display ESP32 с LoRa [*]Использование Arduino IDE 2.x [*]Версия библиотеки LoRa: 0.8.0 [/list] [b]Код:[/b]< /p> [code]// Minimal reproducible example #include #include #define LORA_SCK 5 #define LORA_MISO 19 #define LORA_MOSI 27 #define LORA_CS 18 #define LORA_RST 23 #define LORA_IRQ 26 #define LORA_FREQ 868E6 void setup() { Serial.begin(115200); SPI.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS); LoRa.setPins(LORA_CS, LORA_RST, LORA_IRQ); if (!LoRa.begin(LORA_FREQ)) { Serial.println("LoRa failed!"); while (1); } LoRa.setTxPower(14); LoRa.setSpreadingFactor(7); LoRa.setSignalBandwidth(125E3); } void loop() { if (!LoRa.beginPacket()) { Serial.println("Begin failed"); return; } LoRa.print("TEST"); bool success = LoRa.endPacket(); // Подробнее здесь: [url]https://stackoverflow.com/questions/79331076/esp32-ttgo-lora-endpacket-hanging-freezing-when-sending-messages[/url]