Closed nravanelli closed 1 year ago
Hi nravanelli,
by default, I disable SoftwareSerial for ESP32 because ESP32 allows selecting pins to assign to his HardwareSerial.
If you want to enable that functionality, you must add#define ACTIVATE_SOFTWARE_SERIAL
before the use of It.
Bye Renzo
Added #define ACTIVATE_SOFTWARE_SERIAL
before #include "LoRa_E32.h"
and it doesn't compile for ESP32...
undefined reference to 'LoRa_E32::LoRa_E32(SoftwareSerial*, UART_BPS_RATE)'
exact error code: Error compiling for board ESP32 Dev Module
Thoughts?
EDIT: Can confirm the same issue occurs when modifying the example 'sendFixedTransmission.ino' to enable SoftwareSerial using an ESP32.
Arduino: 1.8.16 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"
sketch\sendFixedTransmission.ino.cpp.o:(.literal.startup._GLOBAL__sub_I_mySerial+0x8): undefined reference to `LoRa_E32::LoRa_E32(SoftwareSerial*, UART_BPS_RATE)'
sketch\sendFixedTransmission.ino.cpp.o: In function `_GLOBAL__sub_I_mySerial':
C:....\sendFixedTransmission.ino:25: undefined reference to `LoRa_E32::LoRa_E32(SoftwareSerial*, UART_BPS_RATE)'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board ESP32 Dev Module.
Put the #define ACTIVATE_SOFTWARE_SERIAL inside LoRa_E32.h file, probably the value isn't propagated in the other files. Bye Renzo
I seem to be having an issue with the following code which mirrors examples:
and I am met with this error:
no matching function for call to 'LoRa_E32::LoRa_E32(SoftwareSerial*)'
Based on the constructors tutorials provided, this should work, unless there is something different with an esp32? ... https://www.mischianti.org/2019/10/21/lora-e32-device-for-arduino-esp32-or-esp8266-library-part-2/#Constructor