Hello,
I'm using the Lora SX1262 Module DRF1262T plugged into a Artemis Global Tracker which is a Redboard Sparkfun.
I'm trying to communicate to a module that has a SX1272 radio. I'm wondering if I'm supposed to match all the settings like code rate, sync word, preamble etc.. This is my first time working with radios.
I'm using RadioLib library.
I made sure the wiring were good, but I didn't plug the RST, BUSY,DIO1,DIO2 and SW pins of the SX1262, I'm wondering if it could be the reason i'm getting an error -707.
At the beginning I had a -2 error code because I inversed MISO and MOSI wires, but now I'm getting -707 error code.
Here's the code I wrote, please let me know if I forgot something:
#include <SPI.h>
#include <RadioLib.h>
SX1262 radio = new Module(spiCS1,43,43,35); //(NSS,DIO1,NRST,BUSY)
int state = 0;
void setup(){
Serial.begin(115200);
SPI.begin();
// initialize SX1262 with default settings
// carrier frequency: 915.0 MHz
// bandwidth: 125.0 kHz
// spreading factor: 9
// coding rate: 7
// sync word: 0x12 (public network/LoRaWAN)
// output power: 2 dBm
// preamble length: 8 symbols
state = radio.begin(915.0, 125.0, 9, 7, 0x12, 2, 8, 1.6 , false);
if (state == RADIOLIB_ERR_NONE) {
Serial.println(F("success!"));
} else {
Serial.print(F("failed, code "));
Serial.println(state);
while (true);
}
}
