Necesito ayuda urgente (WIFI SHIELD)

Hola!!!

Necesito ayuda con el wifi shield de arduino que tengo conectado al arduino UNO.

Estoy intentanto conectar el wifi shield a la red WPA de mi casa, pero solamente me da ERROR.

Este es el codigo que estoy usando: Puse el nombre de mi red WLAN_9DEF y la contraseña, pero no entiendo porque no funciona.

Muchas Gracias!!

This example connects to an unencrypted Wifi network. 
 Then it prints the  MAC address of the Wifi shield,
 the IP address obtained, and other network details.

 Circuit:
 * WiFi shield attached
 
 created 13 July 2010
 by dlf (Metodo2 srl)
 modified 31 May 2012
 by Tom Igoe
 */
 #include <WiFi.h>

char ssid[] = "WLAN_9DEF";     //  your network SSID (name) 
char pass[] = "chevere1993";  // your network password
int status = WL_IDLE_STATUS;     // the Wifi radio's status

void setup() {
  //Initialize serial and wait for port to open:
  Serial.begin(9600); 
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }
  
  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present"); 
    // don't continue:
    while(true);
  } 
  
 // attempt to connect to Wifi network:
  while ( status != WL_CONNECTED) { 
    Serial.print("Attempting to connect to WPA SSID: ");
    Serial.println(ssid);
    // Connect to WPA/WPA2 network:    
    status = WiFi.begin(ssid, pass);

    // wait 10 seconds for connection:
    delay(10000);
  }
   
  // you're connected now, so print out the data:
  Serial.print("You're connected to the network");
  printCurrentNet();
  printWifiData();

}

void loop() {
  // check the network connection once every 10 seconds:
  delay(10000);
  printCurrentNet();
}

void printWifiData() {
  // print your WiFi shield's IP address:
  IPAddress ip = WiFi.localIP();
    Serial.print("IP Address: ");
  Serial.println(ip);
  Serial.println(ip);
  
  // print your MAC address:
  byte mac[6];  
  WiFi.macAddress(mac);
  Serial.print("MAC address: ");
  Serial.print(mac[5],HEX);
  Serial.print(":");
  Serial.print(mac[4],HEX);
  Serial.print(":");
  Serial.print(mac[3],HEX);
  Serial.print(":");
  Serial.print(mac[2],HEX);
  Serial.print(":");
  Serial.print(mac[1],HEX);
  Serial.print(":");
  Serial.println(mac[0],HEX);
 
}

void printCurrentNet() {
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  // print the MAC address of the router you're attached to:
  byte bssid[6];
  WiFi.BSSID(bssid);    
  Serial.print("BSSID: ");
  Serial.print(bssid[5],HEX);
  Serial.print(":");
  Serial.print(bssid[4],HEX);
  Serial.print(":");
  Serial.print(bssid[3],HEX);
  Serial.print(":");
  Serial.print(bssid[2],HEX);
  Serial.print(":");
  Serial.print(bssid[1],HEX);
  Serial.print(":");
  Serial.println(bssid[0],HEX);

  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.println(rssi);

  // print the encryption type:
  byte encryption = WiFi.encryptionType();
  Serial.print("Encryption Type:");
  Serial.println(encryption,HEX);
  Serial.println();
}

Hola

Seria interesante que cambiaras el titulo de tu post por algo que tenga que ver con lo que preguntas, eso facilitaria posteriores busquedas.

