cnlohr / esp82xx

Useful ESP8266 C Environment
Other
288 stars 107 forks source link

Custom command Cmd_WiFi "WR" not working on web #23

Closed brainstorm closed 8 years ago

brainstorm commented 8 years ago

Hi @cnlohr,

Sorry to bother you with this, but I was about to write a method to return a wireless scan as an array, and voila, there you have already a case in cmd_WiFi.

But I tried to issue the commands WR1, WR... to no avail, wonder if it really works via the WebGUI?

cnlohr commented 8 years ago

I just changed the way it worked last night so I could free up about 500 bytes of RAM. I tested it and it worked a-okay. Are you not seeing positive behavior from the web GUI?

WS first, wait for comms to come back, then WR

brainstorm commented 8 years ago

Just tried what you mentioned (WS, wait for comms and then WR) and I just get a !WR back :-S

skarmavbild 2016-08-25 kl 07 46 11

cnlohr commented 8 years ago

Aaha! I see a list of APs above there. So, the webpage, itself polls for WR frequently. Whenever you issue a WS, the device disconnects, scans, and keeps a copy of the scan list around. Once reconnected, the webpage pulls that list with "WR." Once received, it erases the list on the ESP and boom. Can't see it anymore.

You might be able to get away with this by closing the "Wifi" tab.

brainstorm commented 8 years ago

Yeah, it was exactly that, now I get that array/list back, thanks! ;)