YUN won't connect WiFi within a sketch

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);
}

Actually... I think I've figured this out... I'm using a YUN, not a Yun shield... I'm guessing with the WiFi attached to the Linux, I need to access WiFi via the bridge to move data back and forth?

Any examples of this?

(I found this - which is helpful... https://www.arduino.cc/en/Tutorial/Bridge)

What kind of data are you looking to move back and forth?
Grab elements from a website? Enter/query data in a database? Read email? etc

Just the basics. Control the 32U4 via WiFi.

I got the basic bridge example to work: