Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
 Post subject: WIFI WEP encryption
PostPosted: Sun May 27, 2012 3:46 pm 

Joined: Wed Apr 25, 2012 4:11 pm
Posts: 24
Hi,
as it is said in the wifi tech guide, the average connection time for AP of WEP encryption is only 4,077s. However in my code tested the time, it is turned out to be 70+s. Would you please help me to figure it out why it does like this?

Here is my code:
Code:
long previous=0;
long connection_time=0;
int count=0;

void setup(){
  // First, initialize the WIFI API and the connections with the waspmote
  WIFI.begin();
  // Then switch on the WIFI module on the desired socket.
  WIFI.ON(socket0);
  // If we don't know what configuration had the module, reset it.
  WIFI.resetValues();
 
  // 1. Configure the transport protocol (UDP, TCP, FTP, HTTP...)
  WIFI.setConnectionOptions(CLIENT|UDP);
  // 2. Configure the way the modules will resolve the IP address.
  WIFI.setDHCPoptions(DHCP_ON);
  Utils.setLED(LED1,LED_ON);
}

void loop(){
  // 3.0 Specify the Access Point.
  WIFI.setESSID("wifixs");
  WIFI.setAuthKey(WEP, "369369369A");
  WIFI.setTXPower(0);//12dBm
  Utils.setLED(LED0,LED_ON);

  previous=millis();
  if (WIFI.setJoinMode(AUTO_STOR))
  {
    connection_time=millis()-previous;     
    Utils.setLED(LED1,LED_OFF);
    if(WIFI.isConnected())
        Utils.blinkLEDs(300);
  }
  count++;
  WIFI.leave();
//  ave=sum/count;
    // Displays singal strenght information.
  WIFI.getRSSI();
  if(count==1)
  // Displays Access Point settings.
    WIFI.getWLANsettings();
 
  USB.println(WIFI.answer);
  USB.println(count);
  USB.print(connection_time);
  USB.println("ms");
  USB.println("\r\n");
   
  WIFI.setSleep(80,5);
  USB.println("wake up");
}


result:
þ$$$$$$$$$set s p 0x4000
factory RESET
reboot
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$set s p 0x4000
set i p 9
set i d 1
set w s wifixs
set w k 333639333639333639410
set w tx 0
leave
set w j 1
save
reboot
$$$get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
leave
show r
get w
get w

SSID=wifixs
Chan=0
ExtAnt=0
Join=1
Auth=OPEN
Mask=0x1fff
Rate=12, 24 Mb
Linkmon=0
Passphrase=rubygirl
TxPower=0
<2.23>
1
76878ms


set s w 80
set s s 5
save
reboot
$$$wake up
set w s wifixs
set w k 333639333639333639410
set w tx 0
leave
set w j 1
save
reboot
$$$get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
get ip
leave
show r
show r

RSSI=(-42) dBm
<2.23>
2
73827ms


Top
 Profile  
 
 Post subject: Re: WIFI WEP encryption
PostPosted: Sun May 27, 2012 3:47 pm 

Joined: Wed Apr 25, 2012 4:11 pm
Posts: 24
Thank you very much, with best regards.


Top
 Profile  
 
 Post subject: Re: WIFI WEP encryption
PostPosted: Tue May 29, 2012 11:37 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7440
Summerx,

your WEP key is too short and it is not correct. It should be 13 chars

Please check it at line WIFI.setAuthKey(WEP, "369369369A");

Let us know

Regards


Top
 Profile  
 
 Post subject: Re: WIFI WEP encryption
PostPosted: Wed May 30, 2012 1:09 am 

Joined: Wed Apr 25, 2012 4:11 pm
Posts: 24
Yes!!! It is really useful after I changed the code. The connection time is alright. Thank you~~~~


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