NFC tag with SE050E

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NFC tag with SE050E

Jump to solution
2,178 Views
psvz
Contributor IV

Hi

I need to create a tag - a minimal antenna-to-SE050E design - to do the following.

An app on a mobile device with NFC reader will 1/power the tag; 2/send a string of bytes to sign (about 24 bytes). Then... 3/the signature is read back; 4/the public key verifying the signature is also read back. The algorithm is ECC Ed25519 curve: public key is 32 bytes, and the signature is 64 bytes.

Questions:

1/ Do such tags exist off the shelf to buy - I would imagine it's very basic functionality?

2/ What antenna characteristics I need to use with majority of iphones/androids on the market?

3/ Do you have any middleware to use with NFC readers specifically (I used one written in C for I2C connected SE050E in RPi but not sure if that one would be applicable here).

4/ Do you (or anyone you know of) have examples or SDK for Flutter or JS?

Labels (2)
0 Kudos
Reply
1 Solution
1,970 Views
psvz
Contributor IV

Hi @Kan_Li 

I think you can add the following to some wiki page, because it is not just one little thing.

se05x middleware 4.5.0 on RPi4/Linux with USB reader (not T1oI2C)

1/ the reader have to be USB-CCID, and mine is using serialization:

lsusb
Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC

So, the reader above has to be replaced. You suggested Identiv uTrust 3700 F.

2/ Follow instructions for RPi T1oI2C until the folder simw-top_build/raspbian_native_se050_t1oi2c is created.

3/ Configure and Generate with cmake using -DPTMW_SMCOM=PCSC and other options as needed but do not build.

4/ Install drivers and headers and fix a bug in them:

apt-get install pcscd libpcsclite-dev
export C_INCLUDE_PATH=/usr/include/PCSC

 The export is workaround for inappropriate includes in dev headers (at least in a version I got across).

5/ Fix the middleware - edit file hostlib/hostLib/libCommon/CMakeFiles/smCom.dir/link.txt to end with "-lpthread -lpcsclite" instead of current "-lpthread -lpthread".

6/ now you can cmake --build .

7/ You will need to fix or remove C code in simw-top/demos/se05x/se05x_MultiThread/se05x_multithreaded_demo_task.c to cleanly finalize the build.

 

View solution in original post

Tags (1)
0 Kudos
Reply
11 Replies
2,146 Views
psvz
Contributor IV

Hi @Kan_Li 

Thanks for your reply.

I checked those two links with LPC55S69 and i.MXRT1050 - and they are both active (powered) components talking to SE via I2C, which is not what I am looking for. Perhaps, SE050 is the wrong component for my project..?

I need a passive antenna-chip system that can be powered solely from NFC reader. The reader sends arbitrary bytes to the chip, the chip e-signs the bytes with secret material (key) and sends back the signature + the key's fingerprint to the reader. What do I need to implement this workflow?

0 Kudos
Reply
2,132 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @psvz ,

 

OM-SE050E2-ARD can meet your requirement, all you have to prepare is a NFC reader connected with a PC host via USB. The MW for SE can be configured to use PSCS interface . Please kindly refer to the following for details.

Kan_Li_0-1744019517718.png

Please kindly refer to https://www.nxp.com/docs/en/application-note/AN12398.pdf for more details.

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos
Reply
2,067 Views
psvz
Contributor IV

Hi @Kan_Li 

Switching from I2C to PCSC produced this error on my raspberry Pi:

root@lite32g:~/simw-top_build/raspbian_native_se050_t1oi2c # cmake --build .
...
[  3%] Building C object hostlib/hostLib/libCommon/CMakeFiles/smCom.dir/smCom/smComPCSC.c.o
/root/simw-top/hostlib/hostLib/libCommon/smCom/smComPCSC.c:29:10: fatal error: PCSC/wintypes.h: No such file or directory
   29 | #include <PCSC/wintypes.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [hostlib/hostLib/libCommon/CMakeFiles/smCom.dir/build.make:186: hostlib/hostLib/libCommon/CMakeFiles/smCom.dir/smCom/smComPCSC.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1823: hostlib/hostLib/libCommon/CMakeFiles/smCom.dir/all] Error 2
gmake: *** [Makefile:171: all] Error 2

I understand PCSC is characteristic for Windows? How do I make it work with Linux?

root@lite32g:~/simw-top_build/raspbian_native_se050_t1oi2c # uname -a
Linux lite32g 5.15.84-v7l+ #1613 SMP Thu Jan 5 12:01:26 GMT 2023 armv7l GNU/Linux

 

Tags (1)
0 Kudos
Reply
2,127 Views
psvz
Contributor IV

Hi @Kan_Li 

You got me very confused. You suggest using middleware with NFC comms, yet FRDM-K64F board described in your document has no NFC capabilities?

Next, I am not clear what SE050E2 means, it is mentioned twice in your document with exact same variables as OM-SE050ARD-E board, which I have.

