I'm just starting with the Yun board, trying to master the basics of the WiFi radio, and connecting to an AP.
WiFi works - I can connect to the webpanel via HTTP, get a shell, run the pretty wifi command (see image) and so on - it's connecting to the AP.
But when I try to connect with a basic sketch, with no encryption/password, it won't find any networks, and won't connect to the AP.
What am I missing?
MAC: 0:0:0:0:0:0
** Scan Networks **
number of available networks:0
Scanning available networks...
MAC: 0:0:0:0:0:0
** Scan Networks **
number of available networks:0
Scanning available networks...
MAC: 0:0:0:0:0:0
** Scan Networks **
number of available networks:0
Scanning available networks...
MAC: 0:0:0:0:0:0
** Scan Networks **
#include <Arduino.h>
#include <SPI.h>
#include <WiFi.h>
char ssid[] = "Taylor2";
int status = 0;
void setup() {
//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
}
status = WiFi.begin(ssid);
// Print WiFi MAC address:
printMacAddress();
}
void loop() {
// scan for existing networks:
Serial.println("Scanning available networks...");
printMacAddress();
listNetworks();
delay(10000);
}
