Dfrobot Firebeetle + LoRa Cover + TTN

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

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)

fireB

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

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

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 …

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.

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

1 Like

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

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

4 Likes

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

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

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