Sofar I have been experimenting with LoRa and TTN using a Multitech MDot board and with a HopeRF RFM95W module connected to a Teensy, but I decided to try something else. Franz, one of the members of the TTN Nijmegen community, started experimenting with node-to-node communication using Dorji DRF1278F 433MHz modules. I’d like to support him in converting to 868MHz, so that he can post data to TTN once a gateway become available in his range.
The Dorji modules are currently among the cheapest LoRa modules available on Ebay. So some weeks ago I ordered a DRF1272F 868MHz module for about $8, which arrived this week.
The first surprise is that it has a 1.27 mm pitch header connector. The module has 13 contacts, but not all are required for the LMIC Arduino library. To make it more easy to handle, I made a custom break-out board that connects the required pins to a 2.54 mm pitch 8-pin header. Soldering the wires at 1.27 mm pitch was quite a challenge; you may want to use a magnifying glass, as those pads are tiny!
Based on the DRF1272F datasheet, the LMIC Arduino library documentation, and the Teensy pinout I connected it as follows:
DRF1272F | Teensy 3.2 -------------------------- RESET | nc DIO0 | 2 DIO1 | 5 DIO2 | nc DIO3 | nc DIO4 | nc DIO5 | nc 3.3V | 3.3V GND | GND SCK | 13 - SCK MISO | 12 - DIN MOSI | 11 - DOUT NSS | 10 - CS
Please note that I did not connect the RESET and the DIO2 pin, which would be needed for FSK.
I used the following snippet of code in my Arduino sketch to specify the pin mapping:
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 10,
.rxtx = LMIC_UNUSED_PIN,
.rst = 9,
.dio = {2, 5, 6},
};
On the software side I am using Arduino 1.6.9, the LMIC library and the same sketch that I have been using with the RFM95W module.
I had to change the Semtech radio from SX1276 to SX1272 in theĀ arduino-lmic/src/lmic/config.h:
#define CFG_eu868 1
//#define CFG_us915 1
// This is the SX1272/SX1273 radio, which is also used on the HopeRF
// RFM92 boards.
#define CFG_sx1272_radio 1
// This is the SX1276/SX1277/SX1278/SX1279 radio, which is also used on
// the HopeRF RFM95 boards.
//#define CFG_sx1276_radio 1
Following all of this, this node is nicely sending packets to my TTN application.
Hi,
Nice work. Few questions:
1. Why did you not used the LMIC_UNUSED_PIN in config for RST and DIO2 ?
2. Did you managed to receive packets from ttn with the dorji module ?
Hi Catalin,
Regarding 1: I do have the RST and DIO2 pin connected (as I had them connected in my earlier RFM95W setup), but should admit that I don’t know how they are used by the LMIC library. I modeled the code after https://github.com/matthijskooijman/arduino-lmic/blob/master/examples/ttn-abp/ttn-abp.ino. Do you have reasons to assume that they are not needed?
Regarding 2: I actually did not try that with the Dorji. With the RFM95W and the same sketch on the Teensy (see http://robertoostenveld.nl/bidirectional-communication-over-the-things-network/) I was receiving messages that I entered on the TTN staging dashboard. Those are handled at https://github.com/robertoostenveld/arduino/blob/master/teensy_ttn2/teensy_ttn2.ino#L165 and cause a LED to blink. I don’t see a reason why that would not also work with the Dorji module.
best regards,
Robert