Arduino Pro Mini RFM95 pinmap problem

Hi all,

I’m trying to build a LoRa node based on the Arduino Pro Mini (ATmega328P 3.3V), an RMF95, and the MCCI LoRaWAN LMIC Library. Basically, I’m following this tutorial.

I haven’t gotten it to work however, and I think it’s because the Arduino is not communicating with the RMF95. I’m trying to run the ttn-otaa.ino example included in the library. During compiling it throws the following warning:

…\Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\hal\getpinmap_thisboard.cpp: In function ‘const Arduino_LMIC::HalPinmap_t* Arduino_LMIC::GetPinmap_ThisBoard()’:
…\Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\hal\getpinmap_thisboard.cpp:65:72: note: #pragma message: Board not supported – use an explicit pinmap
#pragma message(“Board not supported – use an explicit pinmap”)

I do have the correct pinmap set in the ttn-otaa.ino script (as per the tutorial I listed earlier). It does compile however, and when it runs on the board it spits out the following message on the serial line:

Starting
FAILURE
…\Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\lmic\oslmic.c:53

I’ve traced this error back to the following section of code (radio.c line 1091):

// some sanity checks, e.g., read version number
u1_t v = readReg(RegVersion);
#ifdef CFG_sx1276_radio
if(v != 0x12 )
return 0;

The readReg function tries to read the version number from the RFM95 module, but it doesn’t return anything. When I check the SPI line with a logic analyzer it is completely quiet as well, so everything seems to point to some HAL error (probably the pinmap).

Can anyone point me in the right direction? I’ve been stuck on this for days!

There is an Arduino program here which needs no library installed that (on a Pro Mini) you only need to connect the SPI pins correctly SCK, MOSI, MISO and NSS, you can leave NRESET and DIOx pins not connected. The program checks that the device registers can be read and written to and tells you the version number;

Works on all SX127X devices and there is a similar one for SX126X and SX128X devices.

2 Likes

Thank you very much LoRaTracker. I figured it out using your program!

At first the program reported “No device found”, but after I tied the RESET pin on of the RFM95 to high (3.3V), it started responding. I guess it was in a perpetual state of resetting or something. The thick layer of flux around the pins due to my shitty soldering probably didn’t help much either, so I cleaned that up too.

Thank you for your help :innocent:

1 Like

There should have been no need to pull the pin high, just leave in not-connected, as suggested in the instructions “Leave the NRESET and DIOx pins not connected”.

However, if after the cleanup, you still need to pull the pin externally high, then something is wrong as that pin has its own internal pull up…

1 Like

You’re right, it also works with the RESET pin unconnected.

Hi, I have the same problem as Catnip. I used this program to check registers and I get “no device responding” but I do get the module version (0x12). What can be the problem?

No supported Arduino maybe.

Faulty device.

Device not wired correctly or soldering issue as described by the original poster.

Did you also try the ‘MCCI LoRaWAN LMIC’ library ?

1 Like

I tried both with Arduino Uno and Nano Every and I get the sane error. I’ve tested MCCI LoRaWAN LMIC, too. Beside the oslmic.c:53 error in the serial monitor, I get a pinmap error in the compiler. Wiring is ok, so I guess I have to accept that it’s a soldering problem, due to my terrible soldering skills. I’ll post some pics of that.
image
image
image

Your Gnd joint looks like it could be a dry joint.

I’d touch each of them up looking to remove the excess solder and make sure it flows like a liquid. The soldering iron tip can not transfer any heat by itself, there must be a small amount of solder on it to do that for you. But not so much that you can start sculpting with it.

I think you’ll see it’s a warning about you having to define the pin map, not an error.

I’d stick with the Nano Every - far more room for both program and variables.

You don’t need to test MCCI LMIC, it definitely works (I was coding on it most of the weekend), you just have to tell it which pins are being used for NSS, DIO0 and DIO1. Once you’ve got that going, you can focus on the EUI’s & AppKey.

With the appropriate 5V to 3.3V Logic level conversion circuits I presume.

That device does not look like any of the Hope RFM95s I have seen. Hope normally have a different marking on the RF chip they use RF95.

I would alse be very cautious wiring LoRa modules up like that, if the antenna wire becomes disconnected when you attempt to transmit it could let the devices magic smoke out.

1 Like

Thank you. I’ll proceed with the soldering tips you gave me, trying to fix it. And then try again with LMIC. I’ll update you. (By the way, I’m using a “single channel” Raspberry Pi 4 Lora Gateway, I saw in the forum that it’s not a good idea)

Eeeehm, nope. I am not using a logic level converter… I saw video on youtube of people not using it… By the way, I also have a Hope LoRa module, but I think I’ve damaged it.
image
image

So not only, zapping 3.3V module with 5V and solder bridges but also …

We don’t say it’s not a good idea, we say they should not be used due to the disruption to the network. And you have to alter LMIC to be able to cope with a SPCF which isn’t trivial.

Please disconnect immediately and read: Single Channel Packet Forwarders (SCPF) are obsolete and not supported

If you want to make some progress, get a TTIG for a gateway and buy a board supported by LMIC-node. I’d normally recommend the Adafruit Feather M0 with RFM95 but in this instance, as it requires some delicate soldering, maybe best to pick something else. :wink:

Thanks for your rapid answer and kind suggestions! Do you think I still can make it with Arduino Nano Every, 3.3 to 5 V logic level converter and a Hope module?

I’ve a test device with a Nano Every and I have my own PCB with an ATmega4808 + RFM95 on it, it works fine with LMIC once you know LMIC.

You may want to use a breadboard & jumper cables until you’ve refined your soldering technique.

You still need a proper gateway.