Hallo Leute,
ich bin mit meiner Phoniebox (ich würde die stable 2.x nehmen) so weit, dass ich gerne meinen RFID-RC522 anschließen möchte. Leider krieg ich den nicht zum Laufen.
Den RC522 habe ich an einem anderen RPi getestet mit einem sehr einfachen Python-Script, das mir den Inhalt einer Karte ausgibt, und das hat funktioniert. Der Reader geht also.
Alle Kabel umgestöpselt zur Phoniebox. Phoniebox installiert bzw. Installationsscript durchlaufen lassen, neu starten, in die Webapp gegangen, RFID-Dienst gestartet, ich wechsle den Tab, gehe zurück in die Einstellungen - RFID-Dienst wieder offline. Ich hab schon mega viel rumprobiert, aber irgendwie klappt gar nix an der Stelle.
Was mir etwas komisch vorkommt, sind die Python-Fehlermeldungen bei der Installation. Ich füge mal einen Auszug davon ein:
<edit>Anscheinend ist das ein gängiges vorgehen von Pip, dass Pakete nicht gelöscht, sondern nach "~<name>" verschoben werden, siehe https://stackoverflow.com/questions/6888…distribution-ip
-----------------------------------------------------
Register RFID reader
-----------------------------------------------------
If you are using an RFID reader, connect it to your RPi.
(In case your RFID reader required soldering, consult the manual.)
Have you connected your RFID reader? [Y/n]
Please select the RFID reader you want to use
1) USB-Reader (e.g. Neuftech)
2) RC522
3) PN532
4) Manual configuration
5) Multiple RFID reader
#? 2
Please make sure that the RC522 reader is wired up correctly to the GPIO ports before continuing...
Continue (Y/n)?
Use backward-compatible card ID (not suggested for new installations)?
(y/N)
Installing Python requirements for RC522...
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Activating SPI...
Configure RFID reader in Phoniebox...
Restarting phoniebox-rfid-reader service...
Display More
Zuvor hatte ich im Installationsprozess dieselbe Fehlermeldung:
Generating locales (this might take a while)...
en_GB.UTF-8... done
Generation complete.
Cloning into 'RPi-Jukebox-RFID'...
Writing to /root/.config/pip/pip.conf
chmod: changing permissions of '/home/pi/RPi-Jukebox-RFID/settings/version': Operation not permitted
Installing additional Python packages...
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Configuring Samba...
Configuring web server...
already enabled
Run "service lighttpd force-reload" to enable changes
already enabled
Run "service lighttpd force-reload" to enable changes
### Deleting older versions of service daemons. This might throw errors, ignore them
Failed to disable unit: Unit file idle-watchdog.service does not exist.
Failed to disable unit: Unit file rfid-reader.service does not exist.
Failed to disable unit: Unit file phoniebox-startup-sound.service does not exist.
Failed to disable unit: Unit file gpio-buttons.service does not exist.
Failed to disable unit: Unit file phoniebox-rotary-encoder.service does not exist.
Failed to disable unit: Unit file phoniebox-gpio-buttons.service does not exist.
rm: cannot remove '/etc/systemd/system/rfid-reader.service': No such file or directory
rm: cannot remove '/etc/systemd/system/phoniebox-startup-sound.service': No such file or directory
rm: cannot remove '/etc/systemd/system/gpio-buttons.service': No such file or directory
rm: cannot remove '/etc/systemd/system/idle-watchdog.service': No such file or directory
rm: cannot remove '/etc/systemd/system/phoniebox-rotary-encoder.service': No such file or directory
rm: cannot remove '/etc/systemd/system/phoniebox-gpio-buttons.service': No such file or directory
### Done with erasing old daemons. Stop ignoring errors!
Configuring MPD...
Synchronizing state of mpd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mpd
Warning: Stopping mpd.service, but it can still be activated by:
mpd.socket
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Ignoring invalid distribution ~t-dlp (/usr/local/lib/python3.11/dist-packages)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Setting owner and permissions for directories...
amixer: Control default element write error: Operation not permitted
Display More
Ich kann mir den Fehler aber nicht erklären. Alle Pakete sind auf dem neuesten Stand:
# sudo apt update; sudo apt upgrade -y ; sudo apt autoremove
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian-security bookworm-security InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 http://archive.raspberrypi.com/debian bookworm InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Display More
Ich hab Raspbian quasi neu installiert (vorgestern), keine andere Software drauf gebracht außer Vim und ZSH.
<edit2>Die Reader.py ersetzen durch Reader.py.experimental mit Neustart (sudo systemctl start phoniebox-rfid-reader) hat auch nix gebracht. Wurde hier empfohlen, ist aber auch schon lange her: https://github.com/MiczFlor/RPi-J…mment-577316149
<edit3>Ich bin nochmal die offizielle Anleitung durchgegangen: https://github.com/MiczFlor/RPi-J…RC522/README.md
Alle Python-Pakete sind installiert:
# sudo python3 -m pip install -r RPi-Jukebox-RFID/components/rfid-reader/RC522/requirements.txt
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pi-rc522==2.3.0 in /usr/local/lib/python3.11/dist-packages (from -r RPi-Jukebox-RFID/components/rfid-reader/RC522/requirements.txt (line 4)) (2.3.0)
Requirement already satisfied: spidev in /usr/local/lib/python3.11/dist-packages (from pi-rc522==2.3.0->-r RPi-Jukebox-RFID/components/rfid-reader/RC522/requirements.txt (line 4)) (3.6)
Requirement already satisfied: RPi.GPIO in /usr/local/lib/python3.11/dist-packages (from pi-rc522==2.3.0->-r RPi-Jukebox-RFID/components/rfid-reader/RC522/requirements.txt (line 4)) (0.7.1)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Wenn ich die Reader.py durch die Reader.py.experimental ersetze, wie in der Anleitung, kommt ein Fehler:
# python3 RegisterDevice.py
Choose the reader from list
0 vc4-hdmi
1 vc4-hdmi HDMI Jack
2 MFRC522
3 RDM6300
4 PN532
Device Number: 2
Traceback (most recent call last):
File "/home/pi/RPi-Jukebox-RFID/scripts/RegisterDevice.py", line 21, in <module>
dev.close()
^^^^^^^^^
AttributeError: 'NonUsbDevice' object has no attribute 'close'
Display More
Ich hab auch nochmal geschaut, ob python3-evdev installiert ist - war es nicht. Siehe auch https://github.com/MiczFlor/RPi-J…mment-999682636
Also installiert, geht trotzdem nicht. Weder python3 RegisterDevice.py noch sudo systemctl start phoniebox-rfid-reader
Hab sogar die Firmware vom Pi aktualisiert, wie auf https://github.com/MiczFlor/RPi-J…bleshooting-FAQ an einer Stelle empfohlen