Just randomly receive ACK-packet

Started by Smu_Puh, March 21, 2016, 12:38:21 PM

Smu_Puh

#15
Hi,
i´m getting closer and closer to the solution.
Now, i´m getting 100% of the acknoledgments and realistic RSSI-values!
It looks like the problem is
while (digitalRead(_interruptPin) == 0);

in
void RFM69::sendFrame(...)


When i comment that line out and use instead only
while(millis() - txStart < RF69_TX_LIMIT_MS);
,
everything works fine...

So i think that somthing running too fast in this section

WhiteHare

Have you tried using a weak pullup resistor on the interrupt pin?  It sounds like there's a chance that may solve the issue your hardware is encountering without your having to hack the library.

Smu_Puh

Hi WhiteHare,

i don´t know why an pull-up will help in this situation. The interrupt works well, but to fast in my mind.

WhiteHare

#18
Only because you had said that the place in the code where it was hungup was:
while (digitalRead(_interruptPin) == 0);


The question, which probably only you can answer, should be: why is the interrupt pin forever LOW?  Is there something about your unusual hardware that's causing that?  Or maybe your RSSI threshold is set wrong , and so the interrupt is  triggering nearly immediately all the time (depending on how your software is configured to trigger)?

Smu_Puh

Ok little missunderstanding :)
The interrupt doesn´t hang forever. It works well. But i have to put a little delay at it because it interrupts like imidialy after going to TX-mode, so my RSSI value will be bad if i don´t input a little delay.

WhiteHare

What is it that triggers your interrupt pin during Rx?  Is it an RSSI that's above threshhold, or it is packet received, or....?  It sounds as though triggering the interrupt based on packet received would address your issue.