Search Linux Wireless

Re: [linux-nfc] ThinkPad T470 and NXP PN5xx (PN547 or PN548)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 11, 2019 at 3:28 PM Oleg Zhurakivskyy
<oleg.zhurakivskyy@xxxxxxxxx> wrote:
>
>
> Hi Sedat,
>
> On 5/10/19 10:40 PM, Sedat Dilek wrote:
>
> > Can you guide me how to do that?
>
> I try and then decide whether this is help or not.
>
> If I remember correctly, support for PN547 was done by multiple parties for some Broadwell based designs through the upstream, both on the kernel and neard side.
>
> Assuming the integration details of PN547 didn’t deviate much, this might be:
>
> - From relatively simple, i.e. getting the relevant data from ACPI and hinting the kernel/driver with a minimally sufficient changes. Most likely, once you sort the basic details (i2c, gpio, etc), everything would just work.
>
> - To more laborious and would require a working and ideally open source reference. An option here might be Broadwell based Chromebooks with PN547 (just not sure whether plain or OEMs).
>

By cloning the driver from [1] which enhances the original driver [1]
with ACPI support and auto-detecting/auto-configuring the "NXP 1001"
device (see [1] and [2])...

...and using NXP's libnfc-nci...

configure-line: PREFIX="/opt/libnfc-nci" ; ./configure
--prefix="$PREFIX" --enable-i2c --enable-debug

...and enabling all available debug options in the provided *.conf
files in /usr/local/etc/...

...en plus I have activated all sort of I2C and GPIO debug kernel options...

...I was able to run the demo-app...

# /opt/libnfc-nci/sbin/nfcDemoApp poll 2>&1 | tee /tmp/nfcDemoApp-poll.txt

While in polling mode, I threw my YubiKey on the NFC device on my
Lenovo ThinkPad T470 and see...

NxpTml:     PN54X - I2C Read successful.....

NxpNciR:     len =  44 >
61052901020400FF010C4400072700000092D3490120000000121178B384008073C021C057597562694B6579
NxpTml:     PN54X - Posting read message.....

NxpHal:     read successful status = 0x0
NxpHal:     NxpNci: RF Interface = ISO-DEP
NxpHal:     NxpNci: Protocol = ISO-DEP
NxpHal:     NxpNci: Mode = A Passive Poll
NxpFunc:    NfcAdaptation::HalDeviceContextDataCallback: len=44
NxpFunc:    NxpTml:     PN54X - Read requested.....

Then I checked what the value...

HEX: 61052901020400FF010C4400072700000092D3490120000000121178B384008073C021C057597562694B6579

...means in ASCII...

$ cut -c 11- HEX.txt | xxd -r -p
�
 D'��I x���s�!�WYubiKey

So, this seems to work.

I still have no glue how to use this experience in Linux to use NFC
and especially my YubiKey.

The binaries provided by Debian's libnfc-bin do not work.

Sorry to say, I still have not get all correlations...

- Sedat -

[0] https://github.com/nfc-tools/libnfc/issues/455
[1] https://github.com/NXPNFCLinux/nxp-pn5xx
[2] https://github.com/jr64/nxp-pn5xx
[3] https://github.com/NXPNFCLinux/nxp-pn5xx/issues/20
[4] https://github.com/NXPNFCLinux/linux_libnfc-nci
[5] https://www.rapidtables.com/convert/number/hex-to-ascii.html
[6] https://superuser.com/questions/244025/tool-to-convert-a-file-of-hex-to-ascii-character-set




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux