I'm having problems with the WiFi shield (which I'm running on top of a Mega 2560). Everything runs flawlessly in my home network, but the shield fails to connect to the office network: The red error LED lights up and the call to WiFi.begin() does not return WL_CONNECTED.
I've ruled out the following issues as causes of the problem:
- Bad reception. WiFi.scanNetworks() and WiFi.SSID() show the network as being available. The signal strength returned by WiFi.RSSI() is better than in my home network (so is the number of bars shown by my laptop).
- Wrong SSID/password. I've checked and re-checked multiple times. Then I copy-pasted the credentials from my laptop's working configuration. Still no luck.
- Something being wrong with the network. The network is being used without issue by other people every day.
- The problem being a fluke. I tried multiple times on different days. Same result.
Since I've last tried, I upgraded both firmwares on the shield to the newest versions (from wifishield/firmware/binary at master · arduino/wifishield · GitHub).
I'll have another chance to try the shield in this network some time later this week. My question now is, in case upgrading the firmware won't solve the problem, how can I troubleshoot this?
Beyond the return value returned by WiFi.begin(), I'm not aware of any additional information being available that could help me track down this problem. Is it possible to somehow get a detailed error message or some other info that might help pinpoint this problem? Any advice is greatly appreciated.