Hi Folks,

need help: I’m building a TTN node with Arduino Mega 2560 Rev3 and RFM SX1276.
I tried 2 szenarios (OTAA & ABP), but they all boil down to this same error…

14:16:46.923 -> /home/user/Arduino/libraries/MCCI_LoRaWAN_LMIC_library/src/lmic/radio.c:923

Wiring is mapped to code as follows (although the layout shows an Arduino Uno, I believe this should work same for the Arduino Mega I’m using):

// Pin mapping
const lmic_pinmap lmic_pins = {
    .nss = 10,
    .rxtx = LMIC_UNUSED_PIN,
    .rst = 5,
    .dio = {2, 3, LMIC_UNUSED_PIN},


What could be wrong?

Dear @freddx RFM95 is a 3.3v device but Arduino Mega is a 5V device. It could be a problem with the voltage level of the communication lines (SPI).

Thanks for your reply @jfmateos
Does this means they are totally incompatible or is there a way to tweak the Arduino down to 3.3v?

Dear @freddx I don’t know a simple way to interface this 2 systems… I would recommend you using a 3.3V Arduino, like the Arduino pro mini 8MHz, or any other board in the supported hardware in the LMIC library documentation:

I’ve tried with the Arduino Pro mini, it worked perfectly, but my code is somehow too big (occupes ~85% of memory) and it won’t work anymore. Do you have a solution for that?

If the program is so big I would use a SAMD21 board like the Feather M0

As examination of that file would show, this assert is triggered when the radio gives an unexpected respose.

Typically that’s due to a wiring error with the SPI pins, which apart from NSS and RST are fixed, it does not have anything to do with the DIO map.

Power issues could also be at play.

And driving the radio with over-voltage 5v signals could have permanently damaged it.

Thanks for your help.

I think the power mismatch is effectively the problem. I’ll look further to two alternatives: I’ve ordered a

I’ll give them a try…

You will find that LMIC-node will help you hit the ground running.

The Feather M0 will need a minor fully documented board mod - an extra wire - but has first class support from the underlying LMIC library. It will also need a suitable length wire (8.4cm) as an antenna - best to use solid core so it can stand to attention.

The ATmega2560 has bags of flash & SRAM so will be fine.

With these things, reading the docs and going step-by-step will pretty much guarantee success.