Wiring of DIO-pins of LoRa SX127x chip to ESP32
-
I'm using LMIC software (raw c++, not python) on LoPy4.
LMIC needs pins DIO0 and DIO1 (and optional DIO2) of LoRa chip SX127x wired to GPIOs of ESP32 cpu, for signalling events.How are the DIO pins wired on LoPy4 to ESP32?
In the datasheet i only find "Lora IRQ" which is DIO0.
Is DIO1 not wired? -
@verkehrsrot All DIO are wired through a diode bridge to a single pin on the esp32 . This way you get events from all pins without sacrificing additional IO on the esp32 but you'll have to check the registers to see which pin triggered the interrupt.
-
@xykon aah, ok. That should work with Lmic. Thanks!
(is there a schematic of the LoPy anywhere?) -
Hi ,
Some one did do that before with lopy , check the below link:https://www.thethingsnetwork.org/labs/story/program-your-lopy-from-the-arduino-ide-using-lmic
LMIC configuration is :
const lmic_pinmap lmic_pins = {
.mosi = 27,
.miso = 19,
.sck = 5,
.nss = 17,
.rxtx = LMIC_UNUSED_PIN,
.rst = 18,
.dio = {23, 23, 23}, //workaround to use 1 pin for all 3 radio dio pins
};So like @Xykon say each DIO is wired trought a diode to DIO 23 of ESP32
Try first that with lopy4 too ... i think will work, but take care lopy is using SX1272 lora chip and lopy4 use SX1276 chip and u need to change in LMIC conf to use SX1276
I hope that will helping you!
-
To everyone who has the same problem for LoPy4, I would like to post the working configuration identified based on the posting by @verkehrsrot .
const lmic_pinmap lmic_pins = {
.mosi = 27,
.miso = 19,
.sck = 5,
.nss = 18,
.rxtx = LMIC_UNUSED_PIN,
.rst = LMIC_UNUSED_PIN,
.dio = {23, 23, 23}, //workaround to use 1 pin for all 3 radio dio pins
}; -
@KK @Verkehrsrot , when I utilize that LoPy4 configuration I'm getting a
GPIO_PIN mask erroron startup duringlmic: Starting IO initialization- any thoughts?Using ESP-IDF 3.3 and https://github.com/TobleMiner/lmic-esp-idf
-
@malachib i know is a hold post but y reply for other
is a bug in lmic-esp-idf in hal.c changeio_conf.pin_bit_mask = (1<<lmic_pins.nss) | (1<<lmic_pins.rst);
by
io_conf.pin_bit_mask = (1<<lmic_pins.nss);
if(lmic_pins.rst!=LMIC_UNUSED_PIN)
io_conf.pin_bit_mask = (1<<lmic_pins.rst);
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login