Otro detalle que ayudaria mucho seria englobar tu codigo dentro de la caja "codigo" o "code" (esta en el boton de # que hay arriba de donde escribes los post)

Es que asi se hace un churro de largo y es muy incomodo de leer.

Un saludo.

Genial

Asi se ve mucho mas claro y el titulo ayuda.

Te has fijado en el codigo que has puesto:
This example connects to an unencrypted Wifi network.

Una red WPA es encriptada, ya si le añades wp2 +tkip... apaga y vamonos...

Prueba a conectar quitando la seguridad del router wifi y una vez que veas que comunica con arduino te puedes pelear con el, con el tema del encriptamiento.

Mientras a ver si te encuentro algo de info de unas librerias que vi la semana pasada de protocolos wpa en arduino...

Un saludo.

Ah, a modo de observacion, aunque alguien ponga en un post lo de "ayuda urgente" no cambia la velocidad de respuesta de sus usuarios, da lo mismo se ponga urgente que no, pues no se contesta en los foros antes o despues dependiendo de si alguien plantea la pregunta asi:
"Ayuda urgente" "ayuda para dentro de un dia" o "Ayuda, no tengo prisa, podeis contestarme la semana que viene" y lo de la ayuda es obvio, sino no solicitarias informacion...

Vamos, que si hubieras puesto algo asi en el titulo: "problemas con wifi shield en red domestica wpa" hubiera dado lo mismo y la misma prisa en contestarte. pero hubieras mejorado que a posteriori cualquier usuario que buscara informacion sobre wifi shield o redes wpa lo encontrara facilmente.

De la otra forma tu post solo apareceria para cualquiera que hiciera una busqueda de "ayudas urgentes"

Hola!!

Gracias por la respuesta

Pues me han recomendado que intente cambiar la seguridad a WPA2 ya que con WPA esta dando muchos problemas. Tu crees que daria mas problemas??

Pues le quitare la seguridad a la red wifi,e intentare a ver si conecta! Pero entonces si es para una unencrypted wifi network, porque me pide que ingrese el password??

Muchas gracias por todo..ya te comentare como me fue!

Gracias!

Que tonto! buscandola y estaba en el reference:

Examples

ConnectNoEncryption : Demonstrates how to connect to an open network
ConnectWithWEP : Demonstrates how to connect to a network that is encrypted with WEP
ConnectWithWPA : Demonstrates how to connect to a network that is encrypted with WPA2 Personal

Esta si que si.

Un saludo

Acabo de usar esa que me mandas y sigue dando ERROR

No entiendo porque esta pasando esto!! ya estoy un poco desesperada jajaa

gracias por la ayuda!!

/*

 This example connects to an unencrypted Wifi network. 
 Then it prints the  MAC address of the Wifi shield,
 the IP address obtained, and other network details.

 Circuit:
 * WiFi shield attached

 created 13 July 2010
 by dlf (Metodo2 srl)
 modified 29 Feb 2012
 by Scott Fitzgerald
 */
 #include <WiFi.h>

char ssid[] = "WLAN_9DEF";     //  your network SSID (name) 
char pass[] = "chevere1993";    // your network password
int status = WL_IDLE_STATUS;     // the Wifi radio's status

void setup() {
  // initialize serial:
  Serial.begin(9600);

  // attempt to connect to an open network:
  Serial.print("Attempting to connect to WPA network: ");
  Serial.println(ssid);
  status = WiFi.begin(ssid, pass);

  // if you're not connected, stop here:
  if ( status != WL_CONNECTED) { 
    Serial.println("Couldn't get a wifi connection");
    while(true);
  } 
  // if you are connected :
  else {
      Serial.print("You're connected to the network");
      printCurrentNet();
      printWifiData();
  }
}

void loop() {
  // check the network connection once every 10 seconds:
  delay(10000);
  printCurrentNet();
}

void printWifiData() {
  // print your WiFi shield's IP address:
  IPAddress ip = WiFi.localIP();
    Serial.print("IP Address: ");
  Serial.println(ip);
  Serial.println(ip);

  // print your MAC address:
  byte mac[6];  
  WiFi.macAddress(mac);
  Serial.print("MAC address: ");
  Serial.print(mac[5],HEX);
  Serial.print(":");
  Serial.print(mac[4],HEX);
  Serial.print(":");
  Serial.print(mac[3],HEX);
  Serial.print(":");
  Serial.print(mac[2],HEX);
  Serial.print(":");
  Serial.print(mac[1],HEX);
  Serial.print(":");
  Serial.println(mac[0],HEX);

}

void printCurrentNet() {
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  // print the MAC address of the router you're attached to:
  byte bssid[6];
  WiFi.BSSID(bssid);    
  Serial.print("BSSID: ");
  Serial.print(bssid[5],HEX);
  Serial.print(":");
  Serial.print(bssid[4],HEX);
  Serial.print(":");
  Serial.print(bssid[3],HEX);
  Serial.print(":");
  Serial.print(bssid[2],HEX);
  Serial.print(":");
  Serial.print(bssid[1],HEX);
  Serial.print(":");
  Serial.println(bssid[0],HEX);

  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.println(rssi);

  // print the encryption type:
  byte encryption = WiFi.encryptionType();
  Serial.print("Encryption Type:");
  Serial.println(encryption,HEX);
  Serial.println();
}

Vamos a empezar desde cero y por partes.

Primero debes de confirmar que conecta con tu router de una forma sencilla.

Prueba a dejar el router por un momento sin encriptado (ni wep ni wpa) y con el ssid visible.

Contraseña te la pide obviamente porque una cosa es el encriptado de la informacion y otra el acceso a la red del router, que te hace falta el nombre del ssid y la contraseña de acceso.

Con esto intenta conectar y mira a ver lo que te dice la consola serie del arduino cuando lo conectas empleando los ejemplos de la web.

Si lo consigues ya tienes claro que el problema esta en el encriptado y no en la conexiones electronicas.

Un saludo.

Ya logre resolver el problema!!

Ahora ya esta conectado el wifi shield a mi red!

Muchas Gracias por todo!!

Gracias a ti por compartir la forma en que solucionaste tu problema!!

Eso, eso, ¿pero qué demonios pasaba? O es que nos vas dejar con la intriga :~

vdalessio:
Ya logre resolver el problema!!
Ahora ya esta conectado el wifi shield a mi red!
Muchas Gracias por todo!!