Files
desk-reminder/README.md
2026-02-19 17:45:10 +00:00

48 lines
1.4 KiB
Markdown

# desk-reminder
Simple C program that listens for events from the Alcor Micro AU9540 USB smartcard reader.
- USB device: `058f:9540` (Alcor Micro Corp. AU9540 Smartcard Reader)
- Implementation: raw USB using `libusb-1.0`
The program opens the reader by VID/PID, locates the first interrupt IN endpoint, and prints any data received (typically slot change / card insertion or removal notifications). It does **not** implement full CCID or smartcard protocols, but is useful for observing low-level traffic.
## Build
On Debian/Ubuntu and similar, install the development package:
```sh
sudo apt-get update
sudo apt-get install libusb-1.0-0-dev
```
Then build the program:
```sh
cd desk-reminder
make
```
This produces a `desk_reminder` binary.
## Run
You may need root or appropriate udev rules to access USB devices directly:
```sh
cd desk-reminder
sudo ./desk_reminder
```
Expected behavior:
- The program prints which bus/device it opened.
- It reports which interrupt IN endpoint it is listening on.
- When the AU9540 reports an event (for example, card insertion/removal), the program prints the raw bytes received.
Press `Ctrl+C` to stop the program.
## Notes
For higher-level smartcard operations (APDU exchange, PIN verification, etc.), you would typically use PC/SC (`pcscd`, `libpcsclite`) instead of talking to the reader via raw USB. This example focuses on listening to the USB interrupt endpoint.