received의 끝 90 00 은 ACK 같고

그 외에 다른 값들은 안드로이드에서 nfc tools 등을 이용하여 읽은 것과 동일한 결과를 돌려준다.

 

[링크 : https://community.st.com/t5/st25-nfc-rfid-tags-and-readers/apdu-for-uid-mifare-1k-classic-no-response/td-p/237545]

 

90 00 은 SW1 SW2 같은데 멀 의미하는진 모르겠다.

25

"Get Data Command" is defined in PCSC 3 v2. If your driver is PCSC v2 compliant, you can get UID using it:

Class = 0xFF
INS = 0xCA
P1 = 0x00
P2 = 0x00
Le = 0x00 (return full length: ISO14443A single 4 bytes, double 7 bytes, triple 10 bytes, for ISO14443B 4 bytes PUPI, for 15693 8 bytes UID)
Returned value is:

Data+SW1SW2

[링크 : https://stackoverflow.com/questions/13051167/apdu-command-to-get-smart-card-uid]

'하드웨어 > rfid_nfc_smartcard' 카테고리의 다른 글

Mirafe DESFire EV3 record  (2) 2025.02.27
ATS  (0) 2025.02.27
acr1252u win rdp 안됨  (0) 2025.02.26
libpcsclite 빌드 + 주의사항  (0) 2025.02.25
우분투용 스마트 카드 리더 유틸리티  (0) 2025.02.25
Posted by 구차니

어우.. 원격으로 하면 안되는 거였나?

Smart Card Subsystem (and Resource Manger) must work "out of the box".
Try to install some smart card drivers that present virtual slots to the system.
For example this one.

Are you working via RDP?

I answered "yes" to the RDP question. I logged into the computer directly, and magic: I see the smart card reader. I guess it's a security feature so you don't share your smartcard with the world. – 
Radu C
 CommentedJan 19, 2021 at 23:05
Ah, RDP. Lost too much time again due to this, not the first time. Even with Smart card forwarding disabled, you just get that terrible uninformative message. – 
jcaron
 CommentedApr 22, 2024 at 22:24

[링크 : https://stackoverflow.com/questions/56397957/establish-resource-manager-context-to-use-smart-card-reader]

 

아무튼 프로그램 실행하면 아래와 같이 나오는데

시리얼 읽는건 어떻게 명령어를 조합해서 보내야 할지 감이 안와서 다시 공부하러.. (!!)

 

control command logs를 보면 조금 감이 잡힐 것 같기도 한데..

 

프로그램이 직관적이지 못해서 헤맴.

상태 읽기, 설정 등은 좀 버튼으로 만들라고 -_-

 

 

 

 

하단의 탭 APDU Transmit은 도대체 어떻게 저 필드를 설정해야 할지 감이 하나도 안 잡힌다.

 

NDEF 라는게 보여서 검색해보니 NFC Data Exchange Format의 약자인데

NFC만 되려나?

[링크 : https://m.blog.naver.com/yh_park02/223498823881]

 

예제 프로그램 중에 NTAG 라는 게 있어서 실행해보니, 해당하는 카드가 없다고 밷는데

"NTAG203 card" 라는 단어가 나와 찾아보니 13.56MHz RFID/NFC 태그 Nfc TAG 줄여서 NTAG인가?

[링크 : https://vctec.co.kr/product/1356mhz-rfidnfc-%ED%83%9C%EA%B7%B8-ntag203-%EC%B9%A9-1356mhz-rfidnfc-white-tag-ntag203-chip/14501/]

Posted by 구차니

어우 묘하게 많은 패키지를 요구하네

$ sudo apt-get install libpolkit-gobject-1-dev libsystemd-dev doxygen
$ meson setup builddir
$ cd builddir/
$ meson compile
$ meson install

[링크 : https://github.com/LudovicRousseau/PCSC]

[링크 : https://blog.apdu.fr/posts/2024/05/pcsc-lite-now-uses-meson-build-tool/]

    [링크 : https://pcsclite.apdu.fr/]

 

[링크 : https://github.com/FedeDP/Clightd/issues/41] polkit-gobject-1 에러

 

 

meson install 안하면 아래와 같이 so 파일 없다고 에러난다.

$ ./pcsc_demo
PC/SC sample code
V 1.4 2003-2009, Ludovic Rousseau <ludovic.rousseau@free.fr>

THIS PROGRAM IS NOT DESIGNED AS A TESTING TOOL FOR END USERS!
Do NOT use it unless you really know what you do.

loading "libpcsclite_real.so.1" failed: libpcsclite_real.so.1: cannot open shared object file: No such file or directory
SCardEstablishContext: Cannot Connect to Resource Manager 80100001

 

근데 설치하고 나서도 먼가 수행되진 않는다.

 

 

+

아무생각 없이 meson install 했다가 한시간 날림..

pcsc_scan 하면 서비스가 정지되었다는데

$ pcsc_scan 
SCardEstablishContext: Service was stopped.

 

서비스는 돈다. 그런데.. 버전이 맞지 않다고

$ sudo service pcscd status
● pcscd.service - PC/SC Smart Card Daemon
     Loaded: loaded (/lib/systemd/system/pcscd.service; indirect; vendor preset: enabled)
     Active: active (running) since Tue 2025-02-25 16:36:23 KST; 37s ago
TriggeredBy: ● pcscd.socket
       Docs: man:pcscd(8)
   Main PID: 865510 (pcscd)
      Tasks: 6 (limit: 18836)
     Memory: 1.1M
        CPU: 63ms
     CGroup: /system.slice/pcscd.service
             └─865510 /usr/sbin/pcscd --foreground --auto-exit

 2월 25 16:36:23 minimonk systemd[1]: Started PC/SC Smart Card Daemon.
 2월 25 16:36:23 minimonk pcscd[865510]: 00000000 winscard_svc.c:382:ContextThread() Communication protocol mismatch!
 2월 25 16:36:23 minimonk pcscd[865510]: 00000085 winscard_svc.c:384:ContextThread() Client protocol is 4:5
 2월 25 16:36:23 minimonk pcscd[865510]: 00000007 winscard_svc.c:386:ContextThread() Server protocol is 4:4

 

/usr$ sudo find ./ -name libpcsclite*
./share/doc/libpcsclite1
./local/lib/x86_64-linux-gnu/libpcsclite.a
./local/lib/x86_64-linux-gnu/libpcsclite_real.so.1
./local/lib/x86_64-linux-gnu/pkgconfig/libpcsclite.pc
./local/lib/x86_64-linux-gnu/libpcsclite.so.1
./local/lib/x86_64-linux-gnu/libpcsclite_real.so
./local/lib/x86_64-linux-gnu/libpcsclite.so
./lib/x86_64-linux-gnu/libpcsclite.so.1
./lib/x86_64-linux-gnu/libpcsclite.so.1.0.0

 

아마도 so 로더에서 /usr/lib 보다 /usr/local의 우선순위가 높다보니

$ cat /etc/ld.so.conf.d/x86_64-linux-gnu.conf # Multiarch support
/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu

 

apt로 설치되는 녀석은 /usr/lib에 설치되는데 반해

/usr$ ls -al /lib/x86_64-linux-gnu/libpcsclite.so.1*
lrwxrwxrwx 1 root root    20  6월 28  2023 /lib/x86_64-linux-gnu/libpcsclite.so.1 -> libpcsclite.so.1.0.0
-rw-r--r-- 1 root root 43072  6월 28  2023 /lib/x86_64-linux-gnu/libpcsclite.so.1.0.0

 

git으로 소스 빌드해서 설치해버리면 /usr/local/lib에 설치가 되어버리면서

pcsc_scan이 참조하는 라이브러리가 달라져서 발생하는 것으로 추측된다.

/usr/local/lib/x86_64-linux-gnu$ ls -al libpcsc*
-rw-r--r-- 1 root root 185248  2월 25 15:40 libpcsclite.a
lrwxrwxrwx 1 root root     16  2월 25 15:40 libpcsclite.so -> libpcsclite.so.1
-rwxr-xr-x 1 root root  32896  2월 25 15:40 libpcsclite.so.1
lrwxrwxrwx 1 root root     21  2월 25 15:40 libpcsclite_real.so -> libpcsclite_real.so.1
-rwxr-xr-x 1 root root 113936  2월 25 15:40 libpcsclite_real.so.1
lrwxrwxrwx 1 root root     15  2월 25 15:40 libpcscspy.so -> libpcscspy.so.0
-rwxr-xr-x 1 root root  45792  2월 25 15:40 libpcscspy.so.0

[링크 : https://ludovicrousseau.blogspot.com/2023/04/faq-pcsc-lite-and-scardeservicestopped.html]

Posted by 구차니

언제 왜 깔린지도 모르는 프로그램을 발견(!!)

[링크 : https://pcsc-tools.apdu.fr/]

 

pcsc_scan 관련 툴에서 같이 설치된건가?

 

thank you! lionel victor!!

 

Settings - Reader로 가서 리더를 골라야 하는데

 

테스트 해보니 Protol T=0 만 작동을 하지 않고, 나머지는 RESET 명령이 먹힌다.

T=1 이 멀 의미하는걸까..

+

T=0 프로토콜은 문자 기반 형식이며, T=1은 블록 기반 형식이다.

[링크 : https://blog.naver.com/eleexpert/140125412934]

PICC, SAM 이 있는데

 

일반 접속식 태그니까 SAM 보단 PICC가 맞을 것 같긴한데, 되는지 안되는지 해보면 되지(!)

SAM(Security access module)

[링크 : https://www.lgcns.com/blog/cns-tech/security/17597/]
 

PICC(Proximity Integrated Circuit)

[링크 : https://m.blog.naver.com/ittalentdonation/221215499032]
 

SAM 으로는 리더에 접속 자체가 되지 않는 것 처럼 보인다.

 

같은 명령어를 넣었는데 기대한거랑 많이 다른 값이 온다. 그런데 저 보낸게 멀 의미하는걸까?

 

카드가 없으면 ATR 응답도 없고, 당연히(?) APDU(?) 에도 응답이 없어 에러가 발생한다.

Posted by 구차니

윈도우에서 USB 카드리더를 통해서 읽으려는데 이런 에러가 발생한다.

"smart card resource manager is not running"

 

보안 정책을 바꾸어주고

Local:
Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options / Interactive logon: Smart card removal behvior (select any option other than "no action")

[링크 : https://github.com/actions/runner-images/discussions/9893

 

smart card service / smart card remove 등을 기동하도록 해주면 된다는데

Press the Windows + R keys on your keyboard to open the Run window. Type services. msc and hit Enter.
In the services find the Smart Card service > right-click then click start.

[링크 : https://answers.microsoft.com/en-us/windows/forum/all/smart-card-resource-manager-not-running-solution/bf1b13de-a66a-413a-b62f-22b46344a92e

 

일단 해결은 안됨.

Posted by 구차니

윈도우 10에 연결해보니 아래와 같이 나오는데

 

일단 제조사는 Advanced Card Systems Ltd 이고

 

 

SDK를 받아 실행하는데 목록에 안뜬다.. 왜지?

[링크 : https://www.ravirajtech.com/downloads/ACR1252/SDK/]

 

코드를 뒤져보니

"ACR122" 로 검색하는 소스라 ACR1252 와는 매칭되지 않아 안뜨는거 아닌가 생각된다.

수정하고 리빌드 해봐야하나..

Posted by 구차니

회사에서 RFID 카드 읽을일이 있어서 해보려는데 재료(?)가 없어서 구매!

회사에 올리면 귀찮으니 걍 지름!

 

'하드웨어 > rfid_nfc_smartcard' 카테고리의 다른 글

"smart card resource manager is not running"  (0) 2025.02.18
acr1252u 스마트 카드 리더  (0) 2025.02.18
libpcsclite 라이브러리  (0) 2025.02.14
rfid, smart card reader  (0) 2025.02.12
ubunut smart card 읽기  (0) 2025.02.12
Posted by 구차니

pcsc_scan 프로그램에서 정체를(?) 알 수 없는 함수들이 있어서 찾아보는데

libpcsclite 쪽 거였다. 별다르게 include 하는 것도 없어 보였는데 wincard.h 가 그거였던 듯..

그나저나 이름이나 변수타입 등등 윈도우 버전을 거의 그대로 옮긴 느낌이 강하네..

 

API 목록

$ readelf -a libpcsclite.so.1.0.0
The decoding of unwind sections for machine type AArch64 is not currently supported.

Symbol table '.dynsym' contains 77 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000001638     0 SECTION LOCAL  DEFAULT   10 .init
     2: 000000000001b000     0 SECTION LOCAL  DEFAULT   22 .data
     3: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memcpy@GLIBC_2.17 (2)
     4: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strlen@GLIBC_2.17 (2)
     5: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_deregisterT[...]
     6: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND _[...]@GLIBC_2.17 (2)
     7: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.17 (2)
     8: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  UND stderr@GLIBC_2.17 (2)
     9: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND kill@GLIBC_2.17 (2)
    10: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fileno@GLIBC_2.17 (2)
    11: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND _[...]@GLIBC_2.17 (2)
    12: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND _[...]@GLIBC_2.17 (2)
    13: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND _[...]@GLIBC_2.17 (2)
    14: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND time@GLIBC_2.17 (2)
    15: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND malloc@GLIBC_2.17 (2)
    16: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND open@GLIBC_2.17 (2)
    17: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND poll@GLIBC_2.17 (2)
    18: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.17 (2)
    19: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memset@GLIBC_2.17 (2)
    20: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND g[...]@GLIBC_2.17 (2)
    21: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.17 (2)
    22: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND s[...]@GLIBC_2.17 (2)
    23: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND rand@GLIBC_2.17 (2)
    24: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strdup@GLIBC_2.17 (2)
    25: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND s[...]@GLIBC_2.17 (2)
    26: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND _[...]@GLIBC_2.17 (2)
    27: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.17 (2)
    28: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND close@GLIBC_2.17 (2)
    29: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
    30: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND stat@GLIBC_2.33 (3)
    31: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  UND _[...]@GLIBC_2.17 (4)
    32: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND _[...]@GLIBC_2.17 (2)
    33: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strcmp@GLIBC_2.17 (2)
    34: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strtol@GLIBC_2.17 (2)
    35: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND free@GLIBC_2.17 (2)
    36: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND n[...]@GLIBC_2.17 (2)
    37: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND send@GLIBC_2.17 (2)
    38: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND c[...]@GLIBC_2.17 (2)
    39: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.34 (5)
    40: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fcntl@GLIBC_2.17 (2)
    41: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND socket@GLIBC_2.17 (2)
    42: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.17 (2)
    43: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strcpy@GLIBC_2.17 (2)
    44: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND read@GLIBC_2.17 (2)
    45: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND isatty@GLIBC_2.17 (2)
    46: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND srand@GLIBC_2.17 (2)
    47: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND s[...]@GLIBC_2.17 (2)
    48: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_registerTMC[...]
    49: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND _[...]@GLIBC_2.17 (2)
    50: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND getenv@GLIBC_2.17 (2)
    51: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.17 (2)
    52: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.17 (2)
    53: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.34 (5)
    54: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND p[...]@GLIBC_2.34 (5)
    55: 0000000000004170   196 FUNC    GLOBAL DEFAULT   12 SCardGetAttrib
    56: 0000000000004990   324 FUNC    GLOBAL DEFAULT   12 SCardCancel
    57: 0000000000004ad4   160 FUNC    GLOBAL DEFAULT   12 SCardIsValidContext
    58: 00000000000027a0   608 FUNC    GLOBAL DEFAULT   12 SCardConnect
    59: 0000000000003f90   472 FUNC    GLOBAL DEFAULT   12 SCardControl
    60: 0000000000004234    80 FUNC    GLOBAL DEFAULT   12 SCardSetAttrib
    61: 0000000000002db0   416 FUNC    GLOBAL DEFAULT   12 SCardBeginTransaction
    62: 0000000000003094  1168 FUNC    GLOBAL DEFAULT   12 SCardStatus
    63: 0000000000008478    16 OBJECT  GLOBAL DEFAULT   14 g_rgSCardT0Pci
    64: 0000000000002a00   488 FUNC    GLOBAL DEFAULT   12 SCardReconnect
    65: 0000000000004560   548 FUNC    GLOBAL DEFAULT   12 SCardListReaders
    66: 0000000000008458    16 OBJECT  GLOBAL DEFAULT   14 g_rgSCardRawPci
    67: 0000000000004834   348 FUNC    GLOBAL DEFAULT   12 SCardListReaderGroups
    68: 0000000000002bf0   448 FUNC    GLOBAL DEFAULT   12 SCardDisconnect
    69: 0000000000003524  2668 FUNC    GLOBAL DEFAULT   12 SCardGetStatusChange
    70: 0000000000004784   176 FUNC    GLOBAL DEFAULT   12 SCardFreeMemory
    71: 0000000000002540   600 FUNC    GLOBAL DEFAULT   12 SCardReleaseContext
    72: 0000000000008468    16 OBJECT  GLOBAL DEFAULT   14 g_rgSCardT1Pci
    73: 0000000000004284   724 FUNC    GLOBAL DEFAULT   12 SCardTransmit
    74: 0000000000001d40   832 FUNC    GLOBAL DEFAULT   12 pcsc_stringify_error
    75: 0000000000004c30  1120 FUNC    GLOBAL DEFAULT   12 SCardEstablishContext
    76: 0000000000002f50   324 FUNC    GLOBAL DEFAULT   12 SCardEndTransaction

[링크 : https://pcsclite.apdu.fr/api/group__API.html]

 

+

리더기에 다이렉트로 붙이려면 SCARD_SHARE_DIRECT로 해서 명령을 보내라는데...

(난 카드의 시리얼을 받고 싶었고, 이 글은 리더기의 시리얼을 받고 싶어하고)

You should be using:

lReturn = SCardConnect(hResManager,szAvailRdr,SCARD_SHARE_SHARED,
                            SCARD_PROTOCOL_T1,
                            &hCardHandle,
                            &dwActProtocol);
Instead, try using:

lReturn = SCardConnect(hResManager,szAvailRdr,SCARD_SHARE_DIRECT,
                      NULL,
                      &hCardHandle,
                      NULL);
where szAvailRdr refers to the reader name (smartcard readername) and hCardHandle is a handle obtained before using scardconnect.

This should keep you going!

[링크 : https://stackoverflow.com/questions/6940824/getting-pcsc-reader-serial-number-with-winscard]

 

sector / block 개념으로 1k 데이터를 쓸수 있다고.

그러면 serial은 어디서 빼내지?

[링크 : https://you-rang.tistory.com/243]

[링크 : https://blog.naver.com/intopion/221613937290]

'하드웨어 > rfid_nfc_smartcard' 카테고리의 다른 글

acr1252u 스마트 카드 리더  (0) 2025.02.18
아내 몰래(?) 회사 몰래 지르기  (0) 2025.02.14
rfid, smart card reader  (0) 2025.02.12
ubunut smart card 읽기  (0) 2025.02.12
ATR (Answer To Reset)  (0) 2025.02.12
Posted by 구차니

usb input device로 뜨는 놈도 있나 본데.. 내가 가지건 그렇게 뜨진 않는다

[링크 : https://stackoverflow.com/questions/41071272/linux-command-to-read-rfid-usb-port]

[링크 : https://m.blog.naver.com/bitekrfid/222666545778]

 

안드로이드 앱에서 데이터 쓰는건 어디로 들어가려나?

이 기사에서는 DS9908R/DS9808R(RFID)이 EPC Class 1 Gen 2를 읽거나 쓸 수 있다고 명시하고 있습니다. EPC Gen2 V2; ISO-18000-63 RFID 태그. 기본적으로 HID 모드에서 EPC 메모리 뱅크 데이터를 읽을 수 있습니다. 그러나 HID 모드에서는 TID/USER/RESERVED 메모리 뱅크 데이터를 읽을 수 없습니다.

[링크 : https://supportcommunity.zebra.com/s/article/DS9908R-Reading-a-Gen2-RFID-Tag-User-Bank-Memory?language=ko]

'하드웨어 > rfid_nfc_smartcard' 카테고리의 다른 글

아내 몰래(?) 회사 몰래 지르기  (0) 2025.02.14
libpcsclite 라이브러리  (0) 2025.02.14
ubunut smart card 읽기  (0) 2025.02.12
ATR (Answer To Reset)  (0) 2025.02.12
rfid 12.5M / 125k  (0) 2024.07.25
Posted by 구차니

pcscd 를 설치하고

pcsc_scan 를 사용해서 읽으면 되는데

$ sudo apt-get install pcsc-tools

 

안드로이드의 NFC 리더 처럼 여러가지 값을 읽진 못한다.

USB 타입의 SC point 사 ACR1252U 라는 리더이고, 리눅스에서 꽂으면 다음과 같이 메시지가 나온다.

$ dmesg
[197861.911706] usb 1-2: new full-speed USB device number 13 using xhci_hcd
[197862.039152] usb 1-2: not running at top speed; connect to a high speed hub
[197862.040341] usb 1-2: New USB device found, idVendor=072f, idProduct=223b, bcdDevice= 1.11
[197862.040359] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[197862.040366] usb 1-2: Product: ACR1252 Dual Reader
[197862.040371] usb 1-2: Manufacturer: ACS


$ lsusb -t -v
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=, Driver=, 12M
        ID 2109:0103 VIA Labs, Inc. 
    |__ Port 2: Dev 15, If 0, Class=Chip/SmartCard, Driver=usbfs, 12M
        ID 072f:223b Advanced Card Systems, Ltd 
    |__ Port 2: Dev 15, If 1, Class=Chip/SmartCard, Driver=usbfs, 12M
        ID 072f:223b Advanced Card Systems, Ltd 

[링크 : https://www.scpoint.co.kr/bbs/board.php?bo_table=s3_1_2&wr_id=58]

 

RFID 태그를 읽어보는데 ATR 이라는 것만 좀 나오고

별다른 상세 정보가 보이진 않는다. 특이(?)한 것 가져가 대면 뜨고, 떼면 removed 라고 인식된다는 점

$ pcsc_scan 
Using reader plug'n play mechanism
Scanning present readers...
Waiting for the first reader... found one
Scanning present readers...
0: ACS ACR1252 Dual Reader [ACR1252 Dual Reader PICC] 00 00
 
Wed Feb 12 16:51:00 2025
 Reader 0: ACS ACR1252 Dual Reader [ACR1252 Dual Reader PICC] 00 00
  Event number: 0
  Card state: Card removed, 
   
Wed Feb 12 16:51:01 2025
 Reader 0: ACS ACR1252 Dual Reader [ACR1252 Dual Reader PICC] 00 00
  Event number: 1
  Card state: Card inserted, 
  ATR: 3B 81 80 01 80 80

ATR: 3B 81 80 01 80 80
+ TS = 3B --> Direct Convention
+ T0 = 81, Y(1): 1000, K: 1 (historical bytes)
  TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0 
-----
  TD(2) = 01 --> Y(i+1) = 0000, Protocol T = 1 
-----
+ Historical bytes: 80
  Category indicator byte: 80 (compact TLV data object)
+ TCK = 80 (correct checksum)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B 81 80 01 80 80
RFID - ISO 14443 Type A - NXP DESFire or DESFire EV1 or EV2
"Reiner LoginCard" (or "OWOK", how they name it) - they have been distributed by a german computer magazine ("Computer BILD")
https://cardlogin.reiner-sct.com/
Belgium A-kaart (Antwerp citycard)
Oyster card - Transport for London (second-gen "D")
https://en.wikipedia.org/wiki/Oyster_card
Kaba Legic Advant 4k
Sydney Opal card public transport ticket (Transport)
https://www.opal.com.au
TH Köln (University of Applied Sciences Cologne) - Student Identity Card
https://www.th-koeln.de/en/academics/multica_5893.php
German red cross blood donation service
http://www.blutspende-nordost.de/
Greater Toronto/Hamilton/Ottawa PRESTO contactless fare card
http://en.wikipedia.org/wiki/Presto_card
Electic vehicle charging card of the EMSP EnBW Energie Baden-Württemberg AG, Tarif ADAC e-Charge, Germany
   
Wed Feb 12 16:51:02 2025
 Reader 0: ACS ACR1252 Dual Reader [ACR1252 Dual Reader PICC] 00 00
  Event number: 2
  Card state: Card removed, 

 

교통카드 읽어보는데 아래처럼 나온다.

$ pcsc_scan 
Using reader plug'n play mechanism
Scanning present readers...
0: ACS ACR1252 Dual Reader [ACR1252 Dual Reader PICC] 00 00
1: ACS ACR1252 Dual Reader [ACR1252 Dual Reader SAM] 01 00
 
Wed Feb 12 16:52:15 2025
 Reader 0: ACS ACR1252 Dual Reader [ACR1252 Dual Reader PICC] 00 00
  Event number: 0
  Card state: Card removed, 
 Reader 1: ACS ACR1252 Dual Reader [ACR1252 Dual Reader SAM] 01 00
  Event number: 0
  Card state: Card removed, 
   
Wed Feb 12 16:52:16 2025
 Reader 0: ACS ACR1252 Dual Reader [ACR1252 Dual Reader PICC] 00 00
  Event number: 1
  Card state: Card inserted, 
  ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A

ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
+ TS = 3B --> Direct Convention
+ T0 = 8F, Y(1): 1000, K: 15 (historical bytes)
  TD(1) = 80 --> Y(i+1) = 1000, Protocol T = 0 
-----
  TD(2) = 01 --> Y(i+1) = 0000, Protocol T = 1 
-----
+ Historical bytes: 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00
  Category indicator byte: 80 (compact TLV data object)
    Tag: 4, len: F (initial access data)
      Initial access data: 0C A0 00 00 03 06 03 00 01 00 00 00 00
+ TCK = 6A (correct checksum)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
3B 8F 80 01 80 4F 0C A0 00 00 03 06 .. 00 01 00 00 00 00 ..
MIFARE Classic 1K (as per PCSC std part3)
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 .. .. 00 00 00 00 ..
RFID - ISO 14443 Type A Part 3 (as per PCSC std part3)
3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
NXP/Philips MIFARE Classic 1K (as per PCSC std part3)
http://www.nxp.com/#/pip/pip=[pfp=41863]|pp=[t=pfp,i=41863]
Oyster card - Transport for London (first-gen)
https://en.wikipedia.org/wiki/Oyster_card
ACOS5/1k Mirfare
vivotech ViVOcard Contactless Test Card
Bangkok BTS Sky SmartPass
Mifare Classic 1K (block 0 re-writeable)
Electic vehicle charging card of the German Telekom, acting as EMSP GetCharge
Electic vehicle charging card of the EMSP Stadtwerke Muenchen (SWM), ladenetz.de, Germany
Electic vehicle charging card of the EMSP EinfachStromLaden of Maingau-Energie, Germany
Scouter carsharing customer card in Germany
https://scouter.de/
   
Wed Feb 12 16:52:17 2025
 Reader 0: ACS ACR1252 Dual Reader [ACR1252 Dual Reader PICC] 00 00
  Event number: 2
  Card state: Card removed, 

 

'하드웨어 > rfid_nfc_smartcard' 카테고리의 다른 글

libpcsclite 라이브러리  (0) 2025.02.14
rfid, smart card reader  (0) 2025.02.12
ATR (Answer To Reset)  (0) 2025.02.12
rfid 12.5M / 125k  (0) 2024.07.25
의약품 RFID  (2) 2023.09.12
Posted by 구차니