ENABLE_PIN_IO was not declared in this scope

Hi,

I’m loading the demo Simple LoRa sketch to my one and after compiling and error appears:
LoRaWAN_ABP_OTAA_SAMPLE:45: error: ‘ENABLE_PIN_IO’ was not declared in this scope

pinMode(ENABLE_PIN_IO, OUTPUT); // ONE
exit status 1

Anybody knows why?

Many many thank’s

#include <Arduino.h>
#include <Wire.h>

#include "Sodaq_RN2483.h"

#define debugSerial SerialUSB
#define loraSerial Serial1

// ABP
const uint8_t devAddr[4] = { ****************** };
const uint8_t appSKey[16] = { ************************************} ;
const uint8_t nwkSKey[16] = { ***************************};

   void setupLoRaABP(){  
  if (LoRaBee.initABP(loraSerial, devAddr, appSKey, nwkSKey, true))
  {

debugSerial.println(“Communication to LoRaBEE successful.”);
}
else
{
debugSerial.println(“Communication to LoRaBEE failed!”);
}
}

void setup() {
  //Power up the LoRaBEE
  //pinMode(BEE_VCC, OUTPUT); // Autonomo
  //digitalWrite(BEE_VCC, HIGH); // Autonomo
  pinMode(ENABLE_PIN_IO, OUTPUT); // ONE
  digitalWrite(ENABLE_PIN_IO, HIGH); // ONE
  delay(3000);

  while ((!SerialUSB) && (millis() < 10000)){

// Wait 10 seconds for the Serial Monitor
}

  //Set baud rate
  debugSerial.begin(57600);
  loraSerial.begin(LoRaBee.getDefaultBaudRate());

  // Debug output from LoRaBee
   LoRaBee.setDiag(debugSerial); // optional

  //connect to the LoRa Network
  setupLoRa();
}

void setupLoRa(){
  // ABP
  setupLoRaABP();
  // OTAA
//  setupLoRaOTAA();
}

void sendPacket(String packet){
  switch (LoRaBee.sendReqAck(1, (uint8_t*)packet.c_str(), packet.length(), 8))

{
case NoError:
debugSerial.println(“Successful transmission.”);
break;
case NoResponse:
debugSerial.println(“There was no response from the device.”);
setupLoRa();
break;
case Timeout:
debugSerial.println(“Connection timed-out. Check your serial connection to the device! Sleeping for 20sec.”);
delay(20000);
break;
case PayloadSizeError:
debugSerial.println(“The size of the payload is greater than allowed. Transmission failed!”);
break;
case InternalError:
debugSerial.println(“Oh No! This shouldn’t happen. Something is really wrong! Try restarting the device!\r\nThe network connection will reset.”);
setupLoRa();
break;
case Busy:
debugSerial.println(“The device is busy. Sleeping for 10 extra seconds.”);
delay(10000);
break;
case NetworkFatalError:
debugSerial.println(“There is a non-recoverable error with the network connection. You should re-connect.\r\nThe network connection will reset.”);
setupLoRa();
break;
case NotConnected:
debugSerial.println(“The device is not connected to the network. Please connect to the network before attempting to send data.\r\nThe network connection will reset.”);
setupLoRa();
break;
case NoAcknowledgment:
debugSerial.println(“There was no acknowledgment sent back!”);
// When you this message you are probaly out of range of the network.
break;
default:
break;
}
}

void loop() {
  // put your main code here, to run repeatedly:
  String packet = "SODAQ";
  sendPacket(packet);

  delay(5000);
}

Did you select the Sodaq One board as target in the IDE?

Upppps!!! I’m the most stupid of the world

Many many thanks for your help, I’m going to suicide

LOL don’t worry about it, I recognized that message because it has happened to me also a couple of times

1 Like

Solved this stupidity, now the error is:

There was no response from the device.
Communication to LoRaBEE failed!

The keys are correct, you know why?

Now I just connect the sodaq tracker and averything is ok!! but with this scketch did not works

You need the keys to communicate to the LoRa network. That message indicates that you cannot talk to the LoRa module itself.

You did wake it up and initialized it before trying to send a message with it?

Hi,

Yessss I did it:
#include <Arduino.h>
#include <Wire.h>

#include “Sodaq_RN2483.h”

#define debugSerial SerialUSB
#define loraSerial Serial1

// ABP
const uint8_t devAddr[4] = {0};
const uint8_t appSKey[16] = { 0 } ;
const uint8_t nwkSKey[16] = { };
By the way I sent a private message

After you upload a sketch, you sometimes need to power cycle the SodaqOne. This is to reset the LoRa module.

Hi Gabriel,

Exactly, now is working perfect after power down and power on again.

Many many thank’s

Eduard

hi there,
I’m trying to compile the SodaqOne-UniversalTracker-v2-Cayenne avaialble on Sodaq support page but I keep getting this error message at compilation:
SodaqOneTracker_v2:509: error: ‘LORA_RESET’ was not declared in this scope
the board is coorectly selected to sodaq one (but displaying sodaq explorer on Com4); any clue?
many thanks for your support, I’m stucked

Which version of the Sodaq SAMD platform files do you have installed? The definition for LORA_RESET seems to be a more recent addition to the platform files. An addition which may not yet have been released to the public distribution.

You can define it at the top of the sketch if needed, using:

#define LORA_RESET 49

thank you,I’m using v1.6.12
added the define and it compiles ok,
but now just keep rebooting the board every 22seconds with only display ** SodaqOne Universal Tracker v2 - 4.1 ** on monitor port …

hello,
I don’t find the clue, the sodaq one keeps rebooting the board every 22seconds with only display ** SodaqOne Universal Tracker v2 - 4.1 ** on monitor port.
any idea someone? thanks

Hi Philippe,

I had the same issue. I was even thinking, that I bricked my Sodaq One. I managed to reset it to run the bootloader by pulling the reset line low twice within one second. The bootloader showed up at another comport, than normal. Now I could flash a known good sketch. This made my board operational again, but I did not yet managed to get the Cayenne version running. I think it is not compatible with the previous version version of the board. I have the “Sodaq One” and not the “Sodaq One V2”.

Regards, Eelke.