-
Notifications
You must be signed in to change notification settings - Fork 0
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
Tx Retry Infinite Loop After 4 Read/Tx cycles #1
Comments
OK, so I now have a working version of the program with the bug removed. The trigger for the bug was the redefinition of the ackPayload struct in order to support the command/response protocol. When I made that change to both the ATTiny and RPi code I got the error. So I then re-redefined the struct, as noted below, and now it works. So my theory is that the 'data boundaries' in the struct have to be at 4-byte intervals in order for either the nRF24 chipset/board and/or the ATTiny to pack and unpack the structs properly. This definition causes the issue to occur:
This definition works fine:
Some additional testing may reveal what constraints are really at work on defining structs that work. |
This is resolved in commit dd80da1. Although I do not, at this time, fully understand the 'rules' for defining data structs that will work, are bullet-proof, for data comms between the ATTiny and RPi using the nRF24 chip. That will have to be an exploration for another day - BUT see the posting about this at the below link, wherein it is stated:
|
After a variety of updates to both the ATTiny and RPi code I noticed in a validation run that after 4 successful Cap read and transmit cycles the ATTiny-RPi pair is stuck in a Tx/Ack-Rx retry loop. The ATTiny side is looping through the logic that is the 'Error ID #2' logic - it transmits but doesn't see an Ack packet back from the RPi. So it keeps retrying. Heartbeat and errorFlash are working - I do see the 'Error-2' reports on the red led. On the RPi side it is receiving the Tx's from the ATTiny's radio chip. I see the ctErrors value keep counting up on the RPi SSH terminal session.
The text was updated successfully, but these errors were encountered: