WiFi_RS21 blocking, even when in separate thread

When doing methods like Scan on Join, the driver seems to be blocking my application. So I put them into a new thread, and it’s still blocking my app.

Is there something I else I can to make them non-blocking?

Snippet:


public void StartWiFi()
        {
            Thread thrd = new Thread(new ThreadStart(wifiStart));
            thrd.Start();
        }

        void wifiStart()
        {            
            current = null;
            var infos = _wifi.Scan();
            foreach (var info in infos)
            {
                if (info.SSID == "myNetwork")
                {
                    current = info;
                }
            }


Thanks

Some methods that call native code just block the managed runtime and there is nothing you can do. You will have the same with PinCapture.Read().

Thanks for the response. I forget about that low level stuff.

Another question about this module -

If i am joined to a network, can I still do a .Scan()? Unless I am doing something incorrectly, Scan returns a NULL when I am joined to my home network.

For example my laptop and cell phone will show other networks that I can change to, even when connected to one. I’d like to show the other networks and their signal strengths, to allow the user to switch to a stronger signal.