acshk / acsccid

acsccid is a PC/SC driver for Linux/Mac OS X and it supports ACS CCID smart card readers. This library provides a PC/SC IFD handler implementation and communicates with the readers through the PC/SC Lite resource manager (pcscd).
GNU Lesser General Public License v2.1
104 stars 19 forks source link

LED control on ACR122U #25

Closed hinxx closed 4 years ago

hinxx commented 4 years ago

I can successfully control the red and green LED using the "Bi-color LED and Buzzer Control" command as described in the API manual. By default (reader in idle mode?) the red LED is turned on. I'm trying to turn the red LED off. I can do that, temporary, with the command FF 00 40 04 04 00 00 00 00, but it turns back on after a couple of milliseconds. I'm sure my app is not sending any commands to turn it back on as I'm monitoring the pcscd log output and can only see my command to turn the red LED off.

Can I (permanently) turn off the red LED and turn it back on whenever I want? How?

FWIW, this is using latest master git code of this repo, on Linux, with reader firmware ACR122U214.

godfreychung commented 4 years ago

You need to disable the PICC polling before controlling the LED.

To disable the PICC polling, please refer to section 6.5. Set the PICC operating parameter from API manual.

hinxx commented 4 years ago

Thanks!