I propose to make a step back. I have USB-connected "highly integrated NXP IC interface" - NFC RFID Reader Writer - µFR Classic CS With Free SDK

I configured my OM-SE050ARD-E board (added 2 jumpers) per section 4.4.1 in AN12395 as you suggested, even though section 4.5 in AN13539 specifically say "Note: OM-SE050ARD-E kit does not support ISO/IEC 14443-4-A".

When I put OM-SE050ARD-E board into the reader's field, it neither detects any connection nor allows to read anything. I suspect it's because 14443-4-A is not supported. So, what exactly the protocol I should use and can I use the middleware through the reader above?

0 Kudos
Reply
2,108 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @psvz ,

 

Sorry for the confusion that has caused. The NFC reader here takes the place of FRDM-K64F. I just create a short article on this topic, please kindly refer to https://community.nxp.com/t5/Secure-Authentication-Knowledge/How-to-configure-PlugAndTrustMW-for-NFC... for details.

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
2,104 Views
psvz
Contributor IV

Hi @Kan_Li - thank you for your write-up. Could you add which NFC adapter (reader) you use, just for the reference? Do you need to install D2XX Drivers - FTDI for it?

0 Kudos
Reply
2,089 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @psvz ,

 

It is Identiv CLOUD 3700 F, and no driver installation needed for this device, and plug and play.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
2,004 Views
psvz
Contributor IV

Hi @Kan_Li 

As an update for my unsuccessful endeavor - I need PCSC to work off my raspberry Pi 4, which is Linux32, and I connect my USB reader to the Pi, and install the library:

libpcsclite-dev - Middleware to access a smart card using PC/SC (development files)

It has all the binding the middleware wants:

readelf -Ws /lib/arm-linux-gnueabihf/libpcsclite.so
    57: 00008144     8 OBJECT  GLOBAL DEFAULT   13 g_rgSCardRawPci
    58: 000047e4  1316 FUNC    GLOBAL DEFAULT   11 SCardEstablishContext
    59: 00003b10   516 FUNC    GLOBAL DEFAULT   11 SCardControl
    60: 00003da8    72 FUNC    GLOBAL DEFAULT   11 SCardSetAttrib
    61: 000040d4   512 FUNC    GLOBAL DEFAULT   11 SCardListReaders
    62: 0000254c   476 FUNC    GLOBAL DEFAULT   11 SCardDisconnect
    63: 00003df0   740 FUNC    GLOBAL DEFAULT   11 SCardTransmit
    64: 0000814c     8 OBJECT  GLOBAL DEFAULT   13 g_rgSCardT1Pci
    65: 00002e80  3216 FUNC    GLOBAL DEFAULT   11 SCardGetStatusChange
    66: 00008154     8 OBJECT  GLOBAL DEFAULT   13 g_rgSCardT0Pci
    67: 00004524   316 FUNC    GLOBAL DEFAULT   11 SCardCancel
    68: 00001e88   636 FUNC    GLOBAL DEFAULT   11 SCardReleaseContext
    69: 000014cc  1248 FUNC    GLOBAL DEFAULT   11 pcsc_stringify_error
    70: 000042d4   188 FUNC    GLOBAL DEFAULT   11 SCardFreeMemory
    71: 00004390   404 FUNC    GLOBAL DEFAULT   11 SCardListReaderGroups
    72: 00002898   312 FUNC    GLOBAL DEFAULT   11 SCardEndTransaction
    73: 00002364   488 FUNC    GLOBAL DEFAULT   11 SCardReconnect
    74: 00003d14   148 FUNC    GLOBAL DEFAULT   11 SCardGetAttrib
    75: 00004660   168 FUNC    GLOBAL DEFAULT   11 SCardIsValidContext
    76: 00002728   368 FUNC    GLOBAL DEFAULT   11 SCardBeginTransaction
    77: 000029d0  1200 FUNC    GLOBAL DEFAULT   11 SCardStatus
    78: 00002104   608 FUNC    GLOBAL DEFAULT   11 SCardConnect

However, I can't force cmake to find them. I downloaded your latest middleware v4.5.0 I follow Documentation 4.6.1 Section - CMake Reference -

/build_se050 # cmake ../simw-top -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPTMW_SE05X_Auth=PlatfSCP03 -DPTMW_Host=PCLinux32 -DPTMW_SMCOM=PCSC -DApplet=SE050_E

/build_se050 # cmake --build .
Scanning dependencies of target mbedtls
[  0%] Building C object ext/CMakeFiles/mbedtls.dir/mbedtls/library/aes.c.o
cc: error: unrecognized command-line option ‘-m32’; did you mean ‘-mbe32’?
gmake[2]: *** [ext/CMakeFiles/mbedtls.dir/build.make:82: ext/CMakeFiles/mbedtls.dir/mbedtls/library/aes.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1294: ext/CMakeFiles/mbedtls.dir/all] Error 2
gmake: *** [Makefile:149: all] Error 2

