onEvent() never called (Arduino Pro Mini, RFM95W)

(Biermi) #1

Hi all,
i'm trying to get my first node up and running, but it seems there is a problem. I have used this example for wiring and also using the software (RFM-basic.ino from
The the sketch runs, the output shows that the initialisation was done and the first packet was sent or queued for sending, but after that nothing happens anymore. The onEvent() method is never called, I have checkt the wiring for many times and measured if all signals come through and they come through. When i measure the voltage of the DIO0, DIO1 and DIO2 it shows zero or 0.64V when the sketch is running. Maybe i'm wrong but i think it should be a high value at some point.
Can anyone point me in the right direction? I don't know where the problem is.

Kind regards

(Arjan) #2

Do you actually receive the packet?

I'd check the wiring again, and their mapping in the sketch, and again... From Matthijs' documentation:

For example, when a LoRa transmission starts, the DIO0 pin is configured as a TxDone output. When the transmission is complete, the DIO0 pin is made high by the transceiver, which can be detected by the LMIC library.


In LoRa mode the DIO pins are used as follows:

DIO0: TxDone and RxDone
DIO1: RxTimeout

(Tom Vijlbrief) #3

Your wiring is probably OK because if it's wrong you'll get an error message that the communication fails with the RFM chip.

The most likely cause is that you misconfigured one of the IDs in the source, so they do not match those configured in the TTN console or that you are not within range of a gateway.

(Biermi) #4

No message shown in the ttn console. I have no Gateway but there is one nearby in the city which should receive the message.

Sending does not take more than 5 minutes (i have run the sketch so long without event), so there must be one of the DIO on a high level. Seems to be the Hardware is broken.

(Arjan) #5

That's not my experience...

(Tom Vijlbrief) #6

It is mine :slight_smile:

If the SPI wiring is wrong you'll get an error.

That leaves the DIO wiring of which only the first two are used.

(Biermi) #7

Not in range could be, but in any case the onEvent method should be called or not? My understanding is that the message would send anyway if there is a Gateway or not.

(Arjan) #8

Correct. The node just transmits and hopes one or more gateways will receive the packet.

(Tom Vijlbrief) #9

@biermi When you measure, do you mean with a scope or a multimeter? The signals are too short to see with a multimeter.

When you send at SF12 (this takes the longest, over a second) you can measure the additional power consumption (40 mA) with your multimeter while it sends.

(Tom Vijlbrief) #10

@biermi Yes you should get a message sent event. So SPI and power are probably OK and DIO might be wrong


Which of the sketches did you use? I believe not all the sketches in the repository use the same mechanism for triggering sending of the message.

@jdelaet, any clue? Could this be related to the move from scheduled messages to triggered messages.. do they stil call onEvent?

(Biermi) #12

I have only a multimeter. I will try SF12 for sending, currently it uses SF7.

(Biermi) #13

I use this one here:

My Arduino Version is 1.8.2 and i'm using the lmic latest master from here:

(Biermi) #14

I measured only 7-8 mA power consumption with SF7 and SF12. Seems to be a hardware defect.



try to comment line 44 in your sketch:
#define SLEEP
See what happens.

As this a somewhat older sketc, you can also try to generate your own on
If you pick TTNmapper as the sensor, you will get a similar sketch as the one you are using now.

(Biermi) #16

It is a hardware defect, my colleague gives me his RFM95W for testing and it works fine, The EV_TXCOMPLETE happens arround every 60 seconds.
Thanks all for helping me! :+1:

(Maxccarr) #18

I also had the issue of onEvent() never being called. My connections and pin mapping were all correct. I just saw now there was a tiny solder bridge between a few components on the RFM95W. I swapped the module and now it’s all working. If anyone else is having this issue, I would suggest changing hardware and trying again