Probably Wi-Fi problem in Smart Environment PRO

KeniaSC
Posts: 22
Joined: Thu Jul 26, 2018 8:35 pm
Company: Elara Comunicaciones

Re: Probably Wi-Fi problem in Smart Environment PRO

Post by KeniaSC » Tue Sep 18, 2018 1:26 am

Hello friends,

I have the same problem, 2 weeks ago my libelium was work well but connected again, and i can't use wifi radio. I tried charge the program again but shown this:

Code: Select all

Start program
1. WiFi switched ON
2. WiFi reset to default
3. WiFi set ESSID OK
4. WiFi set AUTHKEY OK
5. WiFi softReset OK
*******************************************
Once the module is configured with ESSID
and PASSWORD, the module will attempt to 
join the specified Access Point on power up
*******************************************

WiFi is connected ERROR Time(ms):30301
WiFi is connected ERROR Time(ms):60617
This is a probe for wifi, the real code show this:

Code: Select all

Start program
...wait for PIR stabilization
Sensor output: Presence not detected
-----------------------------
Temperature: 24.33 Celsius
Humidity: 42.0 %
Pressure: 77987.30 Pa
-----------------------------
Sensor output: Door movement detected
Sensor output: LEVEL NOT REACHED
enter deep sleep
wake up

