Closed bgraeb closed 2 years ago
It looks like you are trying to use a barcode scanner. Currently this is not supported by Phoniebox, but there’s a discussion #562. Please have a look there.
Phoniebox supports different RFID Card readers, see https://github.com/MiczFlor/RPi-Jukebox-RFID#rfid-reader-and-cards--fobs - RFID Reader and cards / fobs
it actually is a RFID-Scanner that used to work for 2+ Years with this project but stopped some months ago. I dont know, why it shows "barcode scanner".
When I connect the device to my fedora workstation, I see the RFID-Tags IDs in terminal. So the device seems to work as expected.
Which rfid reader are you using? Do you use PN532? Then please have a look at https://github.com/MiczFlor/RPi-Jukebox-RFID/tree/develop/components/rfid-reader/PN532
Additionally this thread (although not directly your problem) suggests that I2C may not be enabled.
I have the exact same issue (see below) with the USB RFID reade: 3 Sycreader RFID Technology Co., Ltd SYC ID&IC USB Reader
it's the reader that's linked from the README file.
After reboot, also the webserver does not work
# INSTALLATION FINISHED
#
#####################################################
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) 4) Manual configuration
2) RC522 5) Multiple RFID reader
3) PN532
#? 1
Choose the reader from list
0 Chicony USB Keyboard Consumer Control
1 Chicony USB Keyboard System Control
2 Chicony USB Keyboard
3 Sycreader RFID Technology Co., Ltd SYC ID&IC USB Reader
4 Logitech USB Mouse
Device Number: 3
Exception ignored in: <function InputDevice.__del__ at 0x76190978>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/evdev/device.py", line 160, in __del__
File "/usr/local/lib/python3.7/dist-packages/evdev/device.py", line 305, in close
File "/usr/local/lib/python3.7/dist-packages/evdev/eventio_async.py", line 55, in close
File "/usr/lib/python3.7/asyncio/events.py", line 640, in get_event_loop
File "/usr/lib/python3.7/asyncio/events.py", line 660, in new_event_loop
File "/usr/lib/python3.7/asyncio/unix_events.py", line 51, in __init__
File "/usr/lib/python3.7/asyncio/selector_events.py", line 49, in __init__
File "/usr/lib/python3.7/asyncio/base_events.py", line 373, in __init__
File "/usr/lib/python3.7/asyncio/coroutines.py", line 28, in _is_debug_mode
AttributeError: 'NoneType' object has no attribute 'dev_mode'
Exception ignored in: <function BaseEventLoop.__del__ at 0x761edfa8>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/base_events.py", line 622, in __del__
File "/usr/lib/python3.7/asyncio/base_events.py", line 390, in __repr__
File "/usr/lib/python3.7/asyncio/base_events.py", line 1794, in get_debug
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_debug'
Exception ignored in: <function InputDevice.__del__ at 0x76190978>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/evdev/device.py", line 160, in __del__
File "/usr/local/lib/python3.7/dist-packages/evdev/device.py", line 305, in close
File "/usr/local/lib/python3.7/dist-packages/evdev/eventio_async.py", line 55, in close
File "/usr/lib/python3.7/asyncio/events.py", line 640, in get_event_loop
File "/usr/lib/python3.7/asyncio/events.py", line 660, in new_event_loop
File "/usr/lib/python3.7/asyncio/unix_events.py", line 51, in __init__
File "/usr/lib/python3.7/asyncio/selector_events.py", line 49, in __init__
File "/usr/lib/python3.7/asyncio/base_events.py", line 373, in __init__
File "/usr/lib/python3.7/asyncio/coroutines.py", line 28, in _is_debug_mode
AttributeError: 'NoneType' object has no attribute 'dev_mode'
Exception ignored in: <function BaseEventLoop.__del__ at 0x761edfa8>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/base_events.py", line 622, in __del__
File "/usr/lib/python3.7/asyncio/base_events.py", line 390, in __repr__
File "/usr/lib/python3.7/asyncio/base_events.py", line 1794, in get_debug
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_debug'
Exception ignored in: <function InputDevice.__del__ at 0x76190978>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/evdev/device.py", line 160, in __del__
File "/usr/local/lib/python3.7/dist-packages/evdev/device.py", line 305, in close
File "/usr/local/lib/python3.7/dist-packages/evdev/eventio_async.py", line 55, in close
File "/usr/lib/python3.7/asyncio/events.py", line 640, in get_event_loop
File "/usr/lib/python3.7/asyncio/events.py", line 660, in new_event_loop
File "/usr/lib/python3.7/asyncio/unix_events.py", line 51, in __init__
File "/usr/lib/python3.7/asyncio/selector_events.py", line 49, in __init__
File "/usr/lib/python3.7/asyncio/base_events.py", line 373, in __init__
File "/usr/lib/python3.7/asyncio/coroutines.py", line 28, in _is_debug_mode
AttributeError: 'NoneType' object has no attribute 'dev_mode'
Exception ignored in: <function BaseEventLoop.__del__ at 0x761edfa8>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/base_events.py", line 622, in __del__
File "/usr/lib/python3.7/asyncio/base_events.py", line 390, in __repr__
File "/usr/lib/python3.7/asyncio/base_events.py", line 1794, in get_debug
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_debug'
Exception ignored in: <function InputDevice.__del__ at 0x76190978>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/evdev/device.py", line 160, in __del__
File "/usr/local/lib/python3.7/dist-packages/evdev/device.py", line 305, in close
File "/usr/local/lib/python3.7/dist-packages/evdev/eventio_async.py", line 55, in close
File "/usr/lib/python3.7/asyncio/events.py", line 640, in get_event_loop
File "/usr/lib/python3.7/asyncio/events.py", line 660, in new_event_loop
File "/usr/lib/python3.7/asyncio/unix_events.py", line 51, in __init__
File "/usr/lib/python3.7/asyncio/selector_events.py", line 49, in __init__
File "/usr/lib/python3.7/asyncio/base_events.py", line 373, in __init__
File "/usr/lib/python3.7/asyncio/coroutines.py", line 28, in _is_debug_mode
AttributeError: 'NoneType' object has no attribute 'dev_mode'
Exception ignored in: <function BaseEventLoop.__del__ at 0x761edfa8>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/base_events.py", line 622, in __del__
File "/usr/lib/python3.7/asyncio/base_events.py", line 390, in __repr__
File "/usr/lib/python3.7/asyncio/base_events.py", line 1794, in get_debug
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_debug'
Exception ignored in: <function InputDevice.__del__ at 0x76190978>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/evdev/device.py", line 160, in __del__
File "/usr/local/lib/python3.7/dist-packages/evdev/device.py", line 305, in close
File "/usr/local/lib/python3.7/dist-packages/evdev/eventio_async.py", line 55, in close
File "/usr/lib/python3.7/asyncio/events.py", line 640, in get_event_loop
File "/usr/lib/python3.7/asyncio/events.py", line 660, in new_event_loop
File "/usr/lib/python3.7/asyncio/unix_events.py", line 51, in __init__
File "/usr/lib/python3.7/asyncio/selector_events.py", line 49, in __init__
File "/usr/lib/python3.7/asyncio/base_events.py", line 373, in __init__
File "/usr/lib/python3.7/asyncio/coroutines.py", line 28, in _is_debug_mode
AttributeError: 'NoneType' object has no attribute 'dev_mode'
Exception ignored in: <function BaseEventLoop.__del__ at 0x761edfa8>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/base_events.py", line 622, in __del__
File "/usr/lib/python3.7/asyncio/base_events.py", line 390, in __repr__
File "/usr/lib/python3.7/asyncio/base_events.py", line 1794, in get_debug
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_debug'
DONE. Let the sounds begin.
Ok, so it’s not related to a specific reader and was probably introduced by the changes of 2.3 release.
I think I bought the neuftech RFID-Reader. I removed the plastic housing to place the PCB on the topside of my case, so I cant say what it was had printed on it. The PCB is labeled M301-V3.1 JATSECURITY
.
@s-martin it might have to do with the apt-get default repo list of raspberry ip OS, I have to check again. didn't find the time. I changed the resources list and the install process actually worked, webserver up and all. Also, the RFID ID of a swiped card showed up in the web App interface - so it seems to work. BUT: the errors that I copied above remained, so the reader seems to work, but the python still has issues. @bgraeb does the web app work on your installation? If not, we might have two issues wrapped in one:
a) Pi OS resources list does not work over wifi b) the python script of phoniebox for readers works but throws errors...
@MiczFlor for me stock Raspi OS works without modifications, webinterface works flawless including playing spotify.
Only the RFID-Cards are not read out/used correctly.
Any updates or thoughts here? Is it more of an implementation issue with standard libs? Maybe I can help out a little, if you can point me in a direction.
Hello,
I'm facing the issue too and did some testing on it.
I began building my box on 18th of September. Since then I ran apt upgrade
4 times.
I have two assumptions what may broke it.
A: A package update via apt upgrade
. I ran this command 4 times since I initally instelled the box. In the beginning the reader worked fine. If requested I can provide a list of packages which have been updated on my system since then from /var/log/apt/history.log
.
B: I ran some basic setup things via Ansible on my system (user setup, package installtion, network and localization related stuff). Last changed thing was disabling the user pi
. I disabled his password and set his login shell to /sbin/nologin
. Reverting this ain't changed the behaviour but maybe I missed something else.
Executing python3 /home/pi/RPi-Jukebox-RFID/scripts/daemon_rfid_reader.py
from /etc/systemd/system/phoniebox-rfid-reader.service
as user root
works, as pi
not.
# user pi
pi@phoniebox1:~ $ id
uid=1000(pi) gid=1000(pi) groups=1000(pi),997(gpio)
pi@phoniebox1:~ $ python3 /home/pi/RPi-Jukebox-RFID/scripts/daemon_rfid_reader.py
Could not find the device HID 16c0:27db Keyboard
. Make sure is connected
pi@phoniebox1:~ $ lsusb | grep 16c0:27db
Bus 001 Device 004: ID 16c0:27db Van Ooijen Technische Informatica Keyboard
# user root - Traceback caused by pressing CTRL+C to end process
root@phoniebox1:/home/pi/RPi-Jukebox-RFID# id
uid=0(root) gid=0(root) groups=0(root),112(bluetooth)
root@phoniebox1:/home/pi/RPi-Jukebox-RFID# python3 /home/pi/RPi-Jukebox-RFID/scripts/daemon_rfid_reader.py
2021-11-26 11:24:19,616 - root - INFO - Dir_PATH: /home/pi/RPi-Jukebox-RFID/scripts
^CTraceback (most recent call last):
File "/home/pi/RPi-Jukebox-RFID/scripts/daemon_rfid_reader.py", line 95, in <module>
cardid = reader.reader.readCard()
File "/home/pi/RPi-Jukebox-RFID/scripts/Reader.py", line 57, in readCard
r, w, x = select([self.dev], [], [])
KeyboardInterrupt
Exception ignored in: <function InputDevice.__del__ at 0xb612dc90>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/evdev/device.py", line 160, in __del__
File "/usr/local/lib/python3.7/dist-packages/evdev/device.py", line 305, in close
File "/usr/local/lib/python3.7/dist-packages/evdev/eventio_async.py", line 55, in close
File "/usr/lib/python3.7/asyncio/events.py", line 726, in get_event_loop_policy
File "/usr/lib/python3.7/asyncio/events.py", line 719, in _init_event_loop_policy
ImportError: sys.meta_path is None, Python is likely shutting down
root@phoniebox1:/home/pi/RPi-Jukebox-RFID#
Bypass for me:
When running phoniebox-rfid-reader.service
as root (disable the user/group lines in ) then the service starts and the reader works.
I do not want to run the box like this, it's just a nasty bypass.
On branch master Your branch is up to date with 'origin/master'.
Version2.3 - 2425890 - master EditionClassic edition (barebones)
scripts/installscripts/buster-install-default.sh
Raspberry Pi Model B Plus Rev 1.2
Neuftech USB RFID Reader ID Kartenlesegerät from Amazon
Bus 001 Device 004: ID 16c0:27db Van Ooijen Technische Informatica Keyboard
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x16c0 Van Ooijen Technische Informatica
idProduct 0x27db Keyboard
bcdDevice 0.01
iManufacturer 1 (error)
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 61
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Device Status: 0x0000
(Bus Powered)
Onboard + HifiBerry MiniAmp
none
Bug
What I did
started the one line installer
What happened
failed here:
I expected this to happen
setup of rfid reader should be successful
Further information that might help
Software
Base image and version
Branch / Release
master
Installscript
scripts/installscripts/buster-install-default.sh
Hardware
RaspberryPi version
3 B+
RFID Reader
Soundcard
none
Other notable hardware
none