# Dfrobot Firebeetle + LoRa Cover + TTN

**URL:** <https://www.thethingsnetwork.org/forum/t/dfrobot-firebeetle-lora-cover-ttn/21089>\
**Category:** LMIC\
**Created:** [December 31, 2018, 2:06am UTC](https://www.thethingsnetwork.org/forum/t/dfrobot-firebeetle-lora-cover-ttn/21089 "2018-12-31T02:06:41Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![everhamme](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/everhamme/32/43845_2.png) [@everhamme](https://www.thethingsnetwork.org/forum/u/everhamme)\
**Post date:** [December 31, 2018, 2:06am UTC](https://www.thethingsnetwork.org/forum/t/dfrobot-firebeetle-lora-cover-ttn/21089/1 "2018-12-31T02:06:41Z")

</div>

Im not the best code developer… but I’d really love to get a dfrobot firebeetle + LoRa cover working with TTN.

I’ve setup my Sparkfun esp32 + LoRa example just fine… using their LMIC hello world example but can’t figure out how to modify the code to be compatible with the dfrobot hardware.

[https://learn.sparkfun.com/tutorials/sparkfun-lora-gateway-1-channel-hookup-guide?\_ga=2.165135487.1160606263.1546221780-983439855.1542853999](https://learn.sparkfun.com/tutorials/sparkfun-lora-gateway-1-channel-hookup-guide?_ga=2.165135487.1160606263.1546221780-983439855.1542853999)

Or I can’t figure out how to modify the dfrobot send example

Here’s the dfrobot code library and example

> **[DFRobot/DFRobot\_Lora](https://github.com/DFRobot/DFRobot_Lora)**
>
> Contribute to DFRobot/DFRobot\_Lora development by creating an account on GitHub.

I’ve looked online for sample code and can’t find it. Anyone willing to 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:** [December 31, 2018, 8:15am UTC](https://www.thethingsnetwork.org/forum/t/dfrobot-firebeetle-lora-cover-ttn/21089/2 "2018-12-31T08:15:01Z")

</div>

I had a quick peek here (because I never heard of df robot\_lora fire beetle)

- [https://www.dfrobot.com/wiki/index.php/FireBeetle\_Covers-LoRa\_Radio\_915MHz\_SKU:TEL0122](https://www.dfrobot.com/wiki/index.php/FireBeetle_Covers-LoRa_Radio_915MHz_SKU:TEL0122)

![fireB](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/1/5/15f2ed3081e13136e9f1c90663075a180eace1c8.png)

but theoretically it could work when connected to an arduino over SPI and with the right wiring on the board and the right lmic settings in the code.  
_In fact its just a board with an sx127x if I’m not mistaken 🕶_

\*after my second coffee I realize that’s not what you want… you want the combination of firebeetle + this lora shield to work with the TTN network

---

<div class="post-metadata">

**Author:** ![everhamme](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/everhamme/32/43845_2.png) [@everhamme](https://www.thethingsnetwork.org/forum/u/everhamme)\
**Post date:** [December 31, 2018, 9:12am UTC](https://www.thethingsnetwork.org/forum/t/dfrobot-firebeetle-lora-cover-ttn/21089/3 "2018-12-31T09:12:48Z")

</div>

Thanks for the quick reply! Love seeing all your posts in the garage sale area.

Yes I’m struggling with the lmic modifications I need to make this work. I’ve got the firebeetle esp32 and 1276 all mated up. Just working on the arduino sketch.

The dfrobot library i linked also has a few interesting things in it but no easy TTN example

> **[DFRobot/DFRobot\_Lora](https://github.com/DFRobot/DFRobot_Lora/tree/master/examples)**
>
> Contribute to DFRobot/DFRobot\_Lora development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [December 31, 2018, 10:08am UTC](https://www.thethingsnetwork.org/forum/t/dfrobot-firebeetle-lora-cover-ttn/21089/4 "2018-12-31T10:08:11Z")

</div>

The example only does plain LoRa, not LoRaWAN.

In LoRaWAN, the packet that is to be transmitted not only holds the application payload (say, some temperature value), but also about 13 additional bytes for a header that includes things like a Device Address (DevAddr) to identify the device, a frame counter to detect replay attacks, and a Message Integrity Code (MIC) to ensure the packet was not altered. Also, the payload itself needs to be encrypted. And downlinks need some specific timing.

So, you won’t be able to modify the example. You might be able to adjust some LMiC-based library.

---

<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:** [January 1, 2019, 10:02am UTC](https://www.thethingsnetwork.org/forum/t/dfrobot-firebeetle-lora-cover-ttn/21089/5 "2019-01-01T10:02:07Z")

</div>

there will be soon ( 🤣 ) a version with 868 MHz available.  
waiting for it and I’ll try it then …

---

<div class="post-metadata">

**Author:** ![everhamme](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/everhamme/32/43845_2.png) [@everhamme](https://www.thethingsnetwork.org/forum/u/everhamme)\
**Post date:** [January 2, 2019, 12:27pm UTC](https://www.thethingsnetwork.org/forum/t/dfrobot-firebeetle-lora-cover-ttn/21089/6 "2019-01-02T12:27:47Z")

</div>

Right that’s what I thought and why I put this in the lmic sub forum. Anyone willing to recommend some lmic config settings with the right pin mappings? Im not that great at figuring out the hardware drawing.

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [January 2, 2019, 12:35pm UTC](https://www.thethingsnetwork.org/forum/t/dfrobot-firebeetle-lora-cover-ttn/21089/7 "2019-01-02T12:35:53Z")

</div>

> [@everhamme](#):
>
> using their LMIC hello world example

Hmmm, so you were indeed not using LMiC, despite the above? Or did you already try LMiC?

---

<div class="post-metadata">

**Author:** ![everhamme](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/everhamme/32/43845_2.png) [@everhamme](https://www.thethingsnetwork.org/forum/u/everhamme)\
**Post date:** [January 2, 2019, 1:24pm UTC](https://www.thethingsnetwork.org/forum/t/dfrobot-firebeetle-lora-cover-ttn/21089/8 "2019-01-02T13:24:15Z")

</div>

I haven’t tried modifying lmic library pin settings yet. I don’t know where to begin.

---

<div class="post-metadata">

**Author:** ![everhamme](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/everhamme/32/43845_2.png) [@everhamme](https://www.thethingsnetwork.org/forum/u/everhamme)\
**Post date:** [January 4, 2019, 12:48am UTC](https://www.thethingsnetwork.org/forum/t/dfrobot-firebeetle-lora-cover-ttn/21089/9 "2019-01-04T00:48:43Z")

</div>

Ok i figured it out!

const lmic\_pinmap lmic\_pins = {  
.nss = 27, //D4 MUST jumper from CS  
.rxtx = LMIC\_UNUSED\_PIN,  
.rst = 25, //D2 MUST jumper from RST  
.dio = {26, 9, LMIC\_UNUSED\_PIN}, //D3 Jumper to DIO0, D5 Jumper to DIO1

---

<div class="post-metadata">

**Author:** ![shahab04bd](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/shahab04bd/32/35697_2.png) [@shahab04bd](https://www.thethingsnetwork.org/forum/u/shahab04bd)\
**Post date:** [August 18, 2021, 1:37pm UTC](https://www.thethingsnetwork.org/forum/t/dfrobot-firebeetle-lora-cover-ttn/21089/10 "2021-08-18T13:37:08Z")

</div>

Were you able to connect the firebeetle to ttn? I am trying to do the same but struggling to figure it out.

---

<div class="post-metadata">

**Author:** ![kenmullins](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kenmullins/32/44953_2.png) [@kenmullins](https://www.thethingsnetwork.org/forum/u/kenmullins)\
**Post date:** [October 2, 2023, 4:29am UTC](https://www.thethingsnetwork.org/forum/t/dfrobot-firebeetle-lora-cover-ttn/21089/11 "2023-10-02T04:29:34Z")

</div>

Hi Everhamme

I tried your pinmap on a Firebeetle ESP32 board with a Firebeetle Lora hat and unfortunately, it didn’t work. I got the following in the SerialMonitor which is a loop reset.

I wired up the board as per BoRRoZ diag with additional jumpers D3-DIO0 & D5-DIO1

Any chance you can share your code? I was using ttn-adp and ttn-ota examples from the MCCI LoraWAN LMIC library with the same result for each. Thx 🙂

rst:0x3 (SW\_RESET),boot:0x1b (SPI\_FAST\_FLASH\_BOOT)  
configsip: 0, SPIWP:0xee  
clk\_drv:0x00,q\_drv:0x00,d\_drv:0x00,cs0\_drv:0x00,hd\_drv:0x00,wp\_drv:0x00  
mode:DIO, clock div:1  
load:0x3fff0030,len:1412  
load:0x40078000,len:13400  
load:0x40080400,len:3672  
entry 0x400805f8  
ets Jun 8 2016 00:22:57

I’ve just discovered that the boot loop only happens when the LoRa cover is attached to the Firebeetle E32. I’ve checked extensively for shorts with no issues. Any ideas???

I did some more testing and it boot loops when D5 is connected to DIO1 ☹
