timmbogner / Farm-Data-Relay-System

A system that uses ESP-NOW, LoRa, and other protocols to transport sensor data in remote areas without relying on WiFi.
MIT License
485 stars 108 forks source link

LoRa Gateway neighbor sending/receiving issue #155

Closed timmbogner closed 1 year ago

timmbogner commented 1 year ago

Hello everyone, The asynchronous LoRa functionality has been a real test of my coding abilities. There is currently a problem with LoRa gateways not being able to send data after they have received a packet. I'm working on it, and will post more details if I can't get to the bottom of it.

Thanks for your patience!

timmbogner commented 1 year ago

Okay I think it's sorted out and better than ever.

@aviateur17 This wasn't the problem, but FYI I also made it so the gateway never requests an ACK for a DataReading (it was disabled for broadcast, now for neighbors also). Unless we get an ACK system set up for the async release function, I don't think it should be an issue.

f2knpw commented 1 year ago

Hi Timm, Latest release does fix this issue ! Thanks again

aviateur17 commented 1 year ago

@aviateur17 This wasn't the problem, but FYI I also made it so the gateway never requests an ACK for a DataReading (it was disabled for broadcast, now for neighbors also). Unless we get an ACK system set up for the async release function, I don't think it should be an issue.

Sounds good, I'll take a look and see what I can figure out after I get the timekeeping stuff close to being done.

timmbogner commented 1 year ago

@aviateur17 Something I've been working on today is checking out how the async LoRa release reacts to a buffer that contains >250 bytes. After a small change I have it working as intended. I'm entering approx. 3 boatloads of DataReadings into the terminal and the gateway is splitting and sending four full (251 byte) packets and a 34 byte packet. Very satisfying. However, the receiving gateway can't keep up when receiving back-to-back packets AND displaying debugs at the same time. It drops one or two unless FDRS_DEBUG is disabled. I'll probably go through and remove or abridge some messages there soon.

I'm not even using OLED... I imagine that wouldn't help either.