A application that has been working without errors is now showing the following exception.
Using GHI .NET Micro Framework 4.2
Partial code that I have added a Try, Catch to code that was working OK…
private void StartServer()
{
display_T35.SimpleGraphics.Clear();
display_T35.SimpleGraphics.DisplayText("Trying to connect to WiFi. Wait..", NBFont, Colors.Red, 3, 5);
if (!wifi_RS21.Interface.IsOpen)
{
wifi_RS21.Interface.Open();
try
{
NetworkInterfaceExtension.AssignNetworkingStackTo(wifi_RS21.Interface);
}
catch (GHI.Premium.Net.NetworkInterfaceExtensionException bummer)
{
Debug.Print(bummer.errorCode.ToString());
//errorCode 0x00000002 GHI.Premium.Net.NetworkInterfaceExtensionException.ErrorCode {int}
}
}
/*
RS9110 driver version Number is 4.4.5
#### Exception GHI.Premium.Net.NetworkInterfaceExtensionException - 0x00000000 (1) ####
#### Message:
#### GHI.Premium.Net.NetworkInterfaceExtension::Activate [IP: 001a] ####
#### ServerSpider.Program::StartServer [IP: 004c] ####
#### ServerSpider.Program::Startbutton_ButtonPressed [IP: 001e] ####
#### Gadgeteer.Modules.GHIElectronics.Button::OnButtonEvent [IP: 0058] ####
#### Gadgeteer.Modules.GHIElectronics.Button::_input_Interrupt [IP: 0068] ####
#### Gadgeteer.Interfaces.InterruptInput::OnInterruptEvent [IP: 0055] ####
#### System.Reflection.MethodBase::Invoke [IP: 0000] ####
#### Gadgeteer.Program::DoOperation [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
#### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
#### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
#### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type ‘GHI.Premium.Net.NetworkInterfaceExtensionException’ occurred in GHI.Premium.Net.dll
Error invoking method “Gadgeteer.Interfaces.InterruptInput” (check arguments to Program.BeginInvoke are correct)
*/
Any idea what the ‘errorCode 0x00000002’ is and what causes the exception?