General USB-Reader support (No need for HID) #2160
Replies: 4 comments 3 replies
-
Hi, thanks for sharing your additions! 🎉 Of course we are always interested in improvements and using more readers. I suggest you have a look at the documentation for the new Phoniebox version 3.x (branch Start here: https://github.com/MiczFlor/RPi-Jukebox-RFID/tree/future3/develop/documentation Readers are described here (including a template for new readers): https://github.com/MiczFlor/RPi-Jukebox-RFID/tree/future3/develop/documentation/developers/rfid Developer info is here: https://github.com/MiczFlor/RPi-Jukebox-RFID/tree/future3/develop/documentation/developers You can also meet us in the chat: https://matrix.to/#/#phoniebox_community:matrix.org |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply. I'm on a rock64 and diet-pi distribution. I could not get v3 to run, partly because of the CPU check, so that would have been the third changed variable. Since this is supposed to be a Christmas present for my daughter I stuck with the release version for now. Glad to hear there is interest in the reader module I wrote. Hopefully I will have some time around the holidays to port it to v3. |
Beta Was this translation helpful? Give feedback.
-
If you don't mind me asking.. Why have you chosen a Rock64 and diet-pi alongside it? The hardware seems to be pretty strong for the Jukebox. |
Beta Was this translation helpful? Give feedback.
-
Reference: implemented in #2190 |
Beta Was this translation helpful? Give feedback.
-
Hi I just implemented a PoC for a
Reader.py
for generic USB NFC readers, no need for them to have a keyboard HID driver.It's based on nfcpy and my initial tests are successful. Possibly it could be compatible with the HID driver readers, but I cannot test it.
It uses libusb, which is a user space USB driver. Because of that additional work is required to get it running: a udev rule to make it available to non-root users and a modprobe.conf to blacklist the regular kernel drivers from loading.
Both of those things depend on the actual device. The udev rule requires the vender and product ID of the reader, while the blacklist entry requires knowlege which module is corresponding to the device.
I'm curious if the community is interested in this, and if I should create a pull request? The two required config files would make it difficult to create an automatic install script. Except we crowd-source compatible readers and maintain a list.
Here are my changes, other than those files I used a regular v2.4 installation.
Edit: I forgot, I installed 3 additional python packages:
sudo apt install python3-pyserial
sudo apt install python3-libusb1
sudo python -m pip install nfcpy
/etc/udev/rules.d/50-usb-nfc-rule.rules
:/etc/modprobe.d/disable_pn533_usb.conf
:/home/pi/RPi-Jukebox-RFID/scripts/Reader.py
:Beta Was this translation helpful? Give feedback.
All reactions