Topic: SCL011 (German Basisleser)

Hi,

I have obtained one of about 400.000 SCL011 NFC-devices which were given away or free in Germany. These devices are currently not supported by libnfc, but there are linux-drivers and the device works via PC/SC.

Some interesting hardware-details:
*RFID-Chip (transponder) STC3 inside
*Datasheet: http://www.scmmicro.com/pdf/Dat_STC_3_e.pdf

*Description (german): http://www.scmmicro.com/de/products-ser … cl011.html
*Reference Manual: http://www.scmmicro.com/fileadmin/produ … VER2.0.pdf
*Firmware: http://support.scmmicro.com/dfu_fw.php? … eaderno=85

IC's:
*SCM STC3-HF
*NXP PN512HN

My question is: Is it possible to support this hardware (SCL011) in libnfc? And if yes: what can I do to help the libnfc developers community with this device?

Raim has posted a request / idea to support a similar RFID-reader (given away for free in Germany, too) via PC/SC: http://www.libnfc.org/community/topic/2 … over-pcsc/

Links (german):
http://www.mikrocontroller.net/topic/197711
http://www.das-labor.org/wiki/RFID/Scl011

Re: SCL011 (German Basisleser)

m0rix wrote:

My question is: Is it possible to support this hardware (SCL011) in libnfc? And if yes: what can I do to help the libnfc developers community with this device?

Theorically, yes that's possible.
First you have to that you will need to remove PCSC drivers to use directly the device with libnfc.
The way we use PCSC with ACR122 is a very bad way and may be unsupported one day.

With ACR122:
your application -> libnfc -> PCSC -> CCID -> device

Ideal cases:
your application -> libnfc -> device (like all devices except ACR122/Touchatag)
your application -> PCSC -> CCID? -> libnfc -> device (not implemented yet internally, but there is a ifdHandler for PCSC to use libnfc)

So, if you want to drive this reader: you will need to know what are commands and replies to talk with the IC behind the PN512.
PN512 can be consider as a "modem", it carriers data provided by the IC.
To do this, I think you will need extra documents from SCM and I'm not sure they will give them to you...
BTW, currently we had a really good relationship with SCM/ARYGON, so I can send a mail to see if something is possible, if you want to implement it.

m0rix wrote:

Raim has posted a request / idea to support a similar RFID-reader (given away for free in Germany, too) via PC/SC:

I don't understand exactly what Raim expect for, but if he purpose the following shema:
your application -> libnfc -> generic PCSC driver -> PCSC -> CCID -> device
I don't think that a good point: we will be limited by PCSC's driver capabilities, which not always offer real NFC but RFID@13,56Mhz

Hope it helps smile

Romuald Conty

Re: SCL011 (German Basisleser)

rconty wrote:

Theorically, yes that's possible.

Sounds like good news wink

rconty wrote:

So, if you want to drive this reader: you will need to know what are commands and replies to talk with the IC behind the PN512.
PN512 can be consider as a "modem", it carriers data provided by the IC.
To do this, I think you will need extra documents from SCM and I'm not sure they will give them to you...

Hmmm... I had a look in the Reference Manual and I found this part (5.4.1):

SCL01X implements a transport protocol that is compliant with USB Device Class: Smart Card
CCID Specification for Integrated Circuit(s) Cards Interface Devices Revision 1.10.

So CCID class requests "Abort", "Get Clock Frequencies" and "Get Data rates" as well as CCID messages "PC_to_RDR_IccPowerOn", "PC_to_RDR_IccPowerOff", "PC_to_RDR_GetSlotStatus", "PC_to_RDR_XfrBlock", "PC_to_RDR_Escape" and "PC_to_RDR_Abort " are supported.

In my opinion at least one of the two "ideal cases"
application -> PCSC -> CCID? -> libnfc -> device
is not so far away. There are a lot of examples (ATR, APDU, read and write blocks etc.) and even a " Sample code using escape commands through Escape IOCTL".

rconty wrote:

BTW, currently we had a really good relationship with SCM/ARYGON, so I can send a mail to see if something is possible, if you want to implement it.

I am neither a c-progammer nor I know the implementation details of CCID, PC/SC and the way they interact with libusb. My aim is to code a simple perl/bash script that can distinguish between e.g. two "Mifare Standard 1K"-cards depending on the value stored on the card. The next step would be read and write data on the card...
The easiest way (for me) to do so is to use samples and various tools based on and around libnfc smile
But if you can use your good relationship and I can find a person willing to spend some time...

Because the device itself is for free I won't mind to take the shipping fee to send over one or two SCL011 in order to support the development of libnfc for this device. BTW, have a look at https://www.ausweisapp.bund.de/pweb/cms/kartenleser.jsp (german). Our government tries to promote the new identification card with a nfc-chip inside, which leads to the fact that (in their future prospect) there will be a lot of nfc-devices on a lot of desks. I am not an ardent worshipper of RFID in id-cards but a cool side effect is that a lot of people are playing around with new nfc technology.

Last edited by m0rix (2011-01-20 13:25:08)

Re: SCL011 (German Basisleser)

Where can I get these samples for free?

Re: SCL011 (German Basisleser)

Hi

Well, there is still a solution that consists in storing encyphered data on the card.  This does not prevent card duplication, but if it's not a concern, you can simply use the card as a publicly readable / writable area to store encyphered data.

Mifare Ultralight C can also be an interresting alternative.

Romain

Re: SCL011 (German Basisleser)

I now completly reverse engineered the device.I wrote a python script that can be used exaclty like scriptor.
I now want to port the device to libnfc but I'm stuck at this I can't seem to get the driver working for libnfc.I don't even know where to begin to port the driver.

Re: SCL011 (German Basisleser)

BlackLotus wrote:

I don't even know where to begin to port the driver.

Go in libnfc/driver/pn532_uart.c and have a look on structure constructed at bottom of file, you have to expose some functions that is used by libnfc API.
That the principle. BTW, you could also have a look to the commit #1182:

http://code.google.com/p/libnfc/source/detail?r=1182

In this commit,  Anugrah Redja add ACR122S support to the libnfc.

Romuald Conty

Re: SCL011 (German Basisleser)

If I'm not mistaken this driver doesn't use the libusb librarie and somehow I don't get the driver structure.
Because of a lack of options I wrote a nearly complete set of python tool doing the exact same thing as the libnfc tools.I hope that I will be able to adapt it to libnfc without using pcsc as a backend.
If anyone wants to help me you can get into direct contact with me under maxmusterm@gmail.com

Last edited by BlackLotus (2011-12-15 23:20:21)