Dfrobot Firebeetle + LoRa Cover + TTN

(Everhamme) #1

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.


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

Here’s the dfrobot code library and example

I’ve looked online for sample code and can’t find it. Anyone willing to help? :slight_smile:


I had a quick peek here (because I never heard of df robot_lora fire beetle)


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 :sunglasses:

*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

(Everhamme) #3

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

(Arjan) #4

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.


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

(Everhamme) #6

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.

(Arjan) #7

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

(Everhamme) #8

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

(Everhamme) #9

Ok i figured it out!

const lmic_pinmap lmic_pins = {
.nss = 27, //D4 MUST jumper from CS
.rst = 25, //D2 MUST jumper from RST
.dio = {26, 9, LMIC_UNUSED_PIN}, //D3 Jumper to DIO0, D5 Jumper to DIO1