Adafruit Feather as LoRaWAN node

Next to the Raspberry Pi as a LoRaWAN node I also wanted to have a really tiny node, as tiny as possible, and with the capability to operate it with a battery.

I ordered a Adafruit Feather 32u4 RFM95 LoRa Radio module, as it already has a RFM95 LoRa radio module attached, and as it has a connector and charger for Lithium Polymer batteries.


For the software part, I took the LMIC library for Arduino port from github and followed the instructions to get it up and working in the Arduino IDE.

To make it work for the Adafruit Feather 32u4 module, there was the need to adapt some settings. The pin mapping definition was changed as follows.

const lmic_pinmap lmic_pins = { 
   .nss = 8, 
   .rxtx = LMIC_UNUSED_PIN, 
   .rst = 4, 
   .dio = {7, 6, LMIC_UNUSED_PIN}, 

According to Adafruit pinout documentation,

  • the radio module’s IO0 pin is already connected internally to pin #7 of the Adafruit feather module.
  • Pin #8 is connected internally to the radio’s CD (chip select) pin
  • Pin #4 is connected internally to the radio’s RESET pin

So the one thing left to do is to connect the radio module’s IO1 pin with pin 6 using a wire bridge (see picture above). Connecting IO2 is not required (LMIC_UNUSED_PIN).

Further, there seems to be a little issue with the accurancy of the clock, which can cause problems with receiving data from the LoRa gateways, as the receive window can’t be hit exactly. For this reason, added the following line to work around this.

LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100);

Having done that, the ttn-otaa.ino worked as expected: It took only one single request to join TTN using Over-the-Air-Activation (OTAA), and periodically sending a data record every 60 seconds.


8 thoughts on “Adafruit Feather as LoRaWAN node

  1. great. Many thanks. My feather is working now too. I have tried it again after we have spoken that it should work. And it does 🙂
    Would you share your reduced lmic lib?

    • No, the M0 may be suited better as it has more memory. With the LMIC 1.6 stack you already get pretty near the maximum memory. What will it make a little more difficult that you will have to do the wiring of the LoRa module on your own. You may want to check the forum of “The Things Network” for successful examples.

  2. Can we use this setup to work with a Multitech’s Conduit gateway? I need to set up a system where a Feather M0 LoRa (RFM9x) has to send data to a Multitech Conduit gateway. Please guide me.

  3. Can you please tell me what should the APPEUI, DEVEUI, APPKEY Concept. What should be the corresponding Network ID and Network Key in the Multitech Conduit (AEP) to pair with the end node (Feather M0) . I am not able to understand this whole concept.

    • I think Google can help you with your questions about APPEUI, DEVEUI and APPKEY. Search for the keyword „LoRaWAN Specification“.
      Unfortunately I can‘t help you with your question regarding the Multitech Conduit. I only have experience with the Kerlink IoT Stations or gateways built with Raspberry Pi.

  4. Hi Wolfgang, thanks for your blog. I plan to build a LoRa node based on Feather 32u4 or MO. The communication (OTAA) is working well but I ask me – and unfortunately I couldn’t find any information about that – how do I have to adjust the sketch to work with a sensor (e.g. SHT)? Could you give me an example or a clue? Thx

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s