Using WiFi.scanNetworks to extract MAC address

I am still an early learner.
ESP32 (CYD ESP-WROOM-DA)
WiFi101 Generic by Arduino

WiFi.scanNetworks has an option WiFi.macAddress

But I can't find a way to even touch it. I've tried sample code using byte, but the (I) gets an error. I tried to move the mac(I) to mac1 (defining mac1 as string, or byte(6), or int), then printed no go.

n = WiFi.scanNetworks();
delay(300); // needed 300 to capture all available
if (n > 0) {
for (int i = 0; i < n; ++i) {
Serial.println (WiFi.SSDI(i)); // works
Serial.println (WiFi.macAddress(i)); // has a fit

invalid conversion from 'int' to 'uint8_t*'
pointing to the (I)

So far on the CYD I have
RSSI SSID missing MAC

I work in a school with many APs on different VLANS.
My plan is to first show the MAC then later convert the MAC to a hard coded location (they don't change often and when they do I changed them so a quick update should be no big deal). When I see several of the same SSDI the location would identify where each of those is coming from with signal level. Useful for quick checking coverage.

If you read the 'How to get the most from the forum' you would know you need to post ALL your code in code tags, any error logs in code tags and a wiring diagram, a photo of a hand drawn is fine.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.