gelöst [GPIO Status in Fhem funktioniert nicht mehr]

Begonnen von maci, 30 März 2020, 11:05:42

Vorheriges Thema - Nächstes Thema

maci

Hallo,

Ich habe mir eine Fhem Installation durch ein Firmware Update des Raspberry zerschossen.
Grund war, dass der Raspberry nach dem Update keinen i2c Bus mehr erkannt hat.

Habe nun auf auf diesem mit einer älteren, gesicherten SD Karte Fhem wieder an laufen bekommen, doch die Stati meiner GPIO Pins werden nicht abgefragt.
Ich bekomme im Log die Meldung
2020.03.30 10:58:15.812 1: Can't open file: Pin10, value
2020.03.30 10:58:15.813 1: Pin10 GetFn: readout of Pinvalue fail


Ich muss vorausschicken, dass wiringpi installiert ist und der user fhem in der GPIO Gruppe ist.

Auch am Raspberry selbst schlägt die Abfrage fehl
sudo echo 10 >/sys/class/gpio/export
echo: Schreibfehler: Das Gerät oder die Ressource ist belegt


Das Verzeichnis ist aber normal vorhanden.
ls -la /sys/class/gpio/
insgesamt 0
drwxrwx---  2 root gpio    0 Mär 30 10:58 .
drwxr-xr-x 56 root root    0 Mär 29 21:21 ..
-rwxrwx---  1 root gpio 4096 Mär 30 10:59 export
lrwxrwxrwx  1 root gpio    0 Mär 29 21:09 gpio1 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio1
lrwxrwxrwx  1 root gpio    0 Mär 30 10:58 gpio10 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio10
lrwxrwxrwx  1 root gpio    0 Mär 29 21:10 gpio11 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio11
lrwxrwxrwx  1 root gpio    0 Mär 29 21:11 gpio12 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio12
lrwxrwxrwx  1 root gpio    0 Mär 29 21:09 gpio16 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio16
lrwxrwxrwx  1 root gpio    0 Mär 29 21:10 gpio17 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio17
lrwxrwxrwx  1 root gpio    0 Mär 29 21:11 gpio21 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio21
lrwxrwxrwx  1 root gpio    0 Mär 29 21:10 gpio22 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio22
lrwxrwxrwx  1 root gpio    0 Mär 29 21:10 gpio23 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio23
lrwxrwxrwx  1 root gpio    0 Mär 29 21:10 gpio24 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio24
lrwxrwxrwx  1 root gpio    0 Mär 29 21:10 gpio25 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio25
lrwxrwxrwx  1 root gpio    0 Mär 29 21:11 gpio26 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio26
lrwxrwxrwx  1 root gpio    0 Mär 29 21:10 gpio27 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio27
lrwxrwxrwx  1 root gpio    0 Mär 29 21:11 gpio4 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio4
lrwxrwxrwx  1 root gpio    0 Mär 29 21:11 gpio6 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio6
lrwxrwxrwx  1 root gpio    0 Mär 29 21:10 gpio7 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio7
lrwxrwxrwx  1 root gpio    0 Mär 29 21:10 gpio8 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio8
lrwxrwxrwx  1 root gpio    0 Mär 29 21:10 gpio9 -> ../../devices/platform/soc/3f200000.gpio/gpiochip0/gpio/gpio9
lrwxrwxrwx  1 root gpio    0 Mär 29 21:09 gpiochip0 -> ../../devices/platform/soc/3f200000.gpio/gpio/gpiochip0
lrwxrwxrwx  1 root gpio    0 Mär 29 21:09 gpiochip100 -> ../../devices/gpiochip2/gpio/gpiochip100
lrwxrwxrwx  1 root gpio    0 Mär 29 21:09 gpiochip504 -> ../../devices/platform/soc/soc:firmware/soc:firmware:expgpio/gpio/gpiochip504


Ich hatte auch schon vermutet, dass irgend ein anderes Gerät auf GPIOs zugreift, doch ich finde nichts.
Es ist ja nicht nur ein Pin sondern alle.

Was kann da sein?

Gruß Georg


Nachtrag: mit wiringpi kann ich ohne Fehler mit den gpios arbeiten
zB:
root@raspberrypi:/home/pi#
root@raspberrypi:/home/pi# gpio export 10 out
root@raspberrypi:/home/pi# gpio -g write 10 1
root@raspberrypi:/home/pi# gpio -g read 10
1
root@raspberrypi:/home/pi#

Fhem auf Dell Thinclient, Fhem auf Raspebrry Pi4,
UniPi Vers. 1.1 mit Raspberry Pi3, 1wire USB Adapter mit OWX
Netatmo Wetterstation + Regenmesser + Netatmo Thermostat
Homematic mit HMLan

Frank_Huber

Welche raspbian und kernel version hast du jetzt drauf?
Und welche war es vorher?

Gesendet von meinem S68Pro mit Tapatalk


maci

Auf dem derzeit laufenden habe ich:
Operating System: Raspbian GNU/Linux 10 (buster)
Kernel: Linux 4.19.66-v7+


Auf dem nicht mehr funktionierenden hatte ich
  Operating System: Raspbian GNU/Linux 10 (buster)
Kernel: Linux 4.19.113-v7+


Hatte hier einfach das Problem, dass er keine i2c und auch andere Erweiterungen geladen hat
lsmod war immer leer
Fhem auf Dell Thinclient, Fhem auf Raspebrry Pi4,
UniPi Vers. 1.1 mit Raspberry Pi3, 1wire USB Adapter mit OWX
Netatmo Wetterstation + Regenmesser + Netatmo Thermostat
Homematic mit HMLan

Frank_Huber

#3
möglich dass der neue Kernel die Ursache ist.

Das Firmware Update über "rpi-update" warnt ja auch vor der Ausführung.
Zitat#############################################################
WARNING: 'rpi-update' updates to pre-releases of the linux
kernel tree and Videocore firmware.

'rpi-update' should only be used if there is a specific
reason to do so - for example, a request by a Raspberry Pi
engineer.

DO NOT use 'rpi-update' as part of a regular update process.

##############################################################

Versuche mal einen Kernel downgrade. 4.19.97-v7l läuft noch inkl I2C bei mir.

--> https://forum-raspberrypi.de/forum/thread/21114-firmware-u-kernel-downgrade-mit-rpi-update/

maci

Also ein Kernel Downgrade ist mir zu havy.
Meine Installation mit dem nicht ganz aktuellem System und dem 66er Kernel läuft wie von geisterhand wieder.

Alle GPIO- Eingänge werden auch aktualisiert.

Somit belasse ich das hier und schließe den Thread als gelöst!

Gruß
Georg
Fhem auf Dell Thinclient, Fhem auf Raspebrry Pi4,
UniPi Vers. 1.1 mit Raspberry Pi3, 1wire USB Adapter mit OWX
Netatmo Wetterstation + Regenmesser + Netatmo Thermostat
Homematic mit HMLan