I have an ESP32 TTGO T-Call and I want to add a LoRa SX1276. I am new to that and I am trying to write a simple program that, when it receives a packet from a LoRa sender, sends via gsm an HTTP request. GSM communication works fine with the TinyGSM library. My problem is the LoRa connection.
Specific chips according to this issue have some reserved pins. If I use the pins of the above example lora works but GSM does not work, because of the reserved pins for the SIM800. I am posting a piece of code with the LoRa setup that is not working. If there is a need for further explanation please ask. I will appreciate any kind of help.
#define SCK 14
#define SS 15
#define MISO 19
#define MOSI 27
#define RST 34
#define DIO0 33
SPI.begin(SCK, MISO, MOSI, SS);
//setup LoRa transceiver module
LoRa.setPins(SS, RST, DIO0);
while (!LoRa.begin(866E6)) {
SerialMonitor.println(".");
delay(500);
}
SerialMonitor.println("LoRa Initializing OK!");
Edited
With setting
#define LORA_MISO 19
#define LORA_MOSI 27
#define LORA_SCK 5
#define LORA_SS 18
#define LORA_RST 14
#define LORA_DIO0 26
Lora works (not sim800) but with the settings of @Juraj comment i am getting
E (11571) gpio: GPIO can only be used as input mode [ 11575][E][esp32-hal-gpio.c:130] __pinMode(): GPIO config failed E (11571) gpio: gpio_set_level(226): GPIO output gpio_num error E (11586) gpio: gpio_set_level(226): GPIO output gpio_num error
Edit
Although the error exists it is working with the above settings:
#define LORA_MISO 2
#define LORA_MOSI 13
#define LORA_SCK 14
#define LORA_SS 15
#define LORA_RST 34
#define LORA_DIO0 25
Some packets from the sender are lost but it seems to be working. I don't know why, but it is working... Also it does not seem very stable.
Finally pins 34-39 can be used as input so #define LORA_RST 34
is not working. But it is not receiving yet from the sender.