Migrating Arduino SPI code to ESP8266 SPI code

Hi,
I am trying to make Lora SPI Arduino code to work in ESP8266. I thought they are the same because it compile successfully. But it failed to communicate with the LORA module.
What are the change or config required?

Thanks;

what particular LoRa module is it? give a link?
how have you connected it to the ESP8266?
for a RA-02 LoRa module I have used

// connections
// RA-02 SS   to ESP8266 GPIO 15 D8
// RA-02 RST  to ESP8266 GPIO 16 D0
// RA-02 MOSI to ESP8266 GPIO 13 D7
// RA-02 MIS0 to ESP8266 GPIO 12 D6
// RA-02 SCK  to ESP8266 GPIO 14 D5
// RA-02 DIO0 to ESP8266 GPIO 4  D2

using the arduino-LoRa library

// setpins() is therefore
// setPins(int ss = LORA_DEFAULT_SS_PIN, int reset = LORA_DEFAULT_RESET_PIN, int dio0 = LORA_DEFAULT_DIO0_PIN);
 LoRa.setPins(15,16,4);  // for ESP8266

how have you powered the LoRa module?
can you upload the serial monitor output as text, e.g. select < CODE/ > and paste the code or text where it says “type or paste code here”

PAN3031 by ChirpIOT. GitHub - vacabun/PAN3031_demo for SMT32. I try to migrate it to ESP8266. In Arduino, I get stuck at sendTx(no response interrupt) thus I migrate it to Esp8266 but in esp8266, it get stuck from the beginning, i.e SPI no response from the module

what ESP8266 module are you using?
how have you connected the PAN3031 LoRa module to the ESP8266?
have of look at esp8266-pinout-reference-gpios
upload the code?

And what type of LoRa module is that ?

There are a couple of different types and they have different methods being addressed over SPI.

Sorry, it was due to IRQ pin nothing to do with SPI. It works now.

It's Chinese brand.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.