Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Find replacement for unsupported WiringPi library #492

Closed
zehnm opened this issue Jul 11, 2020 · 2 comments
Closed

Find replacement for unsupported WiringPi library #492

zehnm opened this issue Jul 11, 2020 · 2 comments
Labels
enhancement New feature or request low priority

Comments

@zehnm
Copy link
Member

zehnm commented Jul 11, 2020

Expected Behavior or Design

All 3rd party libraries are maintained and if possible supported by Buildroot.

Current Behavior or Design

GPIO access and i2c communication are handled with the WiringPi library.
This library has been deprecated in August 2019 and is no longer maintained: http://wiringpi.com/wiringpi-deprecated/
Furthermore it has been removed in the latest Builroot version 2020.05.

Possible Solution

  • Keep WiringPi.
    It still works great at the moment and the source code is available.
    However, we have to manually include it as custom package in new Buildroot versions. It may also break in future Kernel or RPi firmware releases.
  • Look around for an alternative GPIO / i2c library.
    I'm not aware of a successor library though.
  • Use the new native Linux gpio/spio/i2c/… support for the BCM platform.
    • libgpiod might be the new standard way of interacting with GPIO devices.
    • SMBus seems to be the preferred way of communicating with i2c devices in Linux

Detailed Description and Additional Information

From libgpiod: Since linux 4.8 the GPIO sysfs interface is deprecated. User space should use the character device instead.

Personally, I'd prefer to go the standard Linux Kernel route.
If you have any suggestions, please comment.

@zehnm zehnm added enhancement New feature or request low priority labels Jul 11, 2020
@zehnm zehnm added this to Backlog in YIO Remote software via automation Jul 11, 2020
@zehnm
Copy link
Member Author

zehnm commented Aug 10, 2020

After testing direct SMBus communication and digging around the WiringPi library, the effort wouldn't be too big replacing WiringPi. However, WiringPi already uses SMBus for i2c! Therefore I don't see an urgent need replacing WiringPi, as long as we can still easily use it in Buildroot.
I still need to look into libgpiod though.

zehnm added a commit to YIO-Remote/remote-os that referenced this issue Aug 26, 2020
@zehnm
Copy link
Member Author

zehnm commented Apr 11, 2021

Small update: in remote-os we are now using a custom Buildroot package for a forked WirkingPi repo, since the original repository is no longer online and official Buildroot support has been removed.

YIO Remote software automation moved this from Backlog to Done Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request low priority
Projects
No open projects
Development

No branches or pull requests

2 participants