Thanks for the reply. I just posted the minimum I deemed necessary because I didn't want to waste anybody's time. Sorry if that was misguided. I can certainly post more! Thanks!
I'm working with an ESP32 and am using their libraries to work with WiFi. Specifically, for the current project, I make use of the function "scanNetworks" on line 57 of arduino-esp32/WiFiScan.cpp at master · espressif/arduino-esp32 · GitHub. This function take a lot of time to execute. However, on line 70-72 you'll see some config options which act as a filter which can really speed things up. I can set the ssid as well as the channel. I would also like to set the bssid and can't. This config-object is described at http://esp32.info/docs/esp_idf/html/dd/dee/structwifi__scan__config__t.html - you can see that bssid is a uint8_t *.
In the end, what I want to do is receive certain parameters as a json object from some server and set those filters accordingly, so only what's required is scanned. I'll probably have to create my own version of this library because there's currently no way to set the config object with an external call.
However, right now I'm still testing things and creating proofs of concepts. Specifically, I need to find out if setting the BSSID really speeds up things and by how much. It seems to me that hard coding this would be easiest for now. This requires me to do two things:
- I need to be able to get a bssid so I know what to look for. Here's the code I'm using for this:
count = WiFi.scanNetworks();
for (uint8_t i=0; i<count; i++) {
String ssid;
uint8_t encryptionType;
int32_t RSSI;
uint8_t *BSSID;
int32_t channel;
WiFi.getNetworkInfo(i, ssid, encryptionType, RSSI, BSSID, channel);
Serial.print("ssid: ");
Serial.print(ssid);
Serial.print("That's where I'd like to display the BSSID in some way that's reusable... if possible.");
}
- I'd have to be able to assign it to the config object of WiFiScan.cpp.
All of this said - I could maybe implement my own scanNetworks()-function that receives the BSSID from the above code which would mean I wouldn't have to "copy and paste" it. I just thought there would have to be a way to easily work with uint8_t, being that it seems to be a very basic type. And if there is, I figured it might already take me a long ways toward my ultimate goal (if everything else works) of defining this remotely through json. At least that's my thinking. Of course I'm open to other options.
Thanks!