-----------------------------
RTC INT captured
-----------------------------
WiFi switched ON
WiFi is connected ERROR Time(ms):34816
WiFi switched OFF
Can you help me please!!! =( . I tried with other antenna, but the problem is the same.

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Probably Wi-Fi problem in Smart Environment PRO

Post by libelium-dev » Tue Sep 18, 2018 9:33 am

Hi,

Could you try to connect the WiFi module to another WiFi network? Do you know if any parameter of the WiFi network configuration has been changed?

What API are you using? Did you try the last API v035?

Regards

KeniaSC
Posts: 22
Joined: Thu Jul 26, 2018 8:35 pm
Company: Elara Comunicaciones

Re: Probably Wi-Fi problem in Smart Environment PRO

Post by KeniaSC » Tue Sep 18, 2018 5:31 pm

Hello,

I tried with API v035, i was using API v033 but is the same issue. I tried with another WiFi network and the problem continue, and checked the WiFi network configuration but is OK.

I can upload the program fine and i see the all sensor parameters OK except when try to send data. In addition, i can't see it in the Meshlium... :(

Code: Select all

Start program
...wait for PIR stabilization
...wait for PIR stabilization
...wait for PIR stabilization
...wait for PIR stabilization
Sensor output: Presence not detected
-----------------------------
Temperature: 21.50 Celsius
Humidity: 59.6 %
Pressure: 78361.60 Pa
-----------------------------
Sensor output: Door movement detected
Sensor output: LEVEL REACHED
enter deep sleep
wake up

-----------------------------
RTC INT captured
-----------------------------
WiFi switched ON
WiFi is connected ERROR Time(ms):34812
WiFi switched OFF
Do you have another idea?, thnks

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Probably Wi-Fi problem in Smart Environment PRO

Post by libelium-dev » Wed Sep 19, 2018 10:29 am

Hi,

Could you please share with us the output for the WIFI_PRO_01 example with debug mode 1 enabled? You can enable it inside WaspWIFI_PRO.h file

Code: Select all

#define DEBUG_WIFI_PRO 	1
Also please check the battery level.

Regards

KeniaSC
Posts: 22
Joined: Thu Jul 26, 2018 8:35 pm
Company: Elara Comunicaciones

Re: Probably Wi-Fi problem in Smart Environment PRO

Post by KeniaSC » Thu Dec 13, 2018 9:44 pm

Hello,

The level battery is 100%, I share with you the output for the WIFI_PRO_01 example with debug mode 1 enabled.

https://drive.google.com/file/d/1yZ0kLe ... sp=sharing

Thanks for your support

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Probably Wi-Fi problem in Smart Environment PRO

Post by libelium-dev » Fri Dec 14, 2018 11:29 am

Hi,

Is the antenna connected to the P&S?

Please make sure that there isn't any problem with the WiFi network and try with different networks and configurations.

What code are you using?

Regards

KeniaSC
Posts: 22
Joined: Thu Jul 26, 2018 8:35 pm
Company: Elara Comunicaciones

Re: Probably Wi-Fi problem in Smart Environment PRO

Post by KeniaSC » Fri Dec 14, 2018 5:11 pm

Hello,

My antenna is connected to the P & S, I tried it with another antenna from my other Libelium and the issue is the same. My WiFi network is well, you can see my code....

Code: Select all

/*  


#include <WaspWIFI_PRO.h>


// choose socket (SELECT USER'S SOCKET)
///////////////////////////////////////
uint8_t socket = SOCKET0;
///////////////////////////////////////

// WiFi AP settings (CHANGE TO USER'S AP)
///////////////////////////////////////
char ESSID[] = "libelium_AP";
char PASSW[] = "password";
///////////////////////////////////////

// define variables
uint8_t error;
uint8_t status;
unsigned long previous;



void setup() 
{
  USB.println(F("Start program"));  


  //////////////////////////////////////////////////
  // 1. Switch ON the WiFi module
  //////////////////////////////////////////////////
  error = WIFI_PRO.ON(socket);

  if (error == 0)
  {    
    USB.println(F("1. WiFi switched ON"));
  }
  else
  {
    USB.println(F("1. WiFi did not initialize correctly"));
  }


  //////////////////////////////////////////////////
  // 2. Reset to default values
  //////////////////////////////////////////////////
  error = WIFI_PRO.resetValues();

  if (error == 0)
  {    
    USB.println(F("2. WiFi reset to default"));
  }
  else
  {
    USB.println(F("2. WiFi reset to default ERROR"));
  }


  //////////////////////////////////////////////////
  // 3. Set ESSID
  //////////////////////////////////////////////////
  error = WIFI_PRO.setESSID(ESSID);

  if (error == 0)
  {    
    USB.println(F("3. WiFi set ESSID OK"));
  }
  else
  {
    USB.println(F("3. WiFi set ESSID ERROR"));
  }


  //////////////////////////////////////////////////
  // 4. Set password key (It takes a while to generate the key)
  // Authentication modes:
  //    OPEN: no security
  //    WEP64: WEP 64
  //    WEP128: WEP 128
  //    WPA: WPA-PSK with TKIP encryption
  //    WPA2: WPA2-PSK with TKIP or AES encryption
  //////////////////////////////////////////////////
  error = WIFI_PRO.setPassword(WPA2, PASSW);

  if (error == 0)
  {    
    USB.println(F("4. WiFi set AUTHKEY OK"));
  }
  else
  {
    USB.println(F("4. WiFi set AUTHKEY ERROR"));
  }


  //////////////////////////////////////////////////
  // 5. Software Reset 
  // Parameters take effect following either a 
  // hardware or software reset
  //////////////////////////////////////////////////
  error = WIFI_PRO.softReset();

  if (error == 0)
  {    
    USB.println(F("5. WiFi softReset OK"));
  }
  else
  {
    USB.println(F("5. WiFi softReset ERROR"));
  }


  USB.println(F("*******************************************"));
  USB.println(F("Once the module is configured with ESSID"));
  USB.println(F("and PASSWORD, the module will attempt to "));
  USB.println(F("join the specified Access Point on power up"));
  USB.println(F("*******************************************\n"));

  // get current time
  previous = millis();
}



void loop()
{ 
  //////////////////////////////////////////////////
  // Join AP
  //////////////////////////////////////////////////  

  // Check if module is connected
  if (WIFI_PRO.isConnected() == true)
  {    
    USB.print(F("WiFi is connected OK"));
    USB.print(F(" Time(ms):"));    
    USB.println(millis()-previous); 

    USB.println(F("\n*** Program stops ***"));
    while(1)
    {}
  }
  else
  {
    USB.print(F("WiFi is connected ERROR")); 
    USB.print(F(" Time(ms):"));    
    USB.println(millis()-previous);  
  }
}

Thanks for yor support :)

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Probably Wi-Fi problem in Smart Environment PRO

Post by libelium-dev » Mon Dec 17, 2018 8:57 am

Hi,

Is the node trying to connect to a Meshlium AP?

Code: Select all

char ESSID[] = "libelium_AP";
char PASSW[] = "password";
Regards

KeniaSC
Posts: 22
Joined: Thu Jul 26, 2018 8:35 pm
Company: Elara Comunicaciones

Re: Probably Wi-Fi problem in Smart Environment PRO

Post by KeniaSC » Mon Dec 17, 2018 8:56 pm

Hello,

Thanks I did not see that, I already changed it, but i have anothe issue, only works if the Libelium is placed vertically with the sensors down. Can you tell me why ??

Here the output from WIFI_PRO

Code: Select all

Start program
1. WiFi switched ON
2. WiFi reset to default
3. WiFi set ESSID OK
4. WiFi set AUTHKEY OK
5. WiFi softReset OK
*******************************************
Once the module is configured with ESSID
and PASSWORD, the module will attempt to 
join the specified Access Point on power up
*******************************************

WiFi is connected ERROR Time(ms):38746
WiFi is connected OK Time(ms):46030

*** Program stops ***
thanks for your support! :D

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Probably Wi-Fi problem in Smart Environment PRO

Post by libelium-dev » Tue Dec 18, 2018 9:16 am

Hi,

The P&S placed vertically with the sensors down is the normal way to set it.

Maybe the coverage is low and depending on how the antenna is set, the node can't connect to the WiFi AP.

Regards

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest