Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRF24 gateway depends on the deprecated GPIO Linux interface #1536

Open
aledomu opened this issue Dec 5, 2022 · 3 comments
Open

NRF24 gateway depends on the deprecated GPIO Linux interface #1536

aledomu opened this issue Dec 5, 2022 · 3 comments

Comments

@aledomu
Copy link

aledomu commented Dec 5, 2022

The gateway opens /sys/class/gpio when accessing GPIO ports. In distros where they follow upstream standards this makes the app unable to work. This interface was deprecated in Linux 4.8.

@mfalkvidd
Copy link
Member

mfalkvidd commented Dec 5, 2022

@aledomu thanks for reporting. Do you happen to know what the recommended replacement is?

@mfalkvidd
Copy link
Member

Looks like the spi_gpio kernel driver might be the way to go:

  • spi_gpio: drivers/spi/spi-gpio.c is used to drive an SPI bus (variable number
    of wires, at least SCK and optionally MISO, MOSI and chip select lines) using
    GPIO hammering (bitbang). It will appear as any other SPI bus on the system
    and makes it possible to connect drivers for SPI devices on the bus like
    any other SPI bus driver. For example any MMC/SD card can then be connected
    to this SPI by using the mmc_spi host from the MMC/SD card subsystem.

But I have no idea if this driver is available (and usable with normal user privileges) by default, nor how much work would be required to rewrite the MySensors code to use this driver.

@aledomu
Copy link
Author

aledomu commented Dec 8, 2022

The current recommended interface is exposed through /dev/gpiochip* character nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants