ATWINC1500 Wifi Breakout board won't connect to the webpage

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
sarahbellum
 
Posts: 24
Joined: Mon Oct 03, 2016 1:56 pm

ATWINC1500 Wifi Breakout board won't connect to the webpage

Post by sarahbellum »

I am working on the ATWINC1500 wifi breakout board tutorial and am trying it to connect to the server then read a webpage. But on the serial monitor all I get is "Attempting to connect to SSID: network name". How can I get it to work?

User avatar
adafruit_support_jarek
 
Posts: 324
Joined: Tue Nov 08, 2016 11:48 am

Re: ATWINC1500 Wifi Breakout board won't connect to the webp

Post by adafruit_support_jarek »

Hi there! Can you please copy and paste your entire code sketch into a reply and attach a picture of your hardware setup?

User avatar
sarahbellum
 
Posts: 24
Joined: Mon Oct 03, 2016 1:56 pm

Re: ATWINC1500 Wifi Breakout board won't connect to the webp

Post by sarahbellum »

Here is the code (without the network name and password):

Code: Select all

#include <SPI.h>
#include <WiFi101.h>

char ssid[] = "network name"; //  your network SSID (name)
char pass[] = "network password";    // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0;            // your network key Index number (needed only for WEP)

int status = WL_IDLE_STATUS;
// if you don't want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
//IPAddress server(74,125,232,128);  // numeric IP for Google (no DNS)
char server[] = "www.google.com";    // name address for Google (using DNS)

// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
WiFiClient client;

void setup() {
  //Configure pins for Adafruit ATWINC1500 Feather
  WiFi.setPins(8,7,4);
  
  //Initialize serial and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port 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);
  }
  Serial.println("Connected to wifi");
  printWifiStatus();

  Serial.println("\nStarting connection to server...");
  // if you get a connection, report back via serial:
  if (client.connect(server, 80)) {
    Serial.println("connected to server");
    // Make a HTTP request:
    client.println("GET /search?q=arduino HTTP/1.1");
    client.println("Host: http://www.google.com");
    client.println("Connection: close");
    client.println();
  }
}

void loop() {
  // if there are incoming bytes available
  // from the server, read them and print them:
  while (client.available()) {
    char c = client.read();
    Serial.write(c);
  }

  // if the server's disconnected, stop the client:
  if (!client.connected()) {
    Serial.println();
    Serial.println("disconnecting from server.");
    client.stop();

    // do nothing forevermore:
    while (true);
  }
}


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");
}
Last edited by Franklin97355 on Sat Nov 19, 2016 2:36 pm, edited 1 time in total.
Reason: Please use [code] tags when posting code to the forums.

User avatar
sarahbellum
 
Posts: 24
Joined: Mon Oct 03, 2016 1:56 pm

Re: ATWINC1500 Wifi Breakout board won't connect to the webp

Post by sarahbellum »

Here is a photo of my hardware for the wifi chip. Thanks!
Attachments
hardware wifi chip.JPG
hardware wifi chip.JPG (1009.11 KiB) Viewed 885 times

User avatar
adafruit_support_jarek
 
Posts: 324
Joined: Tue Nov 08, 2016 11:48 am

Re: ATWINC1500 Wifi Breakout board won't connect to the webp

Post by adafruit_support_jarek »

Hmmm, it seems the program detects the Breakout Board, but can't connect to your hotspot... Can you please load and run the ScanNetworks Example sketch from the WiFi/101 library, and copy paste the output from the Serial Monitor here?

User avatar
sarahbellum
 
Posts: 24
Joined: Mon Oct 03, 2016 1:56 pm

Re: ATWINC1500 Wifi Breakout board won't connect to the webp

Post by sarahbellum »

Here is a screen shot of the Scan Networks serial moniter
Attachments
Scan Networks serial moniter
Scan Networks serial moniter
Screen Shot 2016-11-15 at 3.37.56 PM.png (51.87 KiB) Viewed 853 times

User avatar
adafruit_support_jarek
 
Posts: 324
Joined: Tue Nov 08, 2016 11:48 am

Re: ATWINC1500 Wifi Breakout board won't connect to the webp

Post by adafruit_support_jarek »

Cool! So the breakout board works; is the hotspot you are trying to connect to in that list?

User avatar
sarahbellum
 
Posts: 24
Joined: Mon Oct 03, 2016 1:56 pm

Re: ATWINC1500 Wifi Breakout board won't connect to the webp

Post by sarahbellum »

I think that it is recognizing all the networks but yes, it is not connecting to any of the hotspots.

User avatar
adafruit_support_jarek
 
Posts: 324
Joined: Tue Nov 08, 2016 11:48 am

Re: ATWINC1500 Wifi Breakout board won't connect to the webp

Post by adafruit_support_jarek »

Am I correct in thinking that this is some sort of enterprise/corporate/school network? These networks usually have more stringent security settings than normal home WiFi hotspots.

Would it be possible to ask the IT staff or Network team on your site for instructions on how the ESP8266 can connect to their hotspots using only the SSID and Passphrase for the network?

User avatar
akmishra_99
 
Posts: 79
Joined: Thu Nov 27, 2014 8:59 pm

Re: ATWINC1500 Wifi Breakout board won't connect to the webp

Post by akmishra_99 »

Hello,

I have ATWINC1500 Wifi module, I want to use it as AP ( access point) as well connect to wifi network as client simultaneously ,right now it hangs when I do this,is it possible to do so...?


-Thanks
Alok (akmishra_99)

User avatar
akmishra_99
 
Posts: 79
Joined: Thu Nov 27, 2014 8:59 pm

Re: ATWINC1500 Wifi Breakout board won't connect to the webp

Post by akmishra_99 »

I have atwinc1500 wifi breakout board schematics, I have question on resistor array pack R8 ,where can I order it,what is manufacture's part number,it's value is 1K Ohms and it is connected to 3 LEDs

-Thanks
-Alok

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”