I'm trying to make in C # to allow the data traffic of the Cellular device (wwan) when the user clicks disable or when the windows starts letting it as "disabled" (in case a problem) , however I can only enable / disable the device.(hardware) The problem is that when enabling the device, it will not necessarily connect if the user click "disable" the cell phone as shown in the image below.
Tried with, WMI Win32_NetworkAdapter
And also with the new class MSFT_NetAdapter
But on both I can only enable / disable the device. So if the customer accidentally clicked turned off, it doesn't automatically reconnect.
Figure 1 Has the enabled device but the cellular option is disabled
Figure 2 What I want is enable and disable the cellular option like picture above.
NOTE: I am in .net framework 4.8 because I am doing a service for Windows.
NOTE¹: I tried to use the Xamarin library which I know has the capacity for this, but without success.
Resume:
How to enable cell phone traffic if the user has disabled it?
Tag: C #, C # Console
Microsoft has made a description on how to connect a mobile connection:
https://learn.microsoft.com/en-us/windows/iot-core/connect-your-device/mbb
and also released the code on github
https://github.com/ms-iot/iot-utilities/tree/master/MBBConnect
At least they invoke
netsh mbn connect interface=Mobilfunk connmode=name name=GUID
to connect the interfaceTo check state (enabled/disabled):
to enable: