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

Think I introduced a bug with Promiscuous (requireCarrierSense) when used with directMode #1072

Closed
Crsarmv7l opened this issue Apr 21, 2024 · 2 comments
Labels
template info missing Author of this issue ignored the issue template.

Comments

@Crsarmv7l
Copy link
Contributor

Crsarmv7l commented Apr 21, 2024

Last night when conducting some in depth experiments I noticed if I had Promiscuous(true, true) with requireCarrierSense= true enabled, and directSyncWord(0, 0), rx signals would be returned up to a certain point (varies based on the buffer size) but all eventually stopped returning.

This is not a crash as I can exit my rx loop within the compiled program and still use the radio and rx/tx/continue on.

I initially thought it was the CC1101 carrierSense adjusting to my continued transmissions (that I was attempting to receive) but no amount of time results in signals being returned after ceasing transmissions.

When using Promiscuous(true, false) with requireCarrierSense =false, directSyncWord(0, 0), rx signals are returned as expected for as long as desired.

My current thinking is that it is related to the directBuffer, as with directSyncWord (0, 0) we always have sync and with directMode we are reading the pin based only on the cc1101 clock. With carrierSense additionally enabled, signals are only provided to the pin if above the threshold. So maybe it is overflowing the buffer or not resetting the Read/Write position? I am a bit at a loss with dealing with the buffer and carrierSense as I can't remember anything from the datasheet that could be added to the directBuffer to evaluate if gotSync and carrierSense above threshold then write to the buffer and there are no errors/crashes presented when this bug is triggered.

@HeadBoffin HeadBoffin added the template info missing Author of this issue ignored the issue template. label Apr 21, 2024
@jgromes
Copy link
Owner

jgromes commented Apr 21, 2024

Couple of things to try out - first, please post a minimum sketch needed to reproduce this problem, as well as the specification of your platform (ESP32, some Arduino etc.). This includes trying to localize the issue - does this really happen only when requireCarrierSense is enabled? Or is that just a coincidence?

Next, the debug mode - enable the protocol debug level and you will see writes to the direct buffer as those happen.

Finally, all of this information is called for by the issue template, for a good reason - it speeds up the debugging process immensely.

@Crsarmv7l
Copy link
Contributor Author

Closing for now. Rebuilt on a different computer and all seems fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
template info missing Author of this issue ignored the issue template.
Projects
None yet
Development

No branches or pull requests

3 participants