Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No ack received by sender with esp8266 #105

Closed
2ni opened this issue May 20, 2018 · 10 comments
Closed

No ack received by sender with esp8266 #105

2ni opened this issue May 20, 2018 · 10 comments

Comments

@2ni
Copy link

2ni commented May 20, 2018

I'm using the examples Struct_send/receive with an esp8266. The sender can send the data and I get it on the receiver. So far so good.
But on the sender side I only get an ack, if I add a delay in the function sendACK (RFM69.cpp line 294):
while (!canSend() && millis() - now < RF69_CSMA_LIMIT_MS) {receiveDone(); delay(1);}

With that change it works like a charm, without it just waits for RF69_CSMA_LIMIT_MS milliseconds and then returns, ending in the sender printing "... nothing".
Does this issue ring a bell to someone?

@LowPowerLab
Copy link
Owner

Thanks for the question, please ask this in the forum where there is a lot more exposure and might solve your code questions quickly. This space is reserved for reporting documented issues. If there is an actual issue you can document we can re-open this or a new Repo issue. FWIW others are using this with ESP8266 without problems, please check your settings.

@chris03
Copy link

chris03 commented Jun 13, 2018

Looks similar to #49 where the delay(1) was added in canSend()

@mamama1
Copy link

mamama1 commented Feb 8, 2019

just wanted to follow up on this. i have esp8266 at both ends and as soon as i added delay(1) to canSend(), Acks were working perfectly. Before that, I had the same issue.

I'm using very basic, stripped down gateway and node example.

Will test this with ESP8266 on one and 328p on the other end later.

i don't think, this issue should stay closed, unless you decide not to support esp8266 at all.

if this issue really is only settings/code (not library) related, it might come handy to new users to have working examples for the esp8266 included in the library.

@rrobinet
Copy link

rrobinet commented Feb 8, 2019 via email

@lrusnac
Copy link

lrusnac commented Aug 19, 2019

@mamama1 would you mind sharing your sketches? I am trying with delays and yield but I can't get the ack to be received on the node, the message goes through but the sender thinks it fails

@rrobinet
Copy link

rrobinet commented Aug 20, 2019 via email

@ElVasquito
Copy link

Hey @rrobinet, I tried your version, but I couldn't make it work. First it crashed about the IRAM_CACHE_ATTR, I changed that and although it doesn't crash anymore, no packets were received at all.
So a big thank you to the OP and to the OP of issue #49. Today I've been struggling all day with this. Up to now, 3:59am. I couldn't understand why 'some' of the packets were not ack'ed, and were retried many times by the node (a Nano). Everything worked perfectly if instead of the NodeMCU I used a Mega2560 as the gateway. First I shorted the wires on the modules, then changed them altogether by shielded ones, lowered the baud rate, and tried MANY things without success, until I found these posts that were a Godsend. That delay(1) tip that changed it all. With 1ms I still got one or two retries every 10-15 packets. With 2ms, I got no Acks lost AT ALL. Is it possible to include this delay somewhere in the sketch instead of having to modify the library? Or even better... solve it without adding a delay?
As previously pointed out, this should definitely be considered for a working ESP8266 example.

@rrobinet
Copy link

rrobinet commented Oct 3, 2019 via email

@ElVasquito
Copy link

Thank you, Robert for you thorough reply. I will try your modified library with session keys. I did found out about the IRAM_CACHE_ATTR issue, and modified it so it didn't crash anymore, but it still didn't receive anything from the node, so that's when I tried with the delay and things got a lot better. Now that I tested more, the delay is not perfect as some Acks get lost and packets resent anyway after a while.
2) I did not see the attached design you mention, I'm interested in checking the connections for your lib, please can you resend?
Thanks again!

@rrobinet
Copy link

rrobinet commented Oct 4, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants