Show Posts
Pages: [1] 2
1  International / Software / Arduino WIFI shield con IP estatica on: January 06, 2013, 04:24:04 pm
Alguien tiene idea, de como asignar una IP estatica al arduino wifi shield.

Cada vez que me conecto a la wifishield, la IP cambia, y eso la verdad no me sirve. No hay manera de asignar en el codigo que cargamos a la placa, la IP que quiero??

En el ethernet shield si se puede, pero en la wifi no??

Gracias!!
2  Using Arduino / Project Guidance / Static IP for webserver with Arduino Wi-Fi Shield v2 on: January 04, 2013, 10:46:57 am
Hello

Does anyone know, how to set up an static IP address for a webserver created using the Arduino Wi-Fi shield??

Everytime I want to connect, the IP address change, and for my project that is a big problem.

I've been looking some info, and all I can find is the no-ip thing, and also something that I need to pay for an static IP to my service company.

Thanks!!
3  Using Arduino / Project Guidance / Arduino Web Server + Wi Fi Shield on: December 08, 2012, 11:43:09 am
Hello

I've been searching for some tutorials on how to write the code for a basic web server in the wi-fi shield, where I can control one LED and simply turn it on/off.

Everything i've found, is with the ethernet shield but as I said, im using the  new wifi shield.

I used the example library from arduino named "wifiwebserver", I created the web server, but now I want to add some content, the buttons, etc, etc.

What should I write?? If you got any tutorial please let me know!

Thanks!!


Code:
/*
  Web  Server
 
 A simple web server that shows the value of the analog input pins.
 using a WiFi shield.
 
 This example is written for a network using WPA encryption. For
 WEP or WPA, change the Wifi.begin() call accordingly.
 
 Circuit:
 * WiFi shield attached
 * Analog inputs attached to pins A0 through A5 (optional)
 
 created 13 July 2010
 by dlf (Metodo2 srl)
 modified 31 May 2012
 by Tom Igoe
 */
#include <SPI.h>
#include <WiFi.h>


char ssid[] = "yourNetwork";      //  your network SSID (name)
char pass[] = "secretPassword";   // your network password
int keyIndex = 0;                 // your network key Index number (needed only for WEP)

int status = WL_IDLE_STATUS;

WiFiServer server(80);

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 SSID: ");
    Serial.println(ssid);
    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:    
    status = WiFi.begin(ssid, pass);

    // wait 10 seconds for connection:
    delay(10000);
  }
  server.begin();
  // you're connected now, so print out the status:
  printWifiStatus();
}


void loop() {
  // listen for incoming clients
  WiFiClient client = server.available();
  if (client) {
    Serial.println("new client");
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        Serial.write(c);
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println("Connnection: close");
          client.println();
          client.println("<!DOCTYPE HTML>");
          client.println("<html>");
          // add a meta refresh tag, so the browser pulls again every 5 seconds:
          client.println("<meta http-equiv=\"refresh\" content=\"5\">");
          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            int sensorReading = analogRead(analogChannel);
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(sensorReading);
            client.println("<br />");      
          }
          client.println("</html>");
           break;
        }
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        }
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(1);
      // close the connection:
      client.stop();
      Serial.println("client disonnected");
  }
}


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

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

  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");
}
4  International / Software / Re: Necesito ayuda urgente (WIFI SHIELD) on: November 26, 2012, 01:19:37 pm
Ya logre resolver el problema!!

Ahora ya esta conectado el wifi shield a mi red!

Muchas Gracias por todo!!
5  International / Software / Re: Necesito ayuda urgente (WIFI SHIELD) on: November 25, 2012, 04:06:44 pm
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!!


Code:
/*

 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();
}
6  International / Software / Re: Necesito ayuda urgente (WIFI SHIELD) on: November 20, 2012, 12:02:35 pm
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!
7  Using Arduino / Project Guidance / Re: New Arduino Wifi Shield on: November 20, 2012, 11:58:52 am
Yes! Already read those and doesnt help at all...it seems arduino wifi shield has problems connecting with WPA networks

Thanks anyways!
8  Using Arduino / Networking, Protocols, and Devices / Re: Wifi conect to WPA example is not working on: November 20, 2012, 11:55:30 am
Thanks!!

Im gonna try and change it to WPA2 if it is possible!

Thank you!
9  Using Arduino / Networking, Protocols, and Devices / Re: Wifi conect to WPA example is not working on: November 18, 2012, 11:02:44 am
Thanks for the answer!!

Just one more question

The password is the one for example the computer ask me when I want to connect to the Wifi network or is it another one??
If this is the one i should enter, I have to enter the one that came by default or the one that I changed??


I checked and the security type is WPA-PSK


Thanksss
10  Using Arduino / Networking, Protocols, and Devices / Re: Official WiFi shield Network Scan problem on: November 18, 2012, 10:07:49 am
Hey Dave!

Im having the same problem!!

Im trying to connect the wifi shield to the WPA and it loads the program, and the led indicating error on the shield turns on.

I've been posting a lot about this but no one seems to have the answer.

If you already solve the problem, or have any idea what is all about, please let me know

Thanks!!
11  International / Software / Necesito ayuda urgente (WIFI SHIELD) on: November 18, 2012, 08:07:51 am
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!!


Code:
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();
}
12  Using Arduino / Networking, Protocols, and Devices / Wifi conect to WPA example is not working on: November 18, 2012, 07:49:50 am
Hello!

Im using this example to connect to the WPA wifi network of my home, you can see it below:

I introduced the name, and password, but the Wifi Shield led indicanting ERROR is turned ON. Any ideas??

Thanks for the help, I'm really new at this!

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();
}
13  Using Arduino / Installation & Troubleshooting / New arduino wifi shield on: November 11, 2012, 05:00:24 pm
Hello

Im new at this world of arduino, i recently got the new arduino wifi shield and I really have no idea of these things.

Im trying to setting up de wifi shield to my WPA network. I was getting an error, but is now solved. Im using the example code from arduino.

The thing is, the shield has the led indicanting ERROR on. Why is that happening if the code on the software doesn't says it has an error

thanks for the help!


14  Using Arduino / Installation & Troubleshooting / Re: Wi-Fi Shield Error on: November 11, 2012, 12:19:38 pm
Hello James!


I installed the 1.0.2 Version and now that problem dissapeared.

Now, on the shield, the led indicating an error, is on.
But, in the arduino software, there is no indication of this


Thank you very much!!
15  Using Arduino / Installation & Troubleshooting / Wi-Fi Shield Error on: November 11, 2012, 11:57:21 am
So, I just got the new arduino wifi shield and Im trying to setting it up, but this error keeps coming up.

"WL_IDLE_STATUS was not declared in this scope"

I know it has to do with the username and password of my network, but I dont understand why is not working?

Any help???


Thanks!

Pages: [1] 2