Pro mini / RFM95w examples for different sensors

2 posts were merged into an existing topic: BIG product placement allowed topic

Is it be possible to use this HW with OTAA authentication method? If it can, please point me to the howto?


I’d be interested to know as well, have got ABP working well but having troubles getting OTAA working

I believe @galagaking1 found a somewhat dirty but very usable solution.

Hi Paul, look at (software section) for some tips about OTAA including the dirty fix mentioned by @TijnOnlijn


Is dirty hack is to change lines ?

setDrJoin(DRCHG_SET, DR_SF7);


setDrJoin(DRCHG_SET, DR_SF9);

@Charles: check. Did a lot of experiments, and this worked best for me (and the workshop attendees).

Unfortunately still didn’t work for me, but I think my problem has more to do with trying to get it to work with Australian frequencies, I’m sure if it had the chance, mine would join with no problems.

Had success with ABP and downlinks today


Hi Paul, beware that the OTAA needs a return channel/receiving so proper DIO settings are needed. Try sending data to your ABP node is a good test here. Cheers Frank

thanks for the answer, interesting, I’ll try this one also.

I also used LMIC_setClockError that saved me lot of time :wink:

  // LMIC init

  // Reset the MAC state. Session and pending data transfers will be discarded.

  // Enable data rate adaptation

  // Increase RX1 Windows by 1% in case of clock error on board (crystal shift)
  // This clearly increase son OTAA Join request to works first time even with SF7
  LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100);

  // Join the network, sending will be
  // started after the event "Joined"
1 Like

Yeah I have ABP working for me from the start, uplink and now downlink but still no joy with OTAA :frowning:

@Charles has mentioned before that DEV EUI MSB-LSB sequence is usually the problem when your OTAA is not working. Whatever you see on the TTN dashboard, it should be the reverse. Mine work after that.

yeah thanks, have checked that a million times as well.

Thought it might be something simple, but my lack in knowledge when messing with the frequency plans is probably the problem.

Symptoms are that it doesn’t try to join on the correct frequencies - about one in 8 times it will start to join as it hits channel 63, but the sub band setting, there is something going wrong there.

What really confuses me is that ABP joins and stays on the correct frequencies without a hitch, whereas OTAA trys to join outside the sub-band that my gateways are set on.

Is there a configuration within the LMIC library that I should be tweaking to get this to work?


Hi douglarue, do you connect the RFM DIO4 to …6 connect to a separate output plug, or to the Pro Mini pins? I cannot see that from the schematic.

ok, found the answer from KiCad pcb: RFM95 pins to Pro Mini pins

is there a way to send the motion event only when motion is triggered ? I tried by firing do_send(&sendjob) on motion, indeed it only joins and starts then but the tx scheduler keeps running then, i want to send data ONLY when there has been motion

The generator contains a template for something like ‘distance in range’. That’s an example for an ultrasonic sensor but it does use a trigger. You can easily adapt it to work with PIR.

thanks for the info and very nice examples, I have also RTFM for the LMIC library , didn’t find this right away, its a pdf under doc/ on github, though this doc is for the STM32 i think its very valuable also for Atmega use. It explains how the event loops and callbacks work and the process flow of the lib. I found this the best explanation so far. As a reference for other newbie’s who may come across this thread; For trigger based TX you can use the “Example 5: interrupt” in the manual. So yes, us newbie’s should not get desperate and start posting on year before we RTF(lib)M ! Thanks for all the support on the forum !

I still see a good number of people ordering the PCB boards so hopefully people are still finding the thread.


Ive just built 2 of the boards that I ordered almost 2 years ago! Just waiting on another BMP280 to be delivered so I can finish the second one. Thanks for the design @douglarue.

1 Like