-
Notifications
You must be signed in to change notification settings - Fork 409
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
radio.receive(str) blocks forever on Adafruit Feather 32u4 RFM96 LoRa #566
Comments
I get the same behaviour with an Adafruit RFM96W LoRa Radio Transceiver Breakout connected to a Sparkfun Artemis board (SparkFun Artemis Global Tracker). |
The "No SX127x found" message can be ignored - it's caused by the fact that there seem to be two possible values of the version register, the official 0x11 and the unofficial 0x12, you seem to ahve the latter. There should be no impact on function. Regarding the forever block, SX127x in LoRa mode uses DIO1 to sense Rx timeout. Since your code doesn't seem to be using the pin, I assume it's not present on the board. |
Does this mean the hanging is intended behaviour? To avoid the block, I tried to check for incoming messages with |
The I would call it "expected" behavior - a logical consequence, but slightly beyond intended. You need DIO1 for blocking reception. But if you don't have it, you can still use the interrupt version. |
Would it be possible to provide an |
The infinite block is not really a feature. Thinking of it more, I think it would be better to extend the |
|
Although the radio's DIO1 pin is not connected to the microcontroller on the Feather LoRa PCB, I have now manually added such a connection and added the respective GPIO as fourth parameter to the constructor of |
@a-schneider-fmi I added a software timeout so that when no DIO1 is provided (set to |
Using the receive example program adapted to Adafruit Feather 32u4 RFM96 LoRa (complete code see below),
radio.receive(str)
hangs forever if no messages are available. If another boards actually sends messages with the transmit example, it works and messages are received correctly. The interrupt example works at all times, i.e. independent of whether a message is available or not. This might be related to #277 but has slightly different behaviour.My full code:
The output with debug mode enabled is:
It actually claims that the SX127x is not found. Since the module is included in the PCB I can exclude a wiring error. And it is surprising since the function returns success. Moreover, transmission works successfully if another module sends. Why does it hang if no packet is available?
The text was updated successfully, but these errors were encountered: