Exception "initialization error no gpio controllers exist on this system."
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 630
- Avg merge
- 11d 3h
- Merged PRs (30d)
- 2
Description
**Describe the bug**
Hello
I would like to use a GPIO port present on the Kbox A 250 hardware from Kontron but when initializing the class, I got the error "initialization error no gpio controllers exist on this system."
However, the hardware is recognized in the device manager.

**Steps to reproduce**
// put sample code here
`var gpio = new GpioController();`
// put sample code here
```
try
{
gpioCtrl = new GpioController();
gpioCtrl.OpenPin(DEFAUT_TENSION_PIN, PinMode.Input);
ajoutEvent("Initialisation ok");
try
{
gpioCtrl.RegisterCallbackForPinValueChangedEvent(DEFAUT_TENSION_PIN, PinEventTypes.Falling | PinEventTypes.Rising, new PinChangeEventHandler(this.OnInputPinValueChanged)); //Exception thrown
ajoutEvent("abonnement à l'évènement réussis");
}
catch (Exception e)
{
ajoutEvent("Erreur d'abonnement à l'évènement");
ajoutEvent(e.Message);
}
}
catch (Exception e)
{
ajoutEvent("Initialisation erreur");
ajoutEvent(e.Message);
}
```
Expected behavior
I expect such an object to be created.
Actual behavior
I get a System.NotSupportedException with the message "No GPIO controllers exist on this system"
**Versions used**
`dotnet --info` on the machine being used to build
> SDK .NET (reflétant tous les fichiers global.json) :
> Version: 5.0.409
> Commit: 1d66d4ce92
>
> Environnement d'exécution :
> OS Name: Windows
> OS Version: 10.0.19043
> OS Platform: Windows
> RID: win10-x64
> Base Path: C:\Program Files\dotnet\sdk\5.0.409\
>
> Host (useful for support):
> Version: 6.0.6
> Commit: 7cca709db2
>
> .NET SDKs installed:
> 3.1.416 [C:\Program Files\dotnet\sdk]
> 5.0.210 [C:\Program Files\dotnet\sdk]
> 5.0.409 [C:\Program Files\dotnet\sdk]
>
> .NET runtimes installed:
> Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
> Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
> Microsoft.AspNetCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
> Microsoft.AspNetCore.App 3.1.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
> Microsoft.AspNetCore.App 5.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
> Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
> Microsoft.AspNetCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
> Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
> Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
> Microsoft.NETCore.App 3.1.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
> Microsoft.NETCore.App 5.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
> Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
> Microsoft.NETCore.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
> Microsoft.NETCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
> Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
> Microsoft.WindowsDesktop.App 3.1.26 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
> Microsoft.WindowsDesktop.App 5.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
> Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
> Microsoft.WindowsDesktop.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
>
>
> To install additional .NET runtimes or SDKs:
> https://aka.ms/dotnet-download
- `dotnet --info` on the machine where app is being run (not applicable for self-contained apps)
> .NET SDK (reflecting any global.json):
> Version: 6.0.301
> Commit: 43f9b18481
>
> Runtime Environment:
> OS Name: Windows
> OS Version: 10.0.17763
> OS Platform: Windows
> RID: win10-x64
> Base Path: C:\Program Files\dotnet\sdk\6.0.301\
>
> Host (useful for support):
> Version: 6.0.6
> Commit: 7cca709db2
>
> .NET SDKs installed:
> 6.0.301 [C:\Program Files\dotnet\sdk]
>
> .NET runtimes installed:
> Microsoft.AspNetCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
> Microsoft.NETCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
> Microsoft.WindowsDesktop.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
>
> To install additional .NET runtimes or SDKs:
> https://aka.ms/dotnet-download
- Version of `System.Device.Gpio` package
2.1.0
-->
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.