Load Suica on Ubuntu + Identiv Cloud 3701 F (preliminary note)
What is this?
A collection of rambling notes and links.
- Ubuntu 20.04
- pcsc-lite 1.8.26
- libusb 0.1.4
- Identiv 3701 F (Orange Tags R1-1R)
Installation
sudo apt-get install pcscd
sudo apt-get install libusb-0.1.4
sudo apt-get install opensc
Download the driver for Linux from Identiv Support (https://support.identiv.com/3700f/).
Copy the entire directory scmccid.bundle
to/usr/lib/pcsc/drivers
.
Start pcscd
For the time being, start it on the front end and output a debug message.
/usr/sbin/pcscd -d -f
APDU command structure
field |
Explanation |
CLA |
Instruction class |
INS |
Instruction code |
P1 |
Parameter 1 |
P2 |
Parameter 2 |
LC |
Data length |
Data |
data |
LE |
Response length |
Various patterns
No data or response
Data available, no response
CLA |
INS |
P1 |
P2 |
0x00 |
LC1 |
LC2 |
Data |
No data, with response
CLA |
INS |
P1 |
P2 |
0x00 |
LE1 |
LE2 |
There is data, there is response
CLA |
INS |
P1 |
P2 |
LC |
Data |
LE1 |
LE2 |
CLA |
INS |
P1 |
P2 |
0x00 |
LC1 |
LC2 |
Data |
LE |
CLA |
INS |
P1 |
P2 |
0x00 |
LC1 |
LC2 |
Data |
LE1 |
LE2 |
Common APDU commands
This is a common APDU command. CLA is fixed to FF.
INS |
command |
A0 |
Search binaries |
A2 |
Search record |
A4 |
Select files |
B0 |
Read binary |
B1 |
Read binary (with encryption checksum) |
B2 |
Read record |
B6 |
Read record (with encryption checksum) |
CA |
Type-Length-Value Reading coded data |
F2 |
Status of the selected file |
Cloud 3701 F virtual APDU command
This is a quote from the Identiv Manual.
command |
CLA |
INS |
P1 |
P2 |
P3 |
DATA |
Pass through |
FF |
FE |
00 |
00 |
Data length |
data |
Felica REQC |
FF |
40 |
00 |
00 |
04 |
System code(2 bytes)、将来用予約(1バイト)、タイムスロットナンバー(2 bytes)の合計4バイト |
Felica REQ Service |
FF |
42 |
Number of services or areas |
00 |
P1 × 2 |
List of services or areas |
Felica REQ Response |
FF |
44 |
00 |
00 |
00 |
- |
Felica Read Block |
FF |
46 |
Number of services |
Number of blocks |
(P1 + P2) × 2 |
List of services or blocks |
Felica Write Block |
FF |
48 |
Number of services |
Number of blocks |
(P1 + P2) × 2 + P2 × 16 |
List of services or blocks, block data |
Felica REQ SYSTEM CODE |
FF |
4A |
00 |
00 |
00 |
- |
Felica APDU command
In the case of Felica, CLA, INS, P1 and P2 may be fixed? Or maybe you put in a fixed value for each card reader?
Maybe I put the command defined in Felica in Data?
CLA |
INS |
P1 |
P2 |
LE |
Data |
FF |
? |
? |
? |
Data length |
Felica commands and data |
Suica service code
service |
code |
history of using(20 records) |
09 0F |
Type and balance |
00 8B |
Entry / exit history |
10 8F |
Suica APDU command (for Pasori?)
I'm trying, but I'm not getting any results with an INS error.
Shouldn't it be Pasori? ?? ??
command |
CLA |
INS |
P1 |
P2 |
LC |
DATA |
LE |
File selection |
FF |
A4 |
00 |
01 |
02 |
0F 09 |
- |
Read history |
FF |
B0 |
00 |
00 |
- |
- |
00 FF FF |
Link
- Cloud 3701 F Manual https://academy.identiv.com/pluginfile.php/778/mod_resource/content/1/CLOUD%20370x%20F%20User%20Manual.pdf
- pcsc-lite https://pcsclite.apdu.fr/
- python sample program https://pyscard.sourceforge.io/user-guide.html#monitoring-smart-cards
- Explanation of APDU command and response http://eternalwindows.jp/security/scard/scard07.html
- C # Suica reading program https://tomosoft.jp/design/?p=5543
- How to use OpenSC https://qiita.com/gebo/items/cb2dd393170767852fb3
- Felica specifications https://qiita.com/YasuakiNakazawa/items/3109df682af2a7032f8d
- https://qiita.com/YasuakiNakazawa/items/a509acee1f65272bc933
- https://blog.kalan.dev/core-nfc-en/
- List of service codes http://jennychan.web.fc2.com/format/suica.html
- SONY Felica Technical Information https://www.sony.co.jp/Products/felica/business/tech-support/