Closed comseong closed 8 years ago
I don't think it is related to pn533 kernel driver. Did you try to send the escape command to control the LED and the buzzer?
The default value of both a LED and buzzer should be ON without any control command. When I plug in the ACR122U to other OS like Windows, the LED and buzzer works well without any configuration. When I enabled the pn533 driver, also both the LED and buzzer will work normally again.
Can you provide ACR122U firmware version?
ACR122U215
It seems that the driver was not loaded. Did you run pcscd with acsccd driver? Was the reader able to detect the card from pcsc_scan?
I installed this acsccid by source code compile from this gitbub repository. The moment when I execute the pcsc_scan command, the Buzzer and LED turns ON. Do I always have to use the command to turn ON the Buzzeer and LED? But when I stop the pcsc_scan demon, the Buzzer and LED will not work again. Is it normal?
Yes, it is normal. pcscd is controlled by systemd in Raspbian Jessie. systemd will start pcscd if a PC/SC application access the reader. Otherwise, it will stop pcscd.
Therefore, I think you will run you own PC/SC application to access the card.
I used wrong expression. The pcsc_scan is not a demon but application. When I stop the pcsc_scan application forcibly by CTRL+C, the Buzzer and LED will not work again. You mean that turning ON the Buzzer and LED is responsible for application? But when I load the PN533 kernel driver on the Linux or I plugged the reader in Windows OS, the Buzzer and LED will work automatically without executing any application.
As I mentioned before, pcscd is controlled by systemd in Raspbian Jessie. When pcsc_scan accesses a reader, it will trigger systemd to start pcscd and then pcscd loads acsccid driver for ACR122U. However, systemd will stop pcscd if there is no application accessing the reader. Therefore, the buzzer and LED is not working because acsccid driver is unloaded.
For Linux kernel driver pn533 or Windows driver, the driver is running until the reader is unplugged.
I understood that the pcscd should be loaded statically by application. But is there any method for the pcscd to be loaded dynamically when I plug the reader in Raspbian like a plug-n-play? Except for me, the other people who want to do a Raspberry-Pi project with this reader are also confusing about this.
I think you can switch systemd to sysvinit in Raspbian Jessie.
Thank you for your help!
Unfortunately other problem has happened. Since I have started the pcscd manually by "service pcscd start" command, the Buzzer and LED work well when I tagged a card. But when I use the nfc-tool command like nfc-list or lsnfc, commands work well but the Buzzer and LED doesn't work again even though the pcscd is running on the memory. Can't I use both the pcscd and libnfc at the same time?
I think libnfc didn't restore the default card polling behavior after using the reader.
This issue was solved by switching systemd to sysvinit but the libnfc should restore the default card polling behavior after using the reader.
I am using acr122u-a9 at Raspberry-pi 2 with Raspbian. When the ACR122U is plugged in, kernel(>3.5) will automatically load the pn533 driver. With the pn533 driver, pcscd will report "Can't claim interface" error. When I disabled pn533 and nfc driver in kernel with blacklist.conf, the error will be disappeared. But since I disabled the pn533, the LED and Buzzer on the ACR122U doesn't work. How can I solve this problem? Thanks.