https://github.com/stargate01/ifdnfc-nci
PC/SC IFD Handler based on linux_libnfc-nci
https://github.com/stargate01/ifdnfc-nci
Last synced: over 1 year ago
JSON representation
PC/SC IFD Handler based on linux_libnfc-nci
- Host: GitHub
- URL: https://github.com/stargate01/ifdnfc-nci
- Owner: StarGate01
- License: gpl-3.0
- Created: 2024-07-11T20:57:11.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-05T11:08:02.000Z (almost 2 years ago)
- Last Synced: 2025-04-05T21:34:08.912Z (over 1 year ago)
- Language: C
- Size: 38.1 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ifdnfc-nci
PC/SC IFD Handler for PCSClite based on `linux_libnfc-nci` and `ifdnfc` (https://github.com/nfc-tools/ifdnfc).
This stack targets the `NXP PN54x chipset`. Extended APDUs are (mostly) supported, extensions for the German eID card protocol are implemented as well.
## Requirements
Get and install the (forked) libnfc-nci library from https://github.com/StarGate01/linux_libnfc-nci/ , which works with the kernel driver from https://github.com/jr64/nxp-pn5xx .
Other requirements are `gcc`, `cmake`, `pkg-config`, `pcsclite` and `make` .
## Building
```
mkdir -p build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$(pwd)/../install ..
make
```
## Installing
Place the `./install/lib/libifdnfc-nci.so` file somewhere you like, e.g. `/usr/lib/pcsc/drivers/serial/libifdnfc-nci.so`
Append to `/etc/reader.conf` (or wherever your pcsc serial reader configuration is):
```
FRIENDLYNAME "NFC NCI"
LIBPATH /usr/lib/pcsc/drivers/serial/libifdnfc-nci.so
CHANNELID 0
```
### Hibernation issue
After hibernation / sleep wakeup, the NFC chip needs to re-initialized. An easy way to do this is to restart the PCSC daemon whenever the system wakes up (using a systemd oneshot service):
```
[Unit]
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
Description=Wakeup PCSC after sleep
[Service]
ExecStart=systemctl restart pcscd.service
TimeoutStopSec=10
Type=oneshot
[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
```