Libelium is offering new technical support channels, to contact with de Technical Support team to solve any issue our doubt please contact with your sales agent or visit our contact site



Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
 Post subject: LoRaWAN, Factory default reset error
PostPosted: Mon Dec 04, 2017 5:30 pm 

Joined: Mon Dec 04, 2017 11:11 am
Posts: 3
Hi,
I got LoRaWAN with a shield. I am trying to configure it by running the configuration that is provided in examples file.
When it reaches the factory default, it gives me an error as following
Code:
sys get ver
1. Switch ON OK
sys factoryRESET
2. Reset to factory error


I used the following code
Code:
#include <Wire.h>

// Cooking API libraries
#include <arduinoUART.h>
#include <arduinoUtils.h>

// LoRaWAN library
#include <arduinoLoRaWAN.h>

// Pin definition for LoRaWAN module error LED:
const int error_led =  13;

//////////////////////////////////////////////
uint8_t socket = SOCKET0;
//////////////////////////////////////////////

// Device parameters for Back-End registration
////////////////////////////////////////////////////////////
char DEVICE_EUI[]  = "0102030405060708";
char DEVICE_ADDR[] = "05060708";
char NWK_SESSION_KEY[] = "01020304050607080910111213141516";
char APP_SESSION_KEY[] = "000102030405060708090A0B0C0D0E0F";
char APP_KEY[] = "000102030405060708090A0B0C0D0E0F";
////////////////////////////////////////////////////////////

// variable
uint8_t error;


void setup()
{
  //LoRaWAN example - Module configuration
  pinMode(error_led, OUTPUT);
  digitalWrite(error_led, LOW);

  //////////////////////////////////////////////
  // 1. switch on
  //////////////////////////////////////////////
  error = LoRaWAN.ON(socket);

  // Check status
  if( error == 0 )
  {
    Serial.print("1. Switch ON OK \n");
    digitalWrite(error_led, LOW);
  }
  else
  {
     Serial.print("1. Switch ON error");
    digitalWrite(error_led, HIGH);
  }

  //////////////////////////////////////////////
  // 2. Reset to factory default values
  //////////////////////////////////////////////
  error = LoRaWAN.factoryReset();

  // Check status
  if( error == 0 )
  {
     Serial.print("2. Reset to factory default values OK ");
    digitalWrite(error_led, LOW);
  }
  else
  {
     Serial.print("2. Reset to factory error \n");
    digitalWrite(error_led, HIGH);
  }

}


void loop()
{
  // do nothing
}

how to overcome this ??

Thanks in advance


Top
 Profile  
 
 Post subject: Re: LoRaWAN, Factory default reset error
PostPosted: Tue Dec 05, 2017 8:18 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Hi yazanqib,

Can you give us more information?

Share with us some photos of you hardware to see how are you connecting it.

Which arduino are you using?

Have you got problems with other codes?

Thanks.

Regards.


Top
 Profile  
 
 Post subject: Re: LoRaWAN, Factory default reset error
PostPosted: Fri Dec 15, 2017 6:46 pm 

Joined: Mon Dec 04, 2017 11:11 am
Posts: 3
I fixed the issue it was related to socket connection

sorry for that


Top
 Profile  
 
 Post subject: Re: LoRaWAN, Factory default reset error
PostPosted: Mon Dec 18, 2017 8:09 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Hi yazanqib,

Nice to read it.

Good luck with your project.

Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 4 posts ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use.