-
I am trying to improve the collisions that are happening in my code, I am using the SX127x module. And I have found that scanning the channel before sending the packet is a good idea CSMA/CA. I have seen that there were some closed issues that mention this type of issue and I have not found an excellent solution for my code, but here is what I have now.
But when I receive a packet and a CAD is detected, the DIO0 is not activated again by the startReceive(). How could I receive this CAD detected and receive the packet at the same time? Thanks for your time! Hope this is not a dumb question. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
I have not tried this combination, so it's possible there could be some bug in the library.
If you need to do both, why not just set the module to receive forever? Although the SX127x suggest CAD before Rx could be possible.
Fully received packet will laos trigger DIO0, so it will be tricky for you to figure out which event triggered it. |
Beta Was this translation helpful? Give feedback.
-
I tried some code and I have some results that previously get wrong. When an interrupt of the startChannelScan is set to RADIOLIB_SX127X_CLEAR_IRQ_FLAG_CAD_DETECTED, I can read immediately the packet completely. And when I read it the packetLenght, the RSSI and the SNR are always wrong, it gets the values of the previous packet and not the actual. Here are some logs: ----- Good but bad packetLength, SNR and RSSI ----- Good but bad packetLength, SNR and RSSI ----- Get the previous received one ----- Get the previous sent one, (Packet Length, RSSI and SNR from the previous received packet)
Is there a way that I am not seeing? Is the startReceive(RXCONTINUOUS) what you mean? Moreover, I don't think this is the intention of the StartChannelScan, but I don't know what could I do to fix that. |
Beta Was this translation helpful? Give feedback.
-
Yes, and it did not work... It does not trigger the RXDone. If you need me to try other combinations tell me! |
Beta Was this translation helpful? Give feedback.
Yes, and it did not work... It does not trigger the RXDone.
In addition, the Dio1Action is not triggering when CAD finished or detected.
If you need me to try other combinations tell me!