dotnet / dotnet/iot

Better error message when (attempting to use) LibGpiodDriver

Open
#1,469 4 comments 0 reactions 0 assignees View on GitHub
documentation enhancement good first issue Priority:2 up-for-grabs
Dominant language
C#
Stars
2.4k
Forks
630
Avg merge
11d 3h
Merged PRs (30d)
2

Description

I was using `LibGpiodDriver` as part of #1467. I ran into two problems.

I installed `gpiod` instead of `libgpiod-dev`. I saw this error:

```console
pi@raspberrypineapple:~/iot/samples/led-blink $ ./bin/Debug/net5.0/led-blink
Unhandled exception. System.PlatformNotSupportedException: Libgpiod driver not installed. More information on: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/
at System.Device.Gpio.Drivers.LibGpiodDriver..ctor(Int32 gpioChip) in /home/pi/iot/src/System.Device.Gpio/System/Device/Gpio/Drivers/LibGpiodDriver.cs:line 83
at $.$(String[] args) in /home/pi/iot/samples/led-blink/Program.cs:line 13
Aborted
```

I was then told to install `libgpiod-dev`. That worked.

We should do two things:

- Enable using `gpiod`.
- Provide a better error message if the underlying binary is missing (or the system is misconfigured). I'd suggest pointing to a README in this repo. I read the [referenced doc](https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/). It wasn't useful for me to resolve my issue.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.