Music-Cards can not be configured with nfc card reader acr122u

Hi,

I hope it is okay to ask the community and a specific person:

I am trying to setup the my raspberry pi to read nfc cards with the music-cards project by @hovee

The problem is, that my the config.py will not get any devices.

pi@pi-old:~/music-cards $ python config.py
Choose the reader from list
Device Number:

I do not know python and I am not a developer but i checked the evdev library which is used in the config.py.
This should recognize any usb device as far as I know.

  1. Run: the nfc reader was plugged in and no device was found.
  2. Run: I plugged in my keyboard and it shows up
pi@pi-old:~/music-cards $ python
Python 2.7.13 (default, Sep 26 2018, 18:42:22)
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import evdev
>>> evdev.list_devices()
[]
>>> evdev.list_devices()
['/dev/input/event1', '/dev/input/event0']

I am using this nfc card reader (acr122u): https://www.acs.com.hk/en/products/3/acr122u-usb-nfc-reader/

I did install libnfc 1.7.1 with

./configure --with-drivers=acr122_usb
make
sudo make install

I can see my device with on the system

lsusb
Bus 001 Device 015: ID 0835:8502 Action Star Enterprise Co., Ltd
Bus 001 Device 014: ID 0835:8500 Action Star Enterprise Co., Ltd
Bus 001 Device 016: ID 072f:2200 Advanced Card Systems, Ltd ACR122U
Bus 001 Device 013: ID 0835:8501 Action Star Enterprise Co., Ltd
Bus 001 Device 012: ID 0835:8500 Action Star Enterprise Co., Ltd
Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. SMC9512/9514 USB Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

It is connected via a USB hub since the internet says you should do that for power reasons :wink:

I can list the device with the nfc only with sudo:

pi@pi-old:~/music-cards $ nfc-list
nfc-list uses libnfc 1.7.1
error   libnfc.driver.acr122_usb        Unable to claim USB interface (Operation not permitted)
nfc-list: ERROR: Unable to open NFC device: acr122_usb:001:016

pi@pi-old:~/music-cards $ sudo nfc-list
nfc-list uses libnfc 1.7.1
NFC device: ACS / ACR122U PICC Interface opened

Can someone guide me into the right direction?
Maybe I did miss some configuration somewhere.

I just did solve my problem by buying the same nfc reader. :wink:

I would like to use HomeAssistant to open doors using the ACR122U NFC reader. Is there any way to do this on a Hassos installation?

(tried to install libnfc, but commands like apt-get or ./configure are unknown)

First: Hi and welcome to the community!

Second:
AFAIK Home Assistent Operating System should not be tinkered with.
I would advise you to do such things on a seperate raspberry pi.

You won’t find apt in there because it is based on buildroot and optimized for running Home Assistent.

More about that can be found here:

Thank you for your fast response! I will add another raspberry to the family

I am interested to know how you solve this problem. I have an ACR122U-A9 all setup and running as a background service under ‘sudo service pcscd restart’ but can’t get the tag triggered in my docker home assistant.

FYI, I am a newbie in this and all my knowledge is based on trial and error and from forum like this.

Sorry I can not help anymore on this.

I switched to Spotify because Google music is really annoying regarding third party support.
With YouTube music it got even worse.

When I find time I use the “official” tag reader with Spotify. Did not make the time yet.

My interest is to get acr122u scan recognised by HA regardless of whether it is Google or not. I have managed to get it to work on raspberry but don’t know how it can be triggered from HA. If Spotify still use acr122u, I would be keen to learn how it is done. Hope you don’t mind.

As I said I never used that reader in order to do something.

But if you got it running on a raspberry pi you now need to send some information to home assistant.
I believe http would be the best solution, but not sure about that. You need some python code with the home assistant library which will do that.

Maybe check out this thread about an deprecated component: