Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 816891 - dev-libs/libnfc: fix pcsc support
Summary: dev-libs/libnfc: fix pcsc support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-07 22:14 UTC by Thomas Capricelli
Modified: 2021-10-12 08:50 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Capricelli 2021-10-07 22:14:11 UTC
A lot (if not most) of NFC readers are usb/CCID. libnfc supports those using their "pcsc" driver.

The current gentoo package has a pcsc-lite USE flag, but it only adds support for acr122_pcsc. I can test using a Feitan 502-dual, and using current package, i got nothing with nfc-list.

The official documentation explains how the 'pcsc' driver should be configured:
https://github.com/nfc-tools/libnfc#feitian-br500-and-r502

I patched (locally) the ebuild this way:
-       use pcsc-lite && drivers+=",acr122_pcsc"
+       use pcsc-lite && drivers+=",acr122_pcsc,pcsc"

And now it works:
orzel% nfc-list 
nfc-list uses libnfc 1.8.0
NFC device: Feitian R502 [R502 Contactless Reader] (BAA25E980100005D) 00 00 opened
NFC device: Feitian R502 [R502 SAM1 Reader] (BAA25E980100005D) 01 00 opened
NFC device: Feitian R502 [R502 Contact Reader] (BAA25E980100005D) 02 00 opened

Can you include this change ?
Comment 1 Thomas Capricelli 2021-10-07 22:17:30 UTC
While at it, there's a file "libnfc-1.8.0/libnfc.conf.sample" that should probably be installed as well. Maybe even as a default /etc/nfc/libnfc.conf

It's all explained on:
https://github.com/nfc-tools/libnfc/blob/master/README.md#configuration
Comment 2 Larry the Git Cow gentoo-dev 2021-10-12 08:50:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aeef62f2fe59cd05c3e55b4bd5d46cf313ffdf82

commit aeef62f2fe59cd05c3e55b4bd5d46cf313ffdf82
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2021-10-12 08:50:28 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2021-10-12 08:50:28 +0000

    dev-libs/libnfc: Fix pcsc-lite support
    
    * EAPI 8
    * missing pkg-config dep
    * simpler USE=doc handling
    * remove USE=static-libs
    
    Closes: https://bugs.gentoo.org/816891
    Signed-off-by: David Seifert <soap@gentoo.org>

 ...{libnfc-1.8.0.ebuild => libnfc-1.8.0-r1.ebuild} | 33 +++++++++++++---------
 1 file changed, 20 insertions(+), 13 deletions(-)