GpioController.QueryComponentInformation() throws NotSupportedException with RaspberryPi3Driver
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- csharp, raspberry-pi
- Domain
- embedded-iot
Research direction
Start with RaspberryPi3Driver.cs at QueryComponentInformation and compare it with RaspberryPi3LinuxDriver.cs and the base GpioDriver.GetChipInfo implementation. Reproduce the controller call on the Raspberry Pi 3, then verify QueryComponentInformation no longer throws NotSupportedException and returns component information.
Written by the indexing model from the issue text.
Description
Describe the bug
On a Raspberry Pi 3, GpioController.QueryComponentInformation() throws NotSupportedException with the default driver.
RaspberryPi3Driver.QueryComponentInformation calls _internalDriver.GetChipInfo(), but RaspberryPi3LinuxDriver does not override GetChipInfo, so the base implementation in GpioDriver throws.
Steps to reproduce
using System.Device.Gpio;
using GpioController controller = new();
Console.WriteLine(controller.QueryComponentInformation());
Expected behavior
The component information of the controller and its drivers.
Actual behavior
Unhandled exception. System.NotSupportedException: Specified method is not supported.
at System.Device.Gpio.GpioDriver.GetChipInfo()
at System.Device.Gpio.Drivers.RaspberryPi3Driver.QueryComponentInformation()
at System.Device.Gpio.GpioController.QueryComponentInformation()
The same happens with System.Device.Gpio 4.2.0 and with main (95384e7).
Versions used
- Hardware: Raspberry Pi 3 Model B Plus Rev 1.3
- OS: Debian GNU/Linux 13 (trixie), 64-bit, kernel 6.18.50+rpt-rpi-v8
dotnet --infoon the Raspberry Pi: .NET SDK 10.0.401, runtime 10.0.12, RIDlinux-arm64- Built on Windows with .NET SDK 10.0.401 (
dotnet publish -r linux-arm64 --self-contained false) System.Device.Gpio4.2.0, andmainat 95384e7 (4.3.0-dev)
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 630
- Avg merge
- 6d 19h
- Merged PRs (30d)
- 11
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/iot
-
LibGpiodV2EventObserver never disposes edge events: one finalizable SafeHandle per edge causes multi-ms gen0 GC pausesPossibly taken @krwq claimed this 5 days ago. Openuntriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
dotnet/iot#2626 · 1 comment · 1 reaction · 2 assignees ·
Maintainers usually reply within 1 day
-
api-suggestion untriaged
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dotnet/iot#2620 · 3 comments ·
Maintainers usually reply within 1 day
-
untriaged
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
untriaged
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
untriaged
Difficulty 3/5 1-2 days Newbie friendliness 76/100
dotnet/iot#2614 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
enhancement no-stack-trace
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
greenshot/greenshot#1618 · 3 comments ·
Maintainers usually reply within 1 day
-
squad/utforming status/triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Altinn/altinn-studio#21565 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Tyrrrz/YoutubeDownloader#912 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day