Closed codev123 closed 7 months ago
Since the repeater code is quite a lot more complex, have you measured how long it takes to switch between packet detection and reception? I don't see any obvious reason why channel scan should miss packets that are received by the receiver code. However, you do have a lot of printing to the Serial port, and this: TransmitPacket[i] = TransmitPacket[i + 1];
- that is copying all of your packets, instead of e.g. shifting a pointer. No idea how large DataPacket
is though.
also, when this issue happen, the preamble is detected, but packet is received after 5-10 seconds later
I have to guess here, but I'd say that's the next packet. I think that you are not fast enough when switching from CAD to receive. But overall this does't seem like an issue in the library itself, so I will convert this to a discussion instead.
thank sir for amazing work! i have been recently implementing a repeater node that receives lora packets from multiple Lora transmitters, and retransmitting when channel is free. The issue i am encountering at this repeater code is that, i am missing packets using this scan method, while i dont miss any packet when i receive packets from multiple transmitters on a receiver that is always in interrupt based receive mode. can you please help me what i am doing wrong.
here is various flags to manage tansmission, reception and scan flags with loop code........ Repeater code:
the receiver code :
so i receive all transmitter packets(Lora transmitters are transmitting when channel is free) using this receiver code but using repeater code i miss packets when time between packets is small.
also, when this issue happen, the preamble is detected, but packet is received after 5-10 seconds later
here packet is detected at 16:22:40, but scanFlag interrupt was active after 17 seconds to receive packet at 16:22:57, any packet received in these 17 seconds will be lost.
normally it should be like this