Wireless Shield is not being detected by arduino, not MAC address is displaying. Not sure what to try next, there is nothing noticeably wrong with the shield at first glance.
Green LED under status is on.
Shield Type: CC3000 WiFi Shield
Board Model: UNO R3
No Mac Address is being detected (my output in Serial Monitor)
Initializing Wifi...
MAC: 0:0:0:0:0:0
Scanning available networks...
** Scan Networks **
number of available networks:0
My Script:
#include <SPI.h>
#include <WiFi.h>
void setup() {
// initialize serial and wait for the port to open:
Serial.begin(9600);
while(!Serial) ;
// attempt to connect using WEP encryption:
Serial.println("Initializing Wifi...");
printMacAddress();
// scan for existing networks:
Serial.println("Scanning available networks...");
listNetworks();
}
void loop() {
delay(10000);
// scan for existing networks:
Serial.println("Scanning available networks...");
listNetworks();
}
void printMacAddress() {
// the MAC address of your Wifi shield
byte mac[6];
// print your MAC address:
WiFi.macAddress(mac);
Serial.print("MAC: ");
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 listNetworks() {
// scan for nearby networks:
Serial.println("** Scan Networks **");
byte numSsid = WiFi.scanNetworks();
// print the list of networks seen:
Serial.print("number of available networks:");
Serial.println(numSsid);
// print the network number and name for each network found:
for (int thisNet = 0; thisNet<numSsid; thisNet++) {
Serial.print(thisNet);
Serial.print(") ");
Serial.print(WiFi.SSID(thisNet));
Serial.print("\tSignal: ");
Serial.print(WiFi.RSSI(thisNet));
Serial.print(" dBm");
Serial.print("\tEncryption: ");
Serial.println(WiFi.encryptionType(thisNet));
}
}
-
Try using a library for the CC3000 instead of the one for the Arduino Wifi (W5100) board. You may have a little bit more luck.Majenko– Majenko2017年08月19日 18:38:16 +00:00Commented Aug 19, 2017 at 18:38
-
Which wifi shield are you using?sempaiscuba– sempaiscuba2017年08月19日 18:39:44 +00:00Commented Aug 19, 2017 at 18:39
1 Answer 1
Your problem:
- You have a CC3000 WiFi shield
- You are using the WiFi library for the Arduino WiFi Shield
- The Arduino WiFi Shield is a HDG204 based shield, not CC3000
Get the right library for your shield, install it, and try the examples and tutorials that come with it.
-
Using CC3000 Libraries seem to work. ThanksThe Tokenizer– The Tokenizer2017年08月19日 20:38:34 +00:00Commented Aug 19, 2017 at 20:38
Explore related questions
See similar questions with these tags.