Open ersterexitus opened 1 year ago
Yes, you'll just need to check the pin configuration. If the module is implemented properly in Arduino (pin definitions etc), it's possible that it will just compile and work. Did you try it?
I pushed a "heltec-v3" branch which you can try. Build with
HELTEC_BOARD=V3 ./compile-heltec.sh -e
I was using Arduino IDE with Heletec Boarddefinitions. I will try a build this evening.
that might work, too, I just never test that :-)
building firmware now works. But i get some errors which make sense while the v3 has sx1262. See the Serial output below:
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbe4
load:0x403cc700,len:0x2a68
entry 0x403c98d4
WPS/WIFI UNKNOWN EVENT: 0
Station Mode Started
E (74) esp_littlefs: ./components/esp_littlefs/src/littlefs/lfs.c:1225:error: Corrupted dir pair at {0x0, 0x1}
E (75) esp_littlefs: mount failed, (-84)
E (77) esp_littlefs: Failed to initialize LittleFS
LittleFS Mount Failed
setup_web ERROR: load_idmap() failed?
setup_web ERROR: load_config() failed?
TTGO LORA lacrosse2mqtt converter
***** SX127x init failed! ****
Disconnected from station, attempting reconnection
Well, then someone with this hardware needs to fix that. I don't have the hardware, so there is not much I can do about that now.
something like this:
--- a/SX127x.cpp
+++ b/SX127x.cpp
@@ -161,6 +161,7 @@ bool SX127x::init()
}
SPI.begin();
uint8_t version = ReadReg(REG_VERSION);
+ Serial.printf("SX127x::init version=0x%02x\n", version);
if (version != 0x12)
return false;
return true;
might help finding out what's going wrong, while I try to look at the sx127x datasheet. This should then print before the "init failed" message on the serial port.
I looked into the RadioLib sources (https://github.com/jgromes/RadioLib) and it looks like the sx126x is significantly different, at least the "find the chip" is already very different by returning a string with the device name instead of a simple chipversion byte. So this is probably not easily fixed by some simple "just check for a different return value" cases.
It might make sense to port over lacrosse2mqtt to RadioLib, but I'm not really keen on doing that now (there was some reason I did not use RadioLib from the beginning, but I forgot. Maybe it was just harder to get started with it...)
Maybe the easiest way out is to use a plain ESP32 module and a separate "868MHz SX1276 LoRa Breakout Board" available readily from various sellers and wire that up to the same pins as on the TTGO Lora. The display also is simple SSD1306 i2c display available for cheap (and it is not really needed, I just implemented it because it is on the board anyway).
Thanks for the info. I'll build my own with sx1276. Thank you for made this software.
Just a short feedback. Software runs an sends data to my home assistant. I just added username+password to the connection string in the source code. Many thanks for providing the software
Hello, I have a Heltec Lora 32 v3 board because a Lora 32 v2 board was no longer available. Is it possible to adapt the software for the Lora 32 v3?