Hello,
I am experiencing some troubles with the LoRa module occasionally. I know that one of the improvements of the V2 board is that it was included a LoRa reset line.
Does anybody know which is the corresponding pin on the board? Any pin name? Any example of how to reset the LoRa module?
Thanks and regards,
Pablo
Jan
February 14, 2017, 9:30am
2
Hi Pablo,
The corresponding pin is LORA_RESET
Not in the current board files
Please copy the extracted files from the zip file to %localappdata%Arduino15/packages/sodaq/variants/one
https://www.janvanloenen.com:9091/share.cgi?ssid=0KhKEzM
Example:
// RESET LORA_MODULE
pinMode(LORA_RESET, OUTPUT);
digitalWrite(LORA_RESET, LOW);
delay(10);
digitalWrite(LORA_RESET, HIGH);
delay(10);
LORA_STREAM.begin(LORA_BAUD);
Regards,
Jan
Hello Jan,
I wanted to make a quick step so I defined this without creating the board variant with the files you shared:
static const uint8_t LORA_RESET = (49u);
and then I paste the code that you shared. Now it seems the board is dead… like not responding and not being recognized by the Arduino Port.
Did I do anything really wrong?
Thanks,
Pablo
Jan
February 16, 2017, 2:13pm
4
Hi Pablo,
Can you double press the reset on the base board?
This will put the board in bootloader mode. You should get a different com port to upload new code.
Regards,
Jan
Hello,
The solution worked! Thanks! I managed to make a factory reset and test the new code. Sometimes the initialization of LoRa fails, but I don’t manage to reproduce the error reliably. I changed the code to this other, just in case it can help:
/**
* Hardware reset of LoRa
*/
bool resetLora() {
debugPrintln("Hard reseting the LoRa module...");
// LoRa reset pin
pinMode(LORA_RESET, OUTPUT);
digitalWrite(LORA_RESET, HIGH);
sodaq_wdt_safe_delay(100);
digitalWrite(LORA_RESET, LOW);
sodaq_wdt_safe_delay(100);
digitalWrite(LORA_RESET, HIGH);
sodaq_wdt_safe_delay(1000);
initLora();
}
By the way, this is the path for the Mac OS X users:
/Users/YOUR_USER/Library/Arduino15/packages/SODAQ/hardware/samd/1.6.12/variants/sodaq_one/
Thanks a lot for your help!
Regards,
Pablo
1 Like