mcci-catena / arduino-lorawan

User-friendly library for using arduino-lmic with The Things Network and other LoRaWAN® networks
MIT License
284 stars 54 forks source link

How to Activate Receive #230

Open juancirino23 opened 1 month ago

juancirino23 commented 1 month ago

Hi, I have a question. How do initiate the receive for example I want every 2 minutes during 40 seconds to lisen for incoming lora packages.

Thanks

terrillmoore commented 1 month ago

There is no API for doing this, because it's not a LoRaWAN concept. LoRaWAN supports class A devices (listen a fixed time after uplink), class B devices (listen periodically, synchronized with the network), and class C devices (listen always). Unfortunately, the LMIC library only supports class A. So the only choice to receive periodically is to send uplinks periodically. You can use the LMIC_poll() api to do this -- this might also be available through the Arduino LoRaWAN APIs.