I have the FEZBit, and i want to connect to my Wifi,
but when i run the following code, i get an Exception.
using System.Diagnostics;
using GHIElectronics.TinyCLR.Drivers.Microchip.Winc15x0;
var ssidList = Winc15x0Interface.Scan();
foreach (var ssid in ssidList) Debug.WriteLine(ssid);
On the line for the Scan i get:
An unhandled exception of type 'System.InvalidOperationException' occurred in GHIElectronics.TinyCLR.Drivers.Microchip.Winc15x0.dll
What can i do to get it working?
I believe you need to configure the pins properly
https://docs.ghielectronics.com/software/tinyclr/tutorials/wifi.html
Welcome to the comunity.
Ok, Thanks.
You are right, I found a example code and it is working.
The only strange thing i found in the example is, that the only place where
you can scan is after setting up the network controller. But before enabling it.
O, i see now that you can set up the network controller, then scan, then setup the network controller with the wifi settings.
In the documentation when they setup the network controller they also set up the Wifi Settings for the networkController.
Thanks.
1 Like