Replies: 1 comment 14 replies
-
I'm wondering if it wouldn't be easier to just add the |
Beta Was this translation helpful? Give feedback.
14 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Lately I’ve been looking into the lower layers of Meshtastic, whose firmware roughly works like this. Before transmitting a packet, the device first tries to determine whether it is actively receiving. If not, it performs channel activity detection. Only when the channel is free, it starts transmitting (CSMA/CA).
The former condition works well for SX127x modules by checking the modem status whether a valid header was received. For SX126x and SX128x modules, the same check is implemented, but then using
getIrqStatus()
. I found out that since theIRQ_HEADER_VALID
flag is not mapped to the IRQ instartReceiveCommon()
, this actually doesn’t work. Although the CAD procedure afterwards also detects the data part of the packet, it fails to receive it because the module went into standby mode while receiving. This has been mentioned before in #67.I tested that simply adding
RADIOLIB_SX126X_IRQ_HEADER_VALID
to the IRQ mask works to check whether we are actively receiving and since it will then not perform CAD, the packet can be received successfully.Do you think it would be good to expose an option for setting additional IRQ flags to the receive methods? Or maybe even a configuration, similar to
setDIOMapping()
?. I’m willing to create a PR for this, but would first like to know your opinion on this. Maybe this is not the right way to do it, which I would then also like to hear.Beta Was this translation helpful? Give feedback.
All reactions