Failed to Set to TX/RX Mode

I have made LoRa SPI driver using ESP-IDF for LoRa module from NiceRF and it worked well. When I tried to use the same driver for E22-400M22S module from Ebyte, it did not work well. It failed to set LoRa module to TX/RX mode. GetStatus command returned 2 for chip mode and 5 for command status. Other commands worked successfully. When I tried to use another SX126x driver library using Arduino framework, it worked well for ebyte LoRa module but failed to set to TX/RX mode for NiceRF module. So it seems to me that E22-400M22S only works well with Arduino SPI and not with ESP-IDF SPI, and vice versa for NiceRF module. I need to work with ESP-IDF. Can someone help me to solve this problem?

Thank you.

I have not had problems using the NiceRF SX126X modules with and ESP32 under Arduino.

The SX126X modules do have specific setups in relation to TCXO and RF switch settings, how these are implemented is up to the manusfacturer of the module.

So you either need sample code from the manuafacturer (NiceRF,Ebyte) or you need to ask them what the setup for thier modules is.

Hi @stuart,

After reading your answer, I replicate each step of LoRa Arduino driver to LoRa ESP-IDF driver and it works! So the problem is probably as you said that each manufacturer has its own way to initiate its LoRa module.

Thank you.