If I then use
python scripts/create_cmake_projects.py
It automatiacally creates T1oI2C package.
I change it manually to PCSC and
/simw-top_build/raspbian_native_se050_t1oi2c # cmake --buil .

[  2%] Building C object hostlib/hostLib/libCommon/CMakeFiles/smCom.dir/smCom/smComPCSC.c.o
In file included from /root/new/simw-top/hostlib/hostLib/libCommon/smCom/smComPCSC.c:30:
/usr/include/PCSC/winscard.h:41:10: fatal error: pcsclite.h: No such file or directory
   41 | #include <pcsclite.h>
      |          ^~~~~~~~~~~~
compilation terminated.

That's a problem with that library - we can overcome it with -
export C_INCLUDE_PATH=/usr/include/PCSC
running build again -

Scanning dependencies of target ex_hkdf
[ 43%] Building C object sss/ex/hkdf/CMakeFiles/ex_hkdf.dir/ex_sss_hkdf.c.o
[ 44%] Linking C executable ../../../bin/ex_hkdf
/bin/ld: ../../../hostlib/hostLib/libCommon/libsmCom.so: undefined reference to `SCardConnect'
/bin/ld: ../../../hostlib/hostLib/libCommon/libsmCom.so: undefined reference to `SCardTransmit'
/bin/ld: ../../../hostlib/hostLib/libCommon/libsmCom.so: undefined reference to `pcsc_stringify_error'
/bin/ld: ../../../hostlib/hostLib/libCommon/libsmCom.so: undefined reference to `SCardEstablishContext'
/bin/ld: ../../../hostlib/hostLib/libCommon/libsmCom.so: undefined reference to `SCardFreeMemory'
/bin/ld: ../../../hostlib/hostLib/libCommon/libsmCom.so: undefined reference to `SCardListReaders'
/bin/ld: ../../../hostlib/hostLib/libCommon/libsmCom.so: undefined reference to `g_rgSCardT0Pci'
/bin/ld: ../../../hostlib/hostLib/libCommon/libsmCom.so: undefined reference to `g_rgSCardT1Pci'
collect2: error: ld returned 1 exit status
gmake[2]: *** [sss/ex/hkdf/CMakeFiles/ex_hkdf.dir/build.make:111: bin/ex_hkdf] Error 1

But note how all those symbols are readily available in .so library installed on the system - how do I make the middleware using it?

Tags (1)
0 Kudos
Reply
1,989 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @psvz ,

 

Looks like the Cmake has already provided you a solution.

Kan_Li_0-1744684600628.png

 

Have  you ever tried it ?

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos
Reply
1,971 Views
psvz
Contributor IV

Hi @Kan_Li 

I think you can add the following to some wiki page, because it is not just one little thing.

se05x middleware 4.5.0 on RPi4/Linux with USB reader (not T1oI2C)

1/ the reader have to be USB-CCID, and mine is using serialization:

lsusb
Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC

So, the reader above has to be replaced. You suggested Identiv uTrust 3700 F.

2/ Follow instructions for RPi T1oI2C until the folder simw-top_build/raspbian_native_se050_t1oi2c is created.

3/ Configure and Generate with cmake using -DPTMW_SMCOM=PCSC and other options as needed but do not build.

4/ Install drivers and headers and fix a bug in them:

apt-get install pcscd libpcsclite-dev
export C_INCLUDE_PATH=/usr/include/PCSC

 The export is workaround for inappropriate includes in dev headers (at least in a version I got across).

5/ Fix the middleware - edit file hostlib/hostLib/libCommon/CMakeFiles/smCom.dir/link.txt to end with "-lpthread -lpcsclite" instead of current "-lpthread -lpthread".

6/ now you can cmake --build .

7/ You will need to fix or remove C code in simw-top/demos/se05x/se05x_MultiThread/se05x_multithreaded_demo_task.c to cleanly finalize the build.

 

Tags (1)
0 Kudos
Reply
2,165 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @psvz ,

 

OM-SE050E-ARD supports ISO14443 interface as well, you may use this board for evaluation purpose. Please kindly refer to https://www.nxp.com/part/OM-SE050ARD-E for details.

Please refer to section 4.4 in https://www.nxp.com/docs/en/application-note/AN12395.pdf for details regarding how to configure the ISo14443 interface .

 

There are two articles in our NXP community which describe how to use SE050 with CLRC663 and different MCU's. 

Here are them:
1) using LPC55S69: https://community.nxp.com/t5/NFC-Knowledge-Base/Using-LPC55S69-with-SE050-and-CLRC663plus-for-Secure... 
2) using i.MXRT1050: https://community.nxp.com/t5/NFC-Knowledge-Base/Using-i-MXRT1050-with-SE050-and-CLRC663plus-for-Secu... 

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply