Hi Sara and Rui
I really enjoy your tutorials and have learned a great deal from you.
I Loaded your LoRa transmitter code into one TTGO LoRa32 SX1276 OLED and the receiver code into another.
The receiver stops after 1000 to 2000 data transfers even though the transmitter continues to send packets. If I reset the receiver, it starts receiving again. I’m in California where the 900 MHz band has been filled with frequency hopper radios for many years. I have the operating frequency set to 903.08 MHz since this frequency has less interference than other channels.
Could this be that the receiver firmware doesn’t tolerate occasional interference and stops running?
Do you have any suggestions?
Also, I am a radio engineer and I tested the small antennas that come with the boards. They are very poor antennas. I designed a simple antenna that works better if you would like to see it.
Thanks for your wonderful tutorials.
To be honest, I don’t know.
Do you have any more information about what happens in the receiver side? Does it just stop receiving? You can add some code to the receiver, that after an X number of readings, restarts the ESP32 (not the best solution, but it’s a workaround).
Yes, the antennas that come with those boards are not the best, I would love to see your DIY antenna.
Is it a memory leak or similar ? I found an idea here https://www.esp8266.com/viewtopic.php?p=77904
useful to monitor stack size during execution,
if ithe stack keeps growing … there’s a problem that will cause a problem before too long.
Thanks for the suggestion.
Peter, can you see if what Hamish suggested can solve the issue?
Thank you, Hamish.
I’ve been busy on another project. I’m sorry for the delay in replying. Yes, I believe that stack overflow is the issue. I haven’t ever seen this in other ESP-32 firmware that I’ve used. The LoRa transmitter is the first to show this problem.
There is some more robust LoRa code made available by Bob Rader ( I owe Bob a beer) which runs quite a bit longer than Sara’s code but, eventually, stops working.
I will look into Hamish’s stack monitoring idea. I’m not sure that I’m smart enough to ferret out the cause if I find that the stack is growing.
Sara’s idea of resetting the processor periodically will work as long as I don’t have any variables that I would like to save.