sandeepmistry / arduino-LoRa

An Arduino library for sending and receiving data using LoRa radios.
MIT License
1.65k stars 630 forks source link

Sending/receiving issues with TTGO LoRa32 Board (SX1276) #416

Closed Kasperdelasopa closed 3 years ago

Kasperdelasopa commented 3 years ago

Hello,

i tried to implement a Bi-directional communication. But at some point in time the communication doesn't seem to be reliable. The communication i tried to accomplish is a request/respond scenario. It seems that the SX1276 Module stops receiving at some point in time.

It works most of the times but sometimes the two devices just doesn't send or receive.

Are there general communication rules, like "there needs to be a pause between sending and receiving"?

Best regards

IoTThinks commented 3 years ago

By default, LoRa.endPacket() will wait until a transmission completes. After transmission, you can call LoRa.receive() again.

orimate commented 3 years ago

Hi, I have the same issue. I called extra LoRa.receive() after LoRa.endPacket() but does not helped. I would like to receive a msg and forward to the next node. After forwarding I call LoRa.receive() and in the main loop onReceive(LoRa.parsePacket());. After an Hour I can not receive anything.

IoTThinks commented 3 years ago

@orimate Check the sample code again. The below code is incorrect.

onReceive(LoRa.parsePacket());