Arduino + Heltec LoRa ESP32 v2 + LoRaWAN: How Receive Only?

I have a use case where I want the LoRa device to wake up and 'check for a downlink message on a periodic basis. My experience has been that this only happens when I send a message “LoRaWAN.send(loraWanClass)”, but in this case I just want to check.

Any suggestion how to only check for a message and not send?

Do you need to get specific messages down the line? If you don’t need it, you can use the receive function in pingpong.

@navi, thank you for the recommendation and I have looked at that sample. It appears to me that the PingPong and OTAA_OLED are very different in structure.

The OTAA_OLED uses the LoRaWanClass class which has the definition below, missing the receive Radio.rx (0) method.

class LoRaWanClass{
public:
  void init(DeviceClass_t classMode,LoRaMacRegion_t region);
  void join();
  void send(DeviceClass_t classMode);
  void cycle(uint32_t dutyCycle);
  void sleep(DeviceClass_t classMode,uint8_t debugLevel);
  void displayJoining();
  void displayJoined();
  void displaySending();
  void displayAck();
  void displayMcuInit();
  void generateDeveuiByChipID();
};

The PingPong is based on RadioEvents_t and Radio_s, which the latter supports the Rx method, shown below. It seems like a large rewrite to go to RadioEvents. Is there another way using LoRaWanClass?

static RadioEvents_t RadioEvents;

struct Radio_s
void    ( *Rx )( uint32_t timeout );