# Arduino Uno + HopeRF RFM95W

**URL:** <https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191>\
**Category:** End Devices (Nodes)\
**Created:** [June 30, 2017, 7:09am UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191 "2017-06-30T07:09:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mehradzie](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/mehradzie/32/1086_2.png) [@Mehradzie](https://www.thethingsnetwork.org/forum/u/Mehradzie)\
**Post date:** [June 30, 2017, 7:09am UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/1 "2017-06-30T07:09:24Z")

</div>

I simply cannot replace the sx1272/6 module with HopeRF RFM95W in my design ([issue mentioned here in details](https://www.thethingsnetwork.org/forum/t/can-hoperf-rfm95w-be-drop-in-replaced-with-dapu-rm-7200/7917)) so I have decided to make a working end-node using an Arduino  
This way I can be sure my HopeRF modules are working, and I can reverse engineering it with the CRO on SPI and take it from there.

Even though I have a fair bit of embedded programming experience and electronics design I still struggle with Arduinos 🙂 . Can somebody forward me to an article or a how to on correctly wring an Arduino Uno to a HopeRF module so that would be my starting point?

I have looked into this one,

> **[Mobilefish.com - Build Lora node using Arduino Uno and HopeRF RFM95 LoRa...](https://www.mobilefish.com/developer/lorawan/lorawan_quickguide_build_lora_node_rfm95_arduino_uno.html)**
>
> Build Lora node using Arduino Uno and HopeRF RFM95 LoRa transceiver module.

But honestly I am not sure how he is directly connecting the UNO to the HopeRF module without level shifting the 5v from UNO to 3.3 in HopeRF. The HopeRF absolute max is 3.7

After I have level shifted, I am getting the following error.

> Starting  
> FAILURE  
> C:\Users\mehrad.CAMPBELLSCI\Documents\Arduino\libraries\arduino-lmic\src\lmic\radio.c:689

I am also [aware of the lines responsible for this issue](https://github.com/matthijskooijman/arduino-lmic/issues/40) but the lack of break point and watch window in Arduino IDE is making it so hard to actually be able to see what values are returned for the Semtech Chip revision.

So I really need a simple guide to follow and make sure it is going to work.

The HopeRF module has been driving me crazy in the past couple of months as I had multiple attempts to make it work and it doesn’t really want to. This would be a great help.

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [June 30, 2017, 7:34am UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/2 "2017-06-30T07:34:31Z")

</div>

> [@Mehradzie](#):
>
> Can somebody forward me to an article

[sure](https://things4u.github.io/HardwareGuide/Arduino/Mini-Sensor-HTU21/mini-lora.html)

---

<div class="post-metadata">

**Author:** ![Gig](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/g/b782af/32.png) [@Gig](https://www.thethingsnetwork.org/forum/u/Gig)\
**Post date:** [June 30, 2017, 1:14pm UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/3 "2017-06-30T13:14:02Z")

</div>

I’ve recently hooked up a RFM95 to a STM32 to test LoRaMac-Node, and I’ve noticed a couple things:

- Generally speaking, it is possible to use the RFM95 as a drop-in replacement for a SX1276: both the pins and the main registers are identical
- The RFM95 datasheet is filled with mistakes and contradictions, so don’t trust it
- Using 5V won’t immediately fry the RFM95 but it’s definitively not rated for it - level shifters are the way to go

Furthermore, I tested a couple SX1278 with Arduino Uno & Nano. I used the RadioHead library:  
[http://www.airspayce.com/mikem/arduino/RadioHead/](http://www.airspayce.com/mikem/arduino/RadioHead/)  
There’s no LoRaWan stack but you might want to try a barebone PHY layer first.

Good luck!

EDIT: I’ve took a look to your other thread, and you CAN use the Semtech stack with SX1276 drivers with RFM95. It’s a bit broken (I can’t get retrieve the RSSI or the SNR for the life of me - see my note about that $!ù datasheet earlier) and I had to kludge a few things (I bypassed the TX power methods and forced the registers to the highest value, among other things), but OTAA works, unconf/conf TX works, RX works, ADR works, and I got some crazy range with it.

---

<div class="post-metadata">

**Author:** ![luisgonc](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/luisgonc/32/7512_2.png) [@luisgonc](https://www.thethingsnetwork.org/forum/u/luisgonc)\
**Post date:** [June 30, 2017, 6:16pm UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/4 "2017-06-30T18:16:23Z")

</div>

Hi,

If you are looking for an arduino compatible board with an RFM95W builtin check this one:

> **[Lora Hack - HPRF](https://www.hackables.cc/en/lora/13-lora-hack-hprf.html)**
>
> The Lora Hack - HPRF module is a tiny Arduino™ compatible development board with LoRa capability built-in (RFM95W). It is tailored for battery powered long-range monitoring and control applications.

The schematics is also available here:

> **[hackables-cc/Lora-Hack](https://github.com/hackables-cc/Lora-Hack/tree/master/V1.2)**
>
> Schematics and PCB prints for the Lora Hack board. Contribute to hackables-cc/Lora-Hack development by creating an account on GitHub.

It is a very compact board.

---

<div class="post-metadata">

**Author:** ![Mehradzie](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/mehradzie/32/1086_2.png) [@Mehradzie](https://www.thethingsnetwork.org/forum/u/Mehradzie)\
**Post date:** [July 4, 2017, 1:48am UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/5 "2017-07-04T01:48:26Z")

</div>

Gig, could you elaborate on the details of the changes you have done to make RFM95 to work with the Semtech Stack ?

Anything could be useful in this stage. HopeRF itself not being much helpful and so far other than you, I haven’t found any other people attempting to use the Semtech Stack with RFM95W. When I drop in replace the RFM95 with SX1276, from the probing I am doing with the CRO I can see that radio thinks it sent the join request but nothing leaves the Antenna. I am certain it is a simple hidden point that I am forgetting but I honestly cannot find it no matter how much I look into the problem.

---

<div class="post-metadata">

**Author:** ![kiwiclan](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kiwiclan/32/27789_2.png) [@kiwiclan](https://www.thethingsnetwork.org/forum/u/kiwiclan)\
**Post date:** [July 4, 2017, 7:28am UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/6 "2017-07-04T07:28:31Z")

</div>

Where is the rfm95w on that board? I don’t see it anywhere on the pictures.

Kim

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [July 4, 2017, 7:37am UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/7 "2017-07-04T07:37:51Z")

</div>

> [@kiwiclan](#):
>
> I don’t see it

on the other side ? 🕶

---

<div class="post-metadata">

**Author:** ![kiwiclan](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kiwiclan/32/27789_2.png) [@kiwiclan](https://www.thethingsnetwork.org/forum/u/kiwiclan)\
**Post date:** [July 4, 2017, 8:00am UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/8 "2017-07-04T08:00:21Z")

</div>

Yes, that’s logical. None of the three photos have that showing. But never mind, it’s not important. You probably just have better eyesight than me if you saw it.

Kim

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [July 4, 2017, 9:08am UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/9 "2017-07-04T09:08:17Z")

</div>

> [@kiwiclan](#):
>
> You probably just have better eyesight

uhhhhhhh … no probably NOT 🕶

if I look here **it’s not** a RFM95 based pcb …  
[https://www.tindie.com/products/luisgonc/lora-hack-mchp/](https://www.tindie.com/products/luisgonc/lora-hack-mchp/)?

so maybe @luisgonc can explain ?

probably the PCB can hold 2 different radio’s

 ![](https://www.thethingsnetwork.org/forum/uploads/default/original/2X/2/25734029e0356cb741ac80484debf57f8d8bf871.jpg)

---

<div class="post-metadata">

**Author:** ![Gig](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/g/b782af/32.png) [@Gig](https://www.thethingsnetwork.org/forum/u/Gig)\
**Post date:** [July 5, 2017, 8:05am UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/10 "2017-07-05T08:05:53Z")

</div>

Well, I haven’t documented everything, so it’s hard to pinpoint what I changed exactly.  
Here’s what I did:

- I use a STM32F405-based board and a RFM95 straight out of eBay
- I hand-soldered the RFM95 to a perma-proto board. The pins used are ANA, GND, 3.3V, MISO, MOSI, SCK, NSS, DIO0, DIO1, DIO2, DIO3
- I grabbed the LoRaWan stack from ST’s website ([here](http://www.st.com/en/embedded-software/i-cube-lrwan.html)) because it had drivers for STM32 HAL
- I used the STM32L476RG-Nucleo End\_Node project as a basis, with sx1276mb1mas driver. I modified the drivers to fit my STM32F405 (mostly changes to the RCC and some pins that weren’t available)
- I simplified some parts of the code, removed things I didn’t use (like the sleep functionalities…). I also added a simple abstraction layer.
- I changed/hacked EU868 parameters to bypass limitations that got in the way of my tests
- I completely bypassed SX1276SetRfTxPower(int8\_t) to set the TX power by hand, because there was some issues with registers being incorrect and I couldn’t be bothered fixing it properly

I’m sending you the relevant files, maybe they’ll be of some help.

---

<div class="post-metadata">

**Author:** ![luisgonc](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/luisgonc/32/7512_2.png) [@luisgonc](https://www.thethingsnetwork.org/forum/u/luisgonc)\
**Post date:** [July 5, 2017, 2:41pm UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/11 "2017-07-05T14:41:22Z")

</div>

Hi @BoRRoZ and @kiwiclan,

Yes, Borroz is right the board can hold both radios (one at a time) and is sold in two different variants. One variant is named the Lora Hack - MCHP (with RN2483A) and the other variant is named Lora Hack - HPRF (With Radio RFM95W).

You can find all the photos for the RFM95W variant here:

> **[Lora Hack - HPRF](https://www.hackables.cc/en/lora/13-lora-hack-hprf.html)**
>
> The Lora Hack - HPRF module is a tiny Arduino™ compatible development board with LoRa capability built-in (RFM95W). It is tailored for battery powered long-range monitoring and control applications.

But if you are looking just for the bottom with the RFM95W check this:  
 ![](https://www.thethingsnetwork.org/forum/uploads/default/original/2X/1/1ad218c752c1ae362785cc65d7d61ec5f2ac3d72.jpg)

\_\_  
Luisgonc

---

<div class="post-metadata">

**Author:** ![manisubbu07](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/manisubbu07/32/7073_2.png) [@manisubbu07](https://www.thethingsnetwork.org/forum/u/manisubbu07)\
**Post date:** [July 14, 2017, 8:32am UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/12 "2017-07-14T08:32:32Z")

</div>

hi,

i have connected Arduino Uno + Dragino Lora shield V1.3. using LMIC library i loaded the program in the arduino. But the device which i registered in the Console Application, the Status was Never seen. but my gateway receives encrypted message from Node, but i’m not able to see in the TTN console.  
what is the problem? how to fix this problem?

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [July 14, 2017, 10:30am UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/13 "2017-07-14T10:30:35Z")

</div>

> [@manisubbu07](#):
>
> Arduino Uno + Dragino Lora shield V1.3

wrong topic / … pls use search for **[DRAGINO](https://www.thethingsnetwork.org/forum/search?q=DRAGINO)**

---

<div class="post-metadata">

**Author:** ![kramer92](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kramer92/32/25844_2.png) [@kramer92](https://www.thethingsnetwork.org/forum/u/kramer92)\
**Post date:** [June 8, 2018, 5:24pm UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/14 "2018-06-08T17:24:02Z")

</div>

How do I transmit 8 variables in a single transmission via Lora?

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [June 8, 2018, 5:31pm UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/15 "2018-06-08T17:31:10Z")

</div>

How you do that depends on what software or microcontroller type and libraries you are using to talk to the LoRa device.

There is no one ‘universal’ method.

---

<div class="post-metadata">

**Author:** ![kramer92](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kramer92/32/25844_2.png) [@kramer92](https://www.thethingsnetwork.org/forum/u/kramer92)\
**Post date:** [June 8, 2018, 7:48pm UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/16 "2018-06-08T19:48:11Z")

</div>

Got it. I am using an arduino uno to do the communication, but I could not make it work. I’m trying to unpack the data to Thingspeak, but it could be through TTN.  
Would you recommend a library?

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [June 8, 2018, 8:03pm UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/17 "2018-06-08T20:03:14Z")

</div>

Are you doing LoRa direct node to node or are you using TTN ?

---

<div class="post-metadata">

**Author:** ![ursm](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ursm/32/46475_2.png) [@ursm](https://www.thethingsnetwork.org/forum/u/ursm)\
**Post date:** [June 8, 2018, 8:22pm UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/18 "2018-06-08T20:22:56Z")

</div>

on the node:

```nohighlight
     mydata[0] = byte(counter >> 8);
     mydata[1] = byte(counter);
     mydata[2] = highByte(BattSend);
     mydata[3] = lowByte(BattSend);
     mydata[4] = highByte(SolarSend);
     mydata[5] = lowByte(SolarSend);
     mydata[6] = highByte(temp1_i);
     mydata[7] = lowByte(temp1_i);
     mydata[8] = highByte(hum1_i);
     mydata[9] = lowByte(hum1_i);
     mydata[10] = highByte(temp2_i);
     mydata[11] = lowByte(temp2_i);
     mydata[12] = highByte(hum2_i);
     mydata[13] = lowByte(hum2_i);
     mydata[14] = highByte(pres1_i);
     mydata[15] = lowByte(pres1_i); 

```

on ttn/console (payload formats)

```nohighlight
function Decoder(bytes, port) {
  var count = (bytes[0] << 8) | bytes[1];
  var batt = (bytes[2] << 8) | bytes[3];
  var solar = (bytes[4] << 8) | bytes[5];  
  var temp1_x = (bytes[6] << 8) | bytes[7];
  var hum1_x = (bytes[8] << 8) | bytes[9];
  var temp2_x = (bytes[10] << 8) | bytes[11];
  var hum2_x = (bytes[12] << 8) | bytes[13];
  var pressure = (bytes[14] << 8) | bytes[15];

  
  return {
  A_cnt: count,
	B_batt: batt / 100.0,
	C_solar: solar / 100.0,
  D_Tempin: (temp1_x / 100.0) -50.0,
  E_Humin: hum1_x / 100.0,
  F_Tempout: (temp2_x / 100.0) -50.0,
  G_Humout: hum2_x / 100.0,
  H_Pressure: pressure
  };
}

```

on your server side you could receive the values via MQTT and send it from there to ThingSpeak

```auto
tsclient.updateChannel(channelId, {field1: battery, field2: solar, field3: temp1, field4: humi1, field5: temp2, field6: humi2, field7: press }, function(err, resp) {

```

hope that helps

---

<div class="post-metadata">

**Author:** ![kramer92](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kramer92/32/25844_2.png) [@kramer92](https://www.thethingsnetwork.org/forum/u/kramer92)\
**Post date:** [June 8, 2018, 8:26pm UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/19 "2018-06-08T20:26:26Z")

</div>

> [@ursm](#):
>
> on your server side you could receive the values via MQTT and send it from there to ThingSpeak

Where did you take that example from? Could you share?

---

<div class="post-metadata">

**Author:** ![kramer92](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kramer92/32/25844_2.png) [@kramer92](https://www.thethingsnetwork.org/forum/u/kramer92)\
**Post date:** [June 8, 2018, 8:26pm UTC](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191/20 "2018-06-08T20:26:35Z")

</div>

Where did you take that example from? Could you share?

[Next page](https://www.thethingsnetwork.org/forum/t/arduino-uno-hoperf-rfm95w/8191.md?page